kernel-ark/arch/mips/qemu/q-setup.c
Ralf Baechle 2925aba422 [MIPS] Cleanup memory managment initialization.
Historically plat_mem_setup did the entire platform initialization.  This
was rather impractical because it meant plat_mem_setup had to get away
without any kind of memory allocator.  To keep old code from breaking
plat_setup was just renamed to plat_setup and a second platform
initialization hook for anything else was introduced.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-06-19 17:39:23 +01:00

30 lines
577 B
C

#include <linux/init.h>
#include <asm/io.h>
#include <asm/time.h>
extern void qemu_reboot_setup(void);
#define QEMU_PORT_BASE 0xb4000000
const char *get_system_type(void)
{
return "Qemu";
}
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_mem_setup(void)
{
set_io_port_base(QEMU_PORT_BASE);
board_timer_setup = qemu_timer_setup;
qemu_reboot_setup();
}