diff options
author | Rob Herring <rob.herring@calxeda.com> | 2012-09-06 14:43:04 -0400 |
---|---|---|
committer | Rob Herring <rob.herring@calxeda.com> | 2012-09-14 13:55:09 -0400 |
commit | 617276307cd4cdb9a95c77efaa3063695af63aa7 (patch) | |
tree | ae1ec64138ed1bec2be0a402e90724b0db31afa6 /arch/arm | |
parent | 387798b37c8dd0ae24c0ac12ba456dd76865bca3 (diff) |
ARM: vexpress: convert to multi-platform
Convert vexpress to multi-platform. This always enables vexpress DT and
makes it the default v7 platform.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Pawel Moll <pawel.moll@arm.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/Kconfig | 19 | ||||
-rw-r--r-- | arch/arm/mach-vexpress/Kconfig | 64 | ||||
-rw-r--r-- | arch/arm/mach-vexpress/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/mach-vexpress/Makefile.boot | 5 | ||||
-rw-r--r-- | arch/arm/mach-vexpress/include/mach/timex.h | 23 | ||||
-rw-r--r-- | arch/arm/mach-vexpress/include/mach/uncompress.h | 86 | ||||
-rw-r--r-- | arch/arm/mach-vexpress/v2m.c | 4 | ||||
-rw-r--r-- | arch/arm/plat-versatile/Makefile | 2 |
8 files changed, 37 insertions, 168 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index ebaf08849f96..16773aa39513 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -319,24 +319,6 @@ config ARCH_VERSATILE | |||
319 | help | 319 | help |
320 | This enables support for ARM Ltd Versatile board. | 320 | This enables support for ARM Ltd Versatile board. |
321 | 321 | ||
322 | config ARCH_VEXPRESS | ||
323 | bool "ARM Ltd. Versatile Express family" | ||
324 | select ARCH_WANT_OPTIONAL_GPIOLIB | ||
325 | select ARM_AMBA | ||
326 | select ARM_TIMER_SP804 | ||
327 | select CLKDEV_LOOKUP | ||
328 | select COMMON_CLK | ||
329 | select GENERIC_CLOCKEVENTS | ||
330 | select HAVE_CLK | ||
331 | select HAVE_PATA_PLATFORM | ||
332 | select ICST | ||
333 | select NO_IOPORT | ||
334 | select PLAT_VERSATILE | ||
335 | select PLAT_VERSATILE_CLCD | ||
336 | select REGULATOR_FIXED_VOLTAGE if REGULATOR | ||
337 | help | ||
338 | This enables support for the ARM Ltd Versatile Express boards. | ||
339 | |||
340 | config ARCH_AT91 | 322 | config ARCH_AT91 |
341 | bool "Atmel AT91" | 323 | bool "Atmel AT91" |
342 | select ARCH_REQUIRE_GPIOLIB | 324 | select ARCH_REQUIRE_GPIOLIB |
@@ -1016,6 +998,7 @@ config ARCH_MULTI_V6 | |||
1016 | config ARCH_MULTI_V7 | 998 | config ARCH_MULTI_V7 |
1017 | bool "ARMv7 based platforms (Cortex-A, PJ4, Krait)" | 999 | bool "ARMv7 based platforms (Cortex-A, PJ4, Krait)" |
1018 | select CPU_V7 | 1000 | select CPU_V7 |
1001 | select ARCH_VEXPRESS | ||
1019 | default y | 1002 | default y |
1020 | select ARCH_MULTI_V6_V7 | 1003 | select ARCH_MULTI_V6_V7 |
1021 | 1004 | ||
diff --git a/arch/arm/mach-vexpress/Kconfig b/arch/arm/mach-vexpress/Kconfig index fc3730f01650..c95296066203 100644 --- a/arch/arm/mach-vexpress/Kconfig +++ b/arch/arm/mach-vexpress/Kconfig | |||
@@ -1,38 +1,23 @@ | |||
1 | menu "Versatile Express platform type" | 1 | config ARCH_VEXPRESS |
2 | depends on ARCH_VEXPRESS | 2 | bool "ARM Ltd. Versatile Express family" if ARCH_MULTI_V7 |
3 | 3 | select ARCH_WANT_OPTIONAL_GPIOLIB | |
4 | config ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA | 4 | select ARM_AMBA |
5 | bool "Enable A5 and A9 only errata work-arounds" | ||
6 | default y | ||
7 | select ARM_ERRATA_720789 | ||
8 | select ARM_ERRATA_751472 | ||
9 | select PL310_ERRATA_753970 if CACHE_PL310 | ||
10 | help | ||
11 | Provides common dependencies for Versatile Express platforms | ||
12 | based on Cortex-A5 and Cortex-A9 processors. In order to | ||
13 | build a working kernel, you must also enable relevant core | ||
14 | tile support or Flattened Device Tree based support options. | ||
15 | |||
16 | config ARCH_VEXPRESS_CA9X4 | ||
17 | bool "Versatile Express Cortex-A9x4 tile" | ||
18 | select ARM_GIC | ||
19 | select CPU_V7 | ||
20 | select HAVE_SMP | ||
21 | select MIGHT_HAVE_CACHE_L2X0 | ||
22 | |||
23 | config ARCH_VEXPRESS_DT | ||
24 | bool "Device Tree support for Versatile Express platforms" | ||
25 | select ARM_GIC | 5 | select ARM_GIC |
26 | select ARM_PATCH_PHYS_VIRT | 6 | select ARM_TIMER_SP804 |
27 | select AUTO_ZRELADDR | 7 | select CLKDEV_LOOKUP |
8 | select COMMON_CLK | ||
28 | select CPU_V7 | 9 | select CPU_V7 |
10 | select GENERIC_CLOCKEVENTS | ||
11 | select HAVE_CLK | ||
12 | select HAVE_PATA_PLATFORM | ||
29 | select HAVE_SMP | 13 | select HAVE_SMP |
14 | select ICST | ||
30 | select MIGHT_HAVE_CACHE_L2X0 | 15 | select MIGHT_HAVE_CACHE_L2X0 |
31 | select USE_OF | 16 | select NO_IOPORT |
17 | select PLAT_VERSATILE | ||
18 | select PLAT_VERSATILE_CLCD | ||
19 | select REGULATOR_FIXED_VOLTAGE if REGULATOR | ||
32 | help | 20 | help |
33 | New Versatile Express platforms require Flattened Device Tree to | ||
34 | be passed to the kernel. | ||
35 | |||
36 | This option enables support for systems using Cortex processor based | 21 | This option enables support for systems using Cortex processor based |
37 | ARM core and logic (FPGA) tiles on the Versatile Express motherboard, | 22 | ARM core and logic (FPGA) tiles on the Versatile Express motherboard, |
38 | for example: | 23 | for example: |
@@ -48,7 +33,22 @@ config ARCH_VEXPRESS_DT | |||
48 | platforms. The traditional (ATAGs) boot method is not usable on | 33 | platforms. The traditional (ATAGs) boot method is not usable on |
49 | these boards with this option. | 34 | these boards with this option. |
50 | 35 | ||
51 | If your bootloader supports Flattened Device Tree based booting, | 36 | menu "Versatile Express platform type" |
52 | say Y here. | 37 | depends on ARCH_VEXPRESS |
38 | |||
39 | config ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA | ||
40 | bool "Enable A5 and A9 only errata work-arounds" | ||
41 | default y | ||
42 | select ARM_ERRATA_720789 | ||
43 | select ARM_ERRATA_751472 | ||
44 | select PL310_ERRATA_753970 if CACHE_PL310 | ||
45 | help | ||
46 | Provides common dependencies for Versatile Express platforms | ||
47 | based on Cortex-A5 and Cortex-A9 processors. In order to | ||
48 | build a working kernel, you must also enable relevant core | ||
49 | tile support or Flattened Device Tree based support options. | ||
50 | |||
51 | config ARCH_VEXPRESS_CA9X4 | ||
52 | bool "Versatile Express Cortex-A9x4 tile" | ||
53 | 53 | ||
54 | endmenu | 54 | endmenu |
diff --git a/arch/arm/mach-vexpress/Makefile b/arch/arm/mach-vexpress/Makefile index 90551b9780ab..42703e8b4d3b 100644 --- a/arch/arm/mach-vexpress/Makefile +++ b/arch/arm/mach-vexpress/Makefile | |||
@@ -1,6 +1,8 @@ | |||
1 | # | 1 | # |
2 | # Makefile for the linux kernel. | 2 | # Makefile for the linux kernel. |
3 | # | 3 | # |
4 | ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include \ | ||
5 | -I$(srctree)/arch/arm/plat-versatile/include | ||
4 | 6 | ||
5 | obj-y := v2m.o | 7 | obj-y := v2m.o |
6 | obj-$(CONFIG_ARCH_VEXPRESS_CA9X4) += ct-ca9x4.o | 8 | obj-$(CONFIG_ARCH_VEXPRESS_CA9X4) += ct-ca9x4.o |
diff --git a/arch/arm/mach-vexpress/Makefile.boot b/arch/arm/mach-vexpress/Makefile.boot deleted file mode 100644 index c6dd8918b9ed..000000000000 --- a/arch/arm/mach-vexpress/Makefile.boot +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | # Those numbers are used only by the non-DT V2P-CA9 platform | ||
2 | # The DT-enabled ones require CONFIG_AUTO_ZRELADDR=y | ||
3 | zreladdr-y += 0x60008000 | ||
4 | params_phys-y := 0x60000100 | ||
5 | initrd_phys-y := 0x60800000 | ||
diff --git a/arch/arm/mach-vexpress/include/mach/timex.h b/arch/arm/mach-vexpress/include/mach/timex.h deleted file mode 100644 index 00029bacd43c..000000000000 --- a/arch/arm/mach-vexpress/include/mach/timex.h +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-vexpress/include/mach/timex.h | ||
3 | * | ||
4 | * RealView architecture timex specifications | ||
5 | * | ||
6 | * Copyright (C) 2003 ARM Limited | ||
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 as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
21 | */ | ||
22 | |||
23 | #define CLOCK_TICK_RATE (50000000 / 16) | ||
diff --git a/arch/arm/mach-vexpress/include/mach/uncompress.h b/arch/arm/mach-vexpress/include/mach/uncompress.h deleted file mode 100644 index 1e472eb0bbdc..000000000000 --- a/arch/arm/mach-vexpress/include/mach/uncompress.h +++ /dev/null | |||
@@ -1,86 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-vexpress/include/mach/uncompress.h | ||
3 | * | ||
4 | * Copyright (C) 2003 ARM Limited | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | #define AMBA_UART_DR(base) (*(volatile unsigned char *)((base) + 0x00)) | ||
21 | #define AMBA_UART_LCRH(base) (*(volatile unsigned char *)((base) + 0x2c)) | ||
22 | #define AMBA_UART_CR(base) (*(volatile unsigned char *)((base) + 0x30)) | ||
23 | #define AMBA_UART_FR(base) (*(volatile unsigned char *)((base) + 0x18)) | ||
24 | |||
25 | #define UART_BASE 0x10009000 | ||
26 | #define UART_BASE_RS1 0x1c090000 | ||
27 | |||
28 | static unsigned long get_uart_base(void) | ||
29 | { | ||
30 | #if defined(CONFIG_DEBUG_VEXPRESS_UART0_DETECT) | ||
31 | unsigned long mpcore_periph; | ||
32 | |||
33 | /* | ||
34 | * Make an educated guess regarding the memory map: | ||
35 | * - the original A9 core tile, which has MPCore peripherals | ||
36 | * located at 0x1e000000, should use UART at 0x10009000 | ||
37 | * - all other (RS1 complaint) tiles use UART mapped | ||
38 | * at 0x1c090000 | ||
39 | */ | ||
40 | asm("mrc p15, 4, %0, c15, c0, 0" : "=r" (mpcore_periph)); | ||
41 | |||
42 | if (mpcore_periph == 0x1e000000) | ||
43 | return UART_BASE; | ||
44 | else | ||
45 | return UART_BASE_RS1; | ||
46 | #elif defined(CONFIG_DEBUG_VEXPRESS_UART0_CA9) | ||
47 | return UART_BASE; | ||
48 | #elif defined(CONFIG_DEBUG_VEXPRESS_UART0_RS1) | ||
49 | return UART_BASE_RS1; | ||
50 | #else | ||
51 | return 0; | ||
52 | #endif | ||
53 | } | ||
54 | |||
55 | /* | ||
56 | * This does not append a newline | ||
57 | */ | ||
58 | static inline void putc(int c) | ||
59 | { | ||
60 | unsigned long base = get_uart_base(); | ||
61 | |||
62 | if (!base) | ||
63 | return; | ||
64 | |||
65 | while (AMBA_UART_FR(base) & (1 << 5)) | ||
66 | barrier(); | ||
67 | |||
68 | AMBA_UART_DR(base) = c; | ||
69 | } | ||
70 | |||
71 | static inline void flush(void) | ||
72 | { | ||
73 | unsigned long base = get_uart_base(); | ||
74 | |||
75 | if (!base) | ||
76 | return; | ||
77 | |||
78 | while (AMBA_UART_FR(base) & (1 << 3)) | ||
79 | barrier(); | ||
80 | } | ||
81 | |||
82 | /* | ||
83 | * nothing to do | ||
84 | */ | ||
85 | #define arch_decomp_setup() | ||
86 | #define arch_decomp_wdog() | ||
diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c index 37608f22ee31..2ca86c50174d 100644 --- a/arch/arm/mach-vexpress/v2m.c +++ b/arch/arm/mach-vexpress/v2m.c | |||
@@ -539,8 +539,6 @@ MACHINE_START(VEXPRESS, "ARM-Versatile Express") | |||
539 | .restart = v2m_restart, | 539 | .restart = v2m_restart, |
540 | MACHINE_END | 540 | MACHINE_END |
541 | 541 | ||
542 | #if defined(CONFIG_ARCH_VEXPRESS_DT) | ||
543 | |||
544 | static struct map_desc v2m_rs1_io_desc __initdata = { | 542 | static struct map_desc v2m_rs1_io_desc __initdata = { |
545 | .virtual = V2M_PERIPH, | 543 | .virtual = V2M_PERIPH, |
546 | .pfn = __phys_to_pfn(0x1c000000), | 544 | .pfn = __phys_to_pfn(0x1c000000), |
@@ -671,5 +669,3 @@ DT_MACHINE_START(VEXPRESS_DT, "ARM-Versatile Express") | |||
671 | .handle_irq = gic_handle_irq, | 669 | .handle_irq = gic_handle_irq, |
672 | .restart = v2m_restart, | 670 | .restart = v2m_restart, |
673 | MACHINE_END | 671 | MACHINE_END |
674 | |||
675 | #endif | ||
diff --git a/arch/arm/plat-versatile/Makefile b/arch/arm/plat-versatile/Makefile index 272769a8a7d6..74cfd94cbf80 100644 --- a/arch/arm/plat-versatile/Makefile +++ b/arch/arm/plat-versatile/Makefile | |||
@@ -1,3 +1,5 @@ | |||
1 | ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include | ||
2 | |||
1 | obj-$(CONFIG_PLAT_VERSATILE_CLOCK) += clock.o | 3 | obj-$(CONFIG_PLAT_VERSATILE_CLOCK) += clock.o |
2 | obj-$(CONFIG_PLAT_VERSATILE_CLCD) += clcd.o | 4 | obj-$(CONFIG_PLAT_VERSATILE_CLCD) += clcd.o |
3 | obj-$(CONFIG_PLAT_VERSATILE_FPGA_IRQ) += fpga-irq.o | 5 | obj-$(CONFIG_PLAT_VERSATILE_FPGA_IRQ) += fpga-irq.o |