diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-09-08 11:43:49 +0200 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-09-08 11:43:49 +0200 |
commit | 1d6ae775d7a948c9575658eb41184fd2e506c0df (patch) | |
tree | 8128a28e89d82f13bb8e3a2160382240c66e2816 /arch/mips/qemu/q-setup.c | |
parent | Merge /spare/repo/linux-2.6/ (diff) | |
parent | [SCSI] Re-do "final klist fixes" (diff) | |
download | linux-1d6ae775d7a948c9575658eb41184fd2e506c0df.tar.xz linux-1d6ae775d7a948c9575658eb41184fd2e506c0df.zip |
Merge /spare/repo/linux-2.6/
Diffstat (limited to 'arch/mips/qemu/q-setup.c')
-rw-r--r-- | arch/mips/qemu/q-setup.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/mips/qemu/q-setup.c b/arch/mips/qemu/q-setup.c new file mode 100644 index 000000000000..1a80eee8cd35 --- /dev/null +++ b/arch/mips/qemu/q-setup.c @@ -0,0 +1,20 @@ +#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; +} |