1
linux/arch/mips/qemu/q-setup.c
Ralf Baechle 07119621e6 [PATCH] mips: add support for Qemu system architecture
Add support for the virtual MIPS system that is emulated by Qemu.  See
http://www.linux-mips.org/wiki/Qemu for a detailed current status.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-05 00:06:04 -07:00

21 lines
457 B
C

#include <linux/init.h>
#include <asm/io.h>
#include <asm/time.h>
#define QEMU_PORT_BASE 0xb4000000
static void __init qemu_timer_setup(struct irqaction *irq)
{
/* set the clock to 100 Hz */
outb_p(0x34,0x43); /* binary, mode 2, LSB/MSB, ch 0 */
outb_p(LATCH & 0xff , 0x40); /* LSB */
outb(LATCH >> 8 , 0x40); /* MSB */
setup_irq(0, irq);
}
void __init plat_setup(void)
{
set_io_port_base(QEMU_PORT_BASE);
board_timer_setup = qemu_timer_setup;
}