diff options
-rw-r--r-- | arch/x86/Kconfig | 12 | ||||
-rw-r--r-- | arch/x86/platform/Makefile | 1 | ||||
-rw-r--r-- | arch/x86/platform/goldfish/Makefile | 1 | ||||
-rw-r--r-- | arch/x86/platform/goldfish/goldfish.c | 51 |
4 files changed, 65 insertions, 0 deletions
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 79795af59810..46fb28c93f76 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
@@ -320,6 +320,10 @@ config X86_BIGSMP | |||
320 | ---help--- | 320 | ---help--- |
321 | This option is needed for the systems that have more than 8 CPUs | 321 | This option is needed for the systems that have more than 8 CPUs |
322 | 322 | ||
323 | config GOLDFISH | ||
324 | def_bool y | ||
325 | depends on X86_GOLDFISH | ||
326 | |||
323 | if X86_32 | 327 | if X86_32 |
324 | config X86_EXTENDED_PLATFORM | 328 | config X86_EXTENDED_PLATFORM |
325 | bool "Support for extended (non-PC) x86 platforms" | 329 | bool "Support for extended (non-PC) x86 platforms" |
@@ -402,6 +406,14 @@ config X86_UV | |||
402 | # Following is an alphabetically sorted list of 32 bit extended platforms | 406 | # Following is an alphabetically sorted list of 32 bit extended platforms |
403 | # Please maintain the alphabetic order if and when there are additions | 407 | # Please maintain the alphabetic order if and when there are additions |
404 | 408 | ||
409 | config X86_GOLDFISH | ||
410 | bool "Goldfish (Virtual Platform)" | ||
411 | depends on X86_32 | ||
412 | ---help--- | ||
413 | Enable support for the Goldfish virtual platform used primarily | ||
414 | for Android development. Unless you are building for the Android | ||
415 | Goldfish emulator say N here. | ||
416 | |||
405 | config X86_INTEL_CE | 417 | config X86_INTEL_CE |
406 | bool "CE4100 TV platform" | 418 | bool "CE4100 TV platform" |
407 | depends on PCI | 419 | depends on PCI |
diff --git a/arch/x86/platform/Makefile b/arch/x86/platform/Makefile index 8d874396cb29..bfe917f4f69a 100644 --- a/arch/x86/platform/Makefile +++ b/arch/x86/platform/Makefile | |||
@@ -2,6 +2,7 @@ | |||
2 | obj-y += ce4100/ | 2 | obj-y += ce4100/ |
3 | obj-y += efi/ | 3 | obj-y += efi/ |
4 | obj-y += geode/ | 4 | obj-y += geode/ |
5 | obj-y += goldfish/ | ||
5 | obj-y += iris/ | 6 | obj-y += iris/ |
6 | obj-y += mrst/ | 7 | obj-y += mrst/ |
7 | obj-y += olpc/ | 8 | obj-y += olpc/ |
diff --git a/arch/x86/platform/goldfish/Makefile b/arch/x86/platform/goldfish/Makefile new file mode 100644 index 000000000000..f030b532fdf3 --- /dev/null +++ b/arch/x86/platform/goldfish/Makefile | |||
@@ -0,0 +1 @@ | |||
obj-$(CONFIG_GOLDFISH) += goldfish.o | |||
diff --git a/arch/x86/platform/goldfish/goldfish.c b/arch/x86/platform/goldfish/goldfish.c new file mode 100644 index 000000000000..1693107a518e --- /dev/null +++ b/arch/x86/platform/goldfish/goldfish.c | |||
@@ -0,0 +1,51 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2007 Google, Inc. | ||
3 | * Copyright (C) 2011 Intel, Inc. | ||
4 | * Copyright (C) 2013 Intel, Inc. | ||
5 | * | ||
6 | * This software is licensed under the terms of the GNU General Public | ||
7 | * License version 2, as published by the Free Software Foundation, and | ||
8 | * may be copied, distributed, and modified under those terms. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | */ | ||
16 | |||
17 | #include <linux/kernel.h> | ||
18 | #include <linux/irq.h> | ||
19 | #include <linux/platform_device.h> | ||
20 | |||
21 | /* | ||
22 | * Where in virtual device memory the IO devices (timers, system controllers | ||
23 | * and so on) | ||
24 | */ | ||
25 | |||
26 | #define GOLDFISH_PDEV_BUS_BASE (0xff001000) | ||
27 | #define GOLDFISH_PDEV_BUS_END (0xff7fffff) | ||
28 | #define GOLDFISH_PDEV_BUS_IRQ (4) | ||
29 | |||
30 | #define GOLDFISH_TTY_BASE (0x2000) | ||
31 | |||
32 | static struct resource goldfish_pdev_bus_resources[] = { | ||
33 | { | ||
34 | .start = GOLDFISH_PDEV_BUS_BASE, | ||
35 | .end = GOLDFISH_PDEV_BUS_END, | ||
36 | .flags = IORESOURCE_MEM, | ||
37 | }, | ||
38 | { | ||
39 | .start = GOLDFISH_PDEV_BUS_IRQ, | ||
40 | .end = GOLDFISH_PDEV_BUS_IRQ, | ||
41 | .flags = IORESOURCE_IRQ, | ||
42 | } | ||
43 | }; | ||
44 | |||
45 | static int __init goldfish_init(void) | ||
46 | { | ||
47 | platform_device_register_simple("goldfish_pdev_bus", -1, | ||
48 | goldfish_pdev_bus_resources, 2); | ||
49 | return 0; | ||
50 | } | ||
51 | device_initcall(goldfish_init); | ||