summaryrefslogtreecommitdiffstats
path: root/arch/mips/qemu/q-setup.c
blob: 9f0c2d3c67eadd55773824c6ae265eae85feab9e (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
27
28
29
30
31
32
33
34
35
36
37
#include <linux/init.h>
#include <linux/platform_device.h>

#include <asm/i8253.h>
#include <asm/io.h>
#include <asm/time.h>

extern void qemu_reboot_setup(void);

const char *get_system_type(void)
{
	return "Qemu";
}

void __init plat_time_init(void)
{
	setup_pit_timer();
}

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

static struct platform_device pcspeaker_pdev = {
	.name	= "pcspkr",
	.id	= -1,
};

static int __init qemu_platform_devinit(void)
{
	platform_device_register(&pcspeaker_pdev);

	return 0;
}

device_initcall(qemu_platform_devinit);