diff options
-rw-r--r-- | arch/arm/Kconfig | 2 | ||||
-rw-r--r-- | arch/arm/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/mach-virt/Kconfig | 9 | ||||
-rw-r--r-- | arch/arm/mach-virt/Makefile | 5 | ||||
-rw-r--r-- | arch/arm/mach-virt/virt.c | 54 |
5 files changed, 71 insertions, 0 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index c20441394504..b7562a721ac0 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -1128,6 +1128,8 @@ source "arch/arm/mach-versatile/Kconfig" | |||
1128 | source "arch/arm/mach-vexpress/Kconfig" | 1128 | source "arch/arm/mach-vexpress/Kconfig" |
1129 | source "arch/arm/plat-versatile/Kconfig" | 1129 | source "arch/arm/plat-versatile/Kconfig" |
1130 | 1130 | ||
1131 | source "arch/arm/mach-virt/Kconfig" | ||
1132 | |||
1131 | source "arch/arm/mach-vt8500/Kconfig" | 1133 | source "arch/arm/mach-vt8500/Kconfig" |
1132 | 1134 | ||
1133 | source "arch/arm/mach-w90x900/Kconfig" | 1135 | source "arch/arm/mach-w90x900/Kconfig" |
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 30c443c406f3..ea4f481753c5 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile | |||
@@ -194,6 +194,7 @@ machine-$(CONFIG_ARCH_SOCFPGA) += socfpga | |||
194 | machine-$(CONFIG_ARCH_SPEAR13XX) += spear13xx | 194 | machine-$(CONFIG_ARCH_SPEAR13XX) += spear13xx |
195 | machine-$(CONFIG_ARCH_SPEAR3XX) += spear3xx | 195 | machine-$(CONFIG_ARCH_SPEAR3XX) += spear3xx |
196 | machine-$(CONFIG_MACH_SPEAR600) += spear6xx | 196 | machine-$(CONFIG_MACH_SPEAR600) += spear6xx |
197 | machine-$(CONFIG_ARCH_VIRT) += virt | ||
197 | machine-$(CONFIG_ARCH_ZYNQ) += zynq | 198 | machine-$(CONFIG_ARCH_ZYNQ) += zynq |
198 | machine-$(CONFIG_ARCH_SUNXI) += sunxi | 199 | machine-$(CONFIG_ARCH_SUNXI) += sunxi |
199 | 200 | ||
diff --git a/arch/arm/mach-virt/Kconfig b/arch/arm/mach-virt/Kconfig new file mode 100644 index 000000000000..a568a2a5bb90 --- /dev/null +++ b/arch/arm/mach-virt/Kconfig | |||
@@ -0,0 +1,9 @@ | |||
1 | config ARCH_VIRT | ||
2 | bool "Dummy Virtual Machine" if ARCH_MULTI_V7 | ||
3 | select ARCH_WANT_OPTIONAL_GPIOLIB | ||
4 | select ARM_GIC | ||
5 | select ARM_ARCH_TIMER | ||
6 | select HAVE_SMP | ||
7 | select CPU_V7 | ||
8 | select SPARSE_IRQ | ||
9 | select USE_OF | ||
diff --git a/arch/arm/mach-virt/Makefile b/arch/arm/mach-virt/Makefile new file mode 100644 index 000000000000..7ddbfa60227f --- /dev/null +++ b/arch/arm/mach-virt/Makefile | |||
@@ -0,0 +1,5 @@ | |||
1 | # | ||
2 | # Makefile for the linux kernel. | ||
3 | # | ||
4 | |||
5 | obj-y := virt.o | ||
diff --git a/arch/arm/mach-virt/virt.c b/arch/arm/mach-virt/virt.c new file mode 100644 index 000000000000..d8a84b53fe0c --- /dev/null +++ b/arch/arm/mach-virt/virt.c | |||
@@ -0,0 +1,54 @@ | |||
1 | /* | ||
2 | * Dummy Virtual Machine - does what it says on the tin. | ||
3 | * | ||
4 | * Copyright (C) 2012 ARM Ltd | ||
5 | * Authors: Will Deacon <will.deacon@arm.com>, | ||
6 | * Marc Zyngier <marc.zyngier@arm.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
19 | */ | ||
20 | |||
21 | #include <linux/irqchip.h> | ||
22 | #include <linux/of_irq.h> | ||
23 | #include <linux/of_platform.h> | ||
24 | |||
25 | #include <asm/arch_timer.h> | ||
26 | #include <asm/mach/arch.h> | ||
27 | #include <asm/mach/time.h> | ||
28 | |||
29 | static void __init virt_init(void) | ||
30 | { | ||
31 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | ||
32 | } | ||
33 | |||
34 | static void __init virt_timer_init(void) | ||
35 | { | ||
36 | WARN_ON(arch_timer_of_register() != 0); | ||
37 | WARN_ON(arch_timer_sched_clock_init() != 0); | ||
38 | } | ||
39 | |||
40 | static const char *virt_dt_match[] = { | ||
41 | "linux,dummy-virt", | ||
42 | NULL | ||
43 | }; | ||
44 | |||
45 | static struct sys_timer virt_timer = { | ||
46 | .init = virt_timer_init, | ||
47 | }; | ||
48 | |||
49 | DT_MACHINE_START(VIRT, "Dummy Virtual Machine") | ||
50 | .init_irq = irqchip_init, | ||
51 | .timer = &virt_timer, | ||
52 | .init_machine = virt_init, | ||
53 | .dt_compat = virt_dt_match, | ||
54 | MACHINE_END | ||