diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-08 17:13:04 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-08 17:13:04 -0400 |
commit | cf377ad7d42c566356d79049536d9cb37499cb77 (patch) | |
tree | 266371ff3a9462dcbaa9567e20c9a34722e3b32f /arch/arm/mach-at91/include/mach | |
parent | 212fe84a6f215c39795a76517c1c02114d428681 (diff) | |
parent | d8f0faa339b0beff6e055218e10b2982422db540 (diff) |
Merge tag 'soc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC platform changes from Arnd Bergmann:
"New and updated SoC support. Among the things new for this release
are:
- at91: Added support for the new SAMA5D4 SoC, following the earlier
SAMA5D3
- bcm: Added support for BCM63XX family of DSL SoCs
- hisi: Added support for HiP04 server-class SoC
- meson: Initial support for the Amlogic Meson6 (aka 8726MX) platform
- shmobile: added support for new r8a7794 (R-Car E2) automotive SoC
Noteworthy changes to existing SoC support are:
- imx: convert i.MX1 to device tree
- omap: lots of power management work
- omap: base support to enable moving to standard UART driver
- shmobile: lots of progress for multiplatform support, still
ongoing"
* tag 'soc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (171 commits)
ARM: hisi: depend on ARCH_MULTI_V7
CNS3xxx: Fix debug UART.
ARM: at91: fix nommu build regression
ARM: meson: add basic support for MesonX SoCs
ARM: meson: debug: add debug UART for earlyprintk support
irq: Export handle_fasteoi_irq
ARM: mediatek: Add earlyprintk support for mt6589
ARM: hisi: Fix platmcpm compilation when ARMv6 is selected
ARM: debug: fix alphanumerical order on debug uarts
ARM: at91: document Atmel SMART compatibles
ARM: at91: add sama5d4 support to sama5_defconfig
ARM: at91: dt: add device tree file for SAMA5D4ek board
ARM: at91: dt: add device tree file for SAMA5D4 SoC
ARM: at91: SAMA5D4 SoC detection code and low level routines
ARM: at91: introduce basic SAMA5D4 support
clk: at91: add a driver for the h32mx clock
ARM: pxa3xx: provide specific platform_devices for all ssp ports
ARM: pxa: ssp: provide platform_device_id for PXA3xx
ARM: OMAP4+: Remove static iotable mappings for SRAM
ARM: OMAP4+: Move SRAM data to DT
...
Diffstat (limited to 'arch/arm/mach-at91/include/mach')
-rw-r--r-- | arch/arm/mach-at91/include/mach/cpu.h | 22 | ||||
-rw-r--r-- | arch/arm/mach-at91/include/mach/debug-macro.S | 5 | ||||
-rw-r--r-- | arch/arm/mach-at91/include/mach/hardware.h | 23 | ||||
-rw-r--r-- | arch/arm/mach-at91/include/mach/sama5d4.h | 33 | ||||
-rw-r--r-- | arch/arm/mach-at91/include/mach/uncompress.h | 21 |
5 files changed, 97 insertions, 7 deletions
diff --git a/arch/arm/mach-at91/include/mach/cpu.h b/arch/arm/mach-at91/include/mach/cpu.h index 86c71debab5b..b27e9ca65653 100644 --- a/arch/arm/mach-at91/include/mach/cpu.h +++ b/arch/arm/mach-at91/include/mach/cpu.h | |||
@@ -36,7 +36,7 @@ | |||
36 | #define ARCH_ID_AT91M40807 0x14080745 | 36 | #define ARCH_ID_AT91M40807 0x14080745 |
37 | #define ARCH_ID_AT91R40008 0x44000840 | 37 | #define ARCH_ID_AT91R40008 0x44000840 |
38 | 38 | ||
39 | #define ARCH_ID_SAMA5D3 0x8A5C07C0 | 39 | #define ARCH_ID_SAMA5 0x8A5C07C0 |
40 | 40 | ||
41 | #define ARCH_EXID_AT91SAM9M11 0x00000001 | 41 | #define ARCH_EXID_AT91SAM9M11 0x00000001 |
42 | #define ARCH_EXID_AT91SAM9M10 0x00000002 | 42 | #define ARCH_EXID_AT91SAM9M10 0x00000002 |
@@ -49,12 +49,19 @@ | |||
49 | #define ARCH_EXID_AT91SAM9G25 0x00000003 | 49 | #define ARCH_EXID_AT91SAM9G25 0x00000003 |
50 | #define ARCH_EXID_AT91SAM9X25 0x00000004 | 50 | #define ARCH_EXID_AT91SAM9X25 0x00000004 |
51 | 51 | ||
52 | #define ARCH_EXID_SAMA5D3 0x00004300 | ||
52 | #define ARCH_EXID_SAMA5D31 0x00444300 | 53 | #define ARCH_EXID_SAMA5D31 0x00444300 |
53 | #define ARCH_EXID_SAMA5D33 0x00414300 | 54 | #define ARCH_EXID_SAMA5D33 0x00414300 |
54 | #define ARCH_EXID_SAMA5D34 0x00414301 | 55 | #define ARCH_EXID_SAMA5D34 0x00414301 |
55 | #define ARCH_EXID_SAMA5D35 0x00584300 | 56 | #define ARCH_EXID_SAMA5D35 0x00584300 |
56 | #define ARCH_EXID_SAMA5D36 0x00004301 | 57 | #define ARCH_EXID_SAMA5D36 0x00004301 |
57 | 58 | ||
59 | #define ARCH_EXID_SAMA5D4 0x00000007 | ||
60 | #define ARCH_EXID_SAMA5D41 0x00000001 | ||
61 | #define ARCH_EXID_SAMA5D42 0x00000002 | ||
62 | #define ARCH_EXID_SAMA5D43 0x00000003 | ||
63 | #define ARCH_EXID_SAMA5D44 0x00000004 | ||
64 | |||
58 | #define ARCH_FAMILY_AT91X92 0x09200000 | 65 | #define ARCH_FAMILY_AT91X92 0x09200000 |
59 | #define ARCH_FAMILY_AT91SAM9 0x01900000 | 66 | #define ARCH_FAMILY_AT91SAM9 0x01900000 |
60 | #define ARCH_FAMILY_AT91SAM9XE 0x02900000 | 67 | #define ARCH_FAMILY_AT91SAM9XE 0x02900000 |
@@ -86,6 +93,9 @@ enum at91_soc_type { | |||
86 | /* SAMA5D3 */ | 93 | /* SAMA5D3 */ |
87 | AT91_SOC_SAMA5D3, | 94 | AT91_SOC_SAMA5D3, |
88 | 95 | ||
96 | /* SAMA5D4 */ | ||
97 | AT91_SOC_SAMA5D4, | ||
98 | |||
89 | /* Unknown type */ | 99 | /* Unknown type */ |
90 | AT91_SOC_UNKNOWN, | 100 | AT91_SOC_UNKNOWN, |
91 | }; | 101 | }; |
@@ -108,6 +118,10 @@ enum at91_soc_subtype { | |||
108 | AT91_SOC_SAMA5D31, AT91_SOC_SAMA5D33, AT91_SOC_SAMA5D34, | 118 | AT91_SOC_SAMA5D31, AT91_SOC_SAMA5D33, AT91_SOC_SAMA5D34, |
109 | AT91_SOC_SAMA5D35, AT91_SOC_SAMA5D36, | 119 | AT91_SOC_SAMA5D35, AT91_SOC_SAMA5D36, |
110 | 120 | ||
121 | /* SAMA5D4 */ | ||
122 | AT91_SOC_SAMA5D41, AT91_SOC_SAMA5D42, AT91_SOC_SAMA5D43, | ||
123 | AT91_SOC_SAMA5D44, | ||
124 | |||
111 | /* No subtype for this SoC */ | 125 | /* No subtype for this SoC */ |
112 | AT91_SOC_SUBTYPE_NONE, | 126 | AT91_SOC_SUBTYPE_NONE, |
113 | 127 | ||
@@ -211,6 +225,12 @@ static inline int at91_soc_is_detected(void) | |||
211 | #define cpu_is_sama5d3() (0) | 225 | #define cpu_is_sama5d3() (0) |
212 | #endif | 226 | #endif |
213 | 227 | ||
228 | #ifdef CONFIG_SOC_SAMA5D4 | ||
229 | #define cpu_is_sama5d4() (at91_soc_initdata.type == AT91_SOC_SAMA5D4) | ||
230 | #else | ||
231 | #define cpu_is_sama5d4() (0) | ||
232 | #endif | ||
233 | |||
214 | /* | 234 | /* |
215 | * Since this is ARM, we will never run on any AVR32 CPU. But these | 235 | * Since this is ARM, we will never run on any AVR32 CPU. But these |
216 | * definitions may reduce clutter in common drivers. | 236 | * definitions may reduce clutter in common drivers. |
diff --git a/arch/arm/mach-at91/include/mach/debug-macro.S b/arch/arm/mach-at91/include/mach/debug-macro.S index c6bb9e2d9baa..2103a90f2261 100644 --- a/arch/arm/mach-at91/include/mach/debug-macro.S +++ b/arch/arm/mach-at91/include/mach/debug-macro.S | |||
@@ -16,8 +16,11 @@ | |||
16 | 16 | ||
17 | #if defined(CONFIG_AT91_DEBUG_LL_DBGU0) | 17 | #if defined(CONFIG_AT91_DEBUG_LL_DBGU0) |
18 | #define AT91_DBGU AT91_BASE_DBGU0 | 18 | #define AT91_DBGU AT91_BASE_DBGU0 |
19 | #else | 19 | #elif defined(CONFIG_AT91_DEBUG_LL_DBGU1) |
20 | #define AT91_DBGU AT91_BASE_DBGU1 | 20 | #define AT91_DBGU AT91_BASE_DBGU1 |
21 | #else | ||
22 | /* On sama5d4, use USART3 as low level serial console */ | ||
23 | #define AT91_DBGU SAMA5D4_BASE_USART3 | ||
21 | #endif | 24 | #endif |
22 | 25 | ||
23 | .macro addruart, rp, rv, tmp | 26 | .macro addruart, rp, rv, tmp |
diff --git a/arch/arm/mach-at91/include/mach/hardware.h b/arch/arm/mach-at91/include/mach/hardware.h index 56338245653a..c13797352688 100644 --- a/arch/arm/mach-at91/include/mach/hardware.h +++ b/arch/arm/mach-at91/include/mach/hardware.h | |||
@@ -19,8 +19,10 @@ | |||
19 | /* DBGU base */ | 19 | /* DBGU base */ |
20 | /* rm9200, 9260/9g20, 9261/9g10, 9rl */ | 20 | /* rm9200, 9260/9g20, 9261/9g10, 9rl */ |
21 | #define AT91_BASE_DBGU0 0xfffff200 | 21 | #define AT91_BASE_DBGU0 0xfffff200 |
22 | /* 9263, 9g45 */ | 22 | /* 9263, 9g45, sama5d3 */ |
23 | #define AT91_BASE_DBGU1 0xffffee00 | 23 | #define AT91_BASE_DBGU1 0xffffee00 |
24 | /* sama5d4 */ | ||
25 | #define AT91_BASE_DBGU2 0xfc069000 | ||
24 | 26 | ||
25 | #if defined(CONFIG_ARCH_AT91X40) | 27 | #if defined(CONFIG_ARCH_AT91X40) |
26 | #include <mach/at91x40.h> | 28 | #include <mach/at91x40.h> |
@@ -34,6 +36,7 @@ | |||
34 | #include <mach/at91sam9x5.h> | 36 | #include <mach/at91sam9x5.h> |
35 | #include <mach/at91sam9n12.h> | 37 | #include <mach/at91sam9n12.h> |
36 | #include <mach/sama5d3.h> | 38 | #include <mach/sama5d3.h> |
39 | #include <mach/sama5d4.h> | ||
37 | 40 | ||
38 | /* | 41 | /* |
39 | * On all at91 except rm9200 and x40 have the System Controller starts | 42 | * On all at91 except rm9200 and x40 have the System Controller starts |
@@ -47,9 +50,15 @@ | |||
47 | * and map the same memory space | 50 | * and map the same memory space |
48 | */ | 51 | */ |
49 | #define AT91_BASE_SYS 0xffffc000 | 52 | #define AT91_BASE_SYS 0xffffc000 |
53 | |||
50 | #endif | 54 | #endif |
51 | 55 | ||
52 | /* | 56 | /* |
57 | * On sama5d4 there is no system controller, we map some needed peripherals | ||
58 | */ | ||
59 | #define AT91_ALT_BASE_SYS 0xfc069000 | ||
60 | |||
61 | /* | ||
53 | * On all at91 have the Advanced Interrupt Controller starts at address | 62 | * On all at91 have the Advanced Interrupt Controller starts at address |
54 | * 0xfffff000 and the Power Management Controller starts at 0xfffffc00 | 63 | * 0xfffff000 and the Power Management Controller starts at 0xfffffc00 |
55 | */ | 64 | */ |
@@ -69,23 +78,35 @@ | |||
69 | */ | 78 | */ |
70 | #define AT91_IO_PHYS_BASE 0xFFF78000 | 79 | #define AT91_IO_PHYS_BASE 0xFFF78000 |
71 | #define AT91_IO_VIRT_BASE IOMEM(0xFF000000 - AT91_IO_SIZE) | 80 | #define AT91_IO_VIRT_BASE IOMEM(0xFF000000 - AT91_IO_SIZE) |
81 | |||
82 | /* | ||
83 | * On sama5d4, remap the peripherals from address 0xFC069000 .. 0xFC06F000 | ||
84 | * to 0xFB069000 .. 0xFB06F000. (24Kb) | ||
85 | */ | ||
86 | #define AT91_ALT_IO_PHYS_BASE AT91_ALT_BASE_SYS | ||
87 | #define AT91_ALT_IO_VIRT_BASE IOMEM(0xFB069000) | ||
72 | #else | 88 | #else |
73 | /* | 89 | /* |
74 | * Identity mapping for the non MMU case. | 90 | * Identity mapping for the non MMU case. |
75 | */ | 91 | */ |
76 | #define AT91_IO_PHYS_BASE AT91_BASE_SYS | 92 | #define AT91_IO_PHYS_BASE AT91_BASE_SYS |
77 | #define AT91_IO_VIRT_BASE IOMEM(AT91_IO_PHYS_BASE) | 93 | #define AT91_IO_VIRT_BASE IOMEM(AT91_IO_PHYS_BASE) |
94 | |||
95 | #define AT91_ALT_IO_PHYS_BASE AT91_ALT_BASE_SYS | ||
96 | #define AT91_ALT_IO_VIRT_BASE IOMEM(AT91_ALT_BASE_SYS) | ||
78 | #endif | 97 | #endif |
79 | 98 | ||
80 | #define AT91_IO_SIZE (0xFFFFFFFF - AT91_IO_PHYS_BASE + 1) | 99 | #define AT91_IO_SIZE (0xFFFFFFFF - AT91_IO_PHYS_BASE + 1) |
81 | 100 | ||
82 | /* Convert a physical IO address to virtual IO address */ | 101 | /* Convert a physical IO address to virtual IO address */ |
83 | #define AT91_IO_P2V(x) ((x) - AT91_IO_PHYS_BASE + AT91_IO_VIRT_BASE) | 102 | #define AT91_IO_P2V(x) ((x) - AT91_IO_PHYS_BASE + AT91_IO_VIRT_BASE) |
103 | #define AT91_ALT_IO_P2V(x) ((x) - AT91_ALT_IO_PHYS_BASE + AT91_ALT_IO_VIRT_BASE) | ||
84 | 104 | ||
85 | /* | 105 | /* |
86 | * Virtual to Physical Address mapping for IO devices. | 106 | * Virtual to Physical Address mapping for IO devices. |
87 | */ | 107 | */ |
88 | #define AT91_VA_BASE_SYS AT91_IO_P2V(AT91_BASE_SYS) | 108 | #define AT91_VA_BASE_SYS AT91_IO_P2V(AT91_BASE_SYS) |
109 | #define AT91_ALT_VA_BASE_SYS AT91_ALT_IO_P2V(AT91_ALT_BASE_SYS) | ||
89 | 110 | ||
90 | /* Internal SRAM is mapped below the IO devices */ | 111 | /* Internal SRAM is mapped below the IO devices */ |
91 | #define AT91_SRAM_MAX SZ_1M | 112 | #define AT91_SRAM_MAX SZ_1M |
diff --git a/arch/arm/mach-at91/include/mach/sama5d4.h b/arch/arm/mach-at91/include/mach/sama5d4.h new file mode 100644 index 000000000000..f256a45d9854 --- /dev/null +++ b/arch/arm/mach-at91/include/mach/sama5d4.h | |||
@@ -0,0 +1,33 @@ | |||
1 | /* | ||
2 | * Chip-specific header file for the SAMA5D4 family | ||
3 | * | ||
4 | * Copyright (C) 2013 Atmel Corporation, | ||
5 | * Nicolas Ferre <nicolas.ferre@atmel.com> | ||
6 | * | ||
7 | * Common definitions. | ||
8 | * Based on SAMA5D4 datasheet. | ||
9 | * | ||
10 | * Licensed under GPLv2 or later. | ||
11 | */ | ||
12 | |||
13 | #ifndef SAMA5D4_H | ||
14 | #define SAMA5D4_H | ||
15 | |||
16 | /* | ||
17 | * User Peripheral physical base addresses. | ||
18 | */ | ||
19 | #define SAMA5D4_BASE_USART3 0xfc00c000 /* (USART3 non-secure) Base Address */ | ||
20 | #define SAMA5D4_BASE_PMC 0xf0018000 /* (PMC) Base Address */ | ||
21 | #define SAMA5D4_BASE_MPDDRC 0xf0010000 /* (MPDDRC) Base Address */ | ||
22 | #define SAMA5D4_BASE_PIOD 0xfc068000 /* (PIOD) Base Address */ | ||
23 | |||
24 | /* Some other peripherals */ | ||
25 | #define SAMA5D4_BASE_SYS2 SAMA5D4_BASE_PIOD | ||
26 | |||
27 | /* | ||
28 | * Internal Memory. | ||
29 | */ | ||
30 | #define SAMA5D4_NS_SRAM_BASE 0x00210000 /* Internal SRAM base address Non-Secure */ | ||
31 | #define SAMA5D4_NS_SRAM_SIZE (64 * SZ_1K) /* Internal SRAM size Non-Secure part (64Kb) */ | ||
32 | |||
33 | #endif | ||
diff --git a/arch/arm/mach-at91/include/mach/uncompress.h b/arch/arm/mach-at91/include/mach/uncompress.h index 4bb644f8e87c..acb2d890ad7e 100644 --- a/arch/arm/mach-at91/include/mach/uncompress.h +++ b/arch/arm/mach-at91/include/mach/uncompress.h | |||
@@ -94,7 +94,7 @@ static const u32 uarts_sam9x5[] = { | |||
94 | 0, | 94 | 0, |
95 | }; | 95 | }; |
96 | 96 | ||
97 | static const u32 uarts_sama5[] = { | 97 | static const u32 uarts_sama5d3[] = { |
98 | AT91_BASE_DBGU1, | 98 | AT91_BASE_DBGU1, |
99 | SAMA5D3_BASE_USART0, | 99 | SAMA5D3_BASE_USART0, |
100 | SAMA5D3_BASE_USART1, | 100 | SAMA5D3_BASE_USART1, |
@@ -103,6 +103,12 @@ static const u32 uarts_sama5[] = { | |||
103 | 0, | 103 | 0, |
104 | }; | 104 | }; |
105 | 105 | ||
106 | static const u32 uarts_sama5d4[] = { | ||
107 | AT91_BASE_DBGU2, | ||
108 | SAMA5D4_BASE_USART3, | ||
109 | 0, | ||
110 | }; | ||
111 | |||
106 | static inline const u32* decomp_soc_detect(void __iomem *dbgu_base) | 112 | static inline const u32* decomp_soc_detect(void __iomem *dbgu_base) |
107 | { | 113 | { |
108 | u32 cidr, socid; | 114 | u32 cidr, socid; |
@@ -134,8 +140,14 @@ static inline const u32* decomp_soc_detect(void __iomem *dbgu_base) | |||
134 | case ARCH_ID_AT91SAM9X5: | 140 | case ARCH_ID_AT91SAM9X5: |
135 | return uarts_sam9x5; | 141 | return uarts_sam9x5; |
136 | 142 | ||
137 | case ARCH_ID_SAMA5D3: | 143 | case ARCH_ID_SAMA5: |
138 | return uarts_sama5; | 144 | cidr = __raw_readl(dbgu_base + AT91_DBGU_EXID); |
145 | if (cidr & ARCH_EXID_SAMA5D3) | ||
146 | return uarts_sama5d3; | ||
147 | else if (cidr & ARCH_EXID_SAMA5D4) | ||
148 | return uarts_sama5d4; | ||
149 | |||
150 | break; | ||
139 | } | 151 | } |
140 | 152 | ||
141 | /* at91sam9g10 */ | 153 | /* at91sam9g10 */ |
@@ -156,9 +168,10 @@ static inline void arch_decomp_setup(void) | |||
156 | const u32* usarts; | 168 | const u32* usarts; |
157 | 169 | ||
158 | usarts = decomp_soc_detect((void __iomem *)AT91_BASE_DBGU0); | 170 | usarts = decomp_soc_detect((void __iomem *)AT91_BASE_DBGU0); |
159 | |||
160 | if (!usarts) | 171 | if (!usarts) |
161 | usarts = decomp_soc_detect((void __iomem *)AT91_BASE_DBGU1); | 172 | usarts = decomp_soc_detect((void __iomem *)AT91_BASE_DBGU1); |
173 | if (!usarts) | ||
174 | usarts = decomp_soc_detect((void __iomem *)AT91_BASE_DBGU2); | ||
162 | if (!usarts) { | 175 | if (!usarts) { |
163 | at91_uart = NULL; | 176 | at91_uart = NULL; |
164 | return; | 177 | return; |