blob: 1a80eee8cd35fbce3571ebd1aa82a4c6a5524c04 [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
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}