aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/qemu/q-setup.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2005-09-03 18:56:11 -0400
committerLinus Torvalds <torvalds@evo.osdl.org>2005-09-05 03:06:04 -0400
commit07119621e62de0a2c8db6e4896e762c498bfdd17 (patch)
treec62dd52e8072235c8148e7f31b16ed30c5e45343 /arch/mips/qemu/q-setup.c
parent7901c7998267d9d8c3f1b226a8c8cfd7f8e48a01 (diff)
[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>
Diffstat (limited to 'arch/mips/qemu/q-setup.c')
-rw-r--r--arch/mips/qemu/q-setup.c20
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 @@
1#include <linux/init.h>
2#include <asm/io.h>
3#include <asm/time.h>
4
5#define QEMU_PORT_BASE 0xb4000000
6
7static void __init qemu_timer_setup(struct irqaction *irq)
8{
9 /* set the clock to 100 Hz */
10 outb_p(0x34,0x43); /* binary, mode 2, LSB/MSB, ch 0 */
11 outb_p(LATCH & 0xff , 0x40); /* LSB */
12 outb(LATCH >> 8 , 0x40); /* MSB */
13 setup_irq(0, irq);
14}
15
16void __init plat_setup(void)
17{
18 set_io_port_base(QEMU_PORT_BASE);
19 board_timer_setup = qemu_timer_setup;
20}