summaryrefslogtreecommitdiff
path: root/arch/mips/qemu/q-setup.c
blob: 89a207650ce96a04e878d5a02501eb4b33e42c26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#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";
}

void __init plat_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 */
}

void __init plat_mem_setup(void)
{
	set_io_port_base(QEMU_PORT_BASE);
	qemu_reboot_setup();
}