summaryrefslogtreecommitdiffstats
path: root/arch/mips/qemu/q-setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/qemu/q-setup.c')
-rw-r--r--arch/mips/qemu/q-setup.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/mips/qemu/q-setup.c b/arch/mips/qemu/q-setup.c
index 969cedc8d8b..9f0c2d3c67e 100644
--- a/arch/mips/qemu/q-setup.c
+++ b/arch/mips/qemu/q-setup.c
@@ -1,4 +1,5 @@
#include <linux/init.h>
+#include <linux/platform_device.h>
#include <asm/i8253.h>
#include <asm/io.h>
@@ -20,3 +21,17 @@ 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);