Revert "tty: hvc: Fix data abort due to race in hvc_open"
[linux/fpc-iii.git] / arch / x86 / platform / goldfish / goldfish.c
blob6b6f8b4360dd4ba1bb8bde21f4826a2b26228c2f
1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3 * Copyright (C) 2007 Google, Inc.
4 * Copyright (C) 2011 Intel, Inc.
5 * Copyright (C) 2013 Intel, Inc.
6 */
8 #include <linux/kernel.h>
9 #include <linux/irq.h>
10 #include <linux/platform_device.h>
13 * Where in virtual device memory the IO devices (timers, system controllers
14 * and so on)
17 #define GOLDFISH_PDEV_BUS_BASE (0xff001000)
18 #define GOLDFISH_PDEV_BUS_END (0xff7fffff)
19 #define GOLDFISH_PDEV_BUS_IRQ (4)
21 #define GOLDFISH_TTY_BASE (0x2000)
23 static struct resource goldfish_pdev_bus_resources[] = {
25 .start = GOLDFISH_PDEV_BUS_BASE,
26 .end = GOLDFISH_PDEV_BUS_END,
27 .flags = IORESOURCE_MEM,
30 .start = GOLDFISH_PDEV_BUS_IRQ,
31 .end = GOLDFISH_PDEV_BUS_IRQ,
32 .flags = IORESOURCE_IRQ,
36 static bool goldfish_enable __initdata;
38 static int __init goldfish_setup(char *str)
40 goldfish_enable = true;
41 return 0;
43 __setup("goldfish", goldfish_setup);
45 static int __init goldfish_init(void)
47 if (!goldfish_enable)
48 return -ENODEV;
50 platform_device_register_simple("goldfish_pdev_bus", -1,
51 goldfish_pdev_bus_resources, 2);
52 return 0;
54 device_initcall(goldfish_init);