blob: 022eb1af6db12f5f8942b34061c4907096b29e9a [file] [log] [blame]
Ralf Baechle07119622005-09-03 15:56:11 -07001#include <linux/init.h>
2#include <asm/io.h>
3#include <asm/time.h>
4
5#define QEMU_PORT_BASE 0xb4000000
6
Ralf Baechlefd0197d2005-08-15 11:24:34 +00007const char *get_system_type(void)
8{
9 return "Qemu";
10}
11
Ralf Baechle07119622005-09-03 15:56:11 -070012static void __init qemu_timer_setup(struct irqaction *irq)
13{
14 /* set the clock to 100 Hz */
15 outb_p(0x34,0x43); /* binary, mode 2, LSB/MSB, ch 0 */
16 outb_p(LATCH & 0xff , 0x40); /* LSB */
17 outb(LATCH >> 8 , 0x40); /* MSB */
18 setup_irq(0, irq);
19}
20
21void __init plat_setup(void)
22{
23 set_io_port_base(QEMU_PORT_BASE);
24 board_timer_setup = qemu_timer_setup;
25}