Ralf Baechle | 0711962 | 2005-09-03 15:56:11 -0700 | [diff] [blame] | 1 | #include <linux/init.h> |
| 2 | #include <asm/io.h> |
| 3 | #include <asm/time.h> |
| 4 | |
Thiemo Seufer | c583122 | 2006-05-15 18:59:34 +0100 | [diff] [blame] | 5 | extern void qemu_reboot_setup(void); |
| 6 | |
Ralf Baechle | 0711962 | 2005-09-03 15:56:11 -0700 | [diff] [blame] | 7 | #define QEMU_PORT_BASE 0xb4000000 |
| 8 | |
Ralf Baechle | fd0197d | 2005-08-15 11:24:34 +0000 | [diff] [blame] | 9 | const char *get_system_type(void) |
| 10 | { |
| 11 | return "Qemu"; |
| 12 | } |
| 13 | |
Ralf Baechle | 54d0a21 | 2006-07-09 21:38:56 +0100 | [diff] [blame] | 14 | void __init plat_timer_setup(struct irqaction *irq) |
Ralf Baechle | 0711962 | 2005-09-03 15:56:11 -0700 | [diff] [blame] | 15 | { |
| 16 | /* set the clock to 100 Hz */ |
| 17 | outb_p(0x34,0x43); /* binary, mode 2, LSB/MSB, ch 0 */ |
| 18 | outb_p(LATCH & 0xff , 0x40); /* LSB */ |
| 19 | outb(LATCH >> 8 , 0x40); /* MSB */ |
| 20 | setup_irq(0, irq); |
| 21 | } |
| 22 | |
Ralf Baechle | 2925aba | 2006-06-18 01:32:22 +0100 | [diff] [blame] | 23 | void __init plat_mem_setup(void) |
Ralf Baechle | 0711962 | 2005-09-03 15:56:11 -0700 | [diff] [blame] | 24 | { |
| 25 | set_io_port_base(QEMU_PORT_BASE); |
Thiemo Seufer | c583122 | 2006-05-15 18:59:34 +0100 | [diff] [blame] | 26 | qemu_reboot_setup(); |
Ralf Baechle | 0711962 | 2005-09-03 15:56:11 -0700 | [diff] [blame] | 27 | } |