diff options
author | Kevin Hilman <khilman@linaro.org> | 2013-12-11 10:37:23 -0500 |
---|---|---|
committer | Kevin Hilman <khilman@linaro.org> | 2013-12-11 10:37:48 -0500 |
commit | 899dd6ccf3e9f659b98011e20df9dedbd2e0b997 (patch) | |
tree | dd3a70cd6d5471c80a66b77651d4a8e66d56f2e5 | |
parent | 374dc56b6c4b86f5bd213be3d2fbbaa0d473e65d (diff) | |
parent | 307b96677c98bc444262e3d1a7d26c0ca8a1c6e0 (diff) |
Merge tag 'integrator-v3.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator into next/dt
From Linus Walleij:
Two integrator device tree patches for v3.14:
- Delete some static core module mappings.
- Move EBI location to the device tree.
* tag 'integrator-v3.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator:
ARM: integrator: move EBI to the device tree
ARM: integrator: delete static core module mappings
Signed-off-by: Kevin Hilman <khilman@linaro.org>
-rw-r--r-- | Documentation/devicetree/bindings/arm/arm-boards | 8 | ||||
-rw-r--r-- | arch/arm/boot/dts/integrator.dtsi | 5 | ||||
-rw-r--r-- | arch/arm/mach-integrator/integrator_ap.c | 60 | ||||
-rw-r--r-- | arch/arm/mach-integrator/integrator_cp.c | 14 |
4 files changed, 44 insertions, 43 deletions
diff --git a/Documentation/devicetree/bindings/arm/arm-boards b/Documentation/devicetree/bindings/arm/arm-boards index 5fac246a9530..3509707f9320 100644 --- a/Documentation/devicetree/bindings/arm/arm-boards +++ b/Documentation/devicetree/bindings/arm/arm-boards | |||
@@ -14,6 +14,9 @@ Required nodes: | |||
14 | - core-module: the root node to the Integrator platforms must have | 14 | - core-module: the root node to the Integrator platforms must have |
15 | a core-module with regs and the compatible string | 15 | a core-module with regs and the compatible string |
16 | "arm,core-module-integrator" | 16 | "arm,core-module-integrator" |
17 | - external-bus-interface: the root node to the Integrator platforms | ||
18 | must have an external bus interface with regs and the | ||
19 | compatible-string "arm,external-bus-interface" | ||
17 | 20 | ||
18 | Required properties for the core module: | 21 | Required properties for the core module: |
19 | - regs: the location and size of the core module registers, one | 22 | - regs: the location and size of the core module registers, one |
@@ -48,6 +51,11 @@ Required nodes: | |||
48 | reg = <0x10000000 0x200>; | 51 | reg = <0x10000000 0x200>; |
49 | }; | 52 | }; |
50 | 53 | ||
54 | ebi@12000000 { | ||
55 | compatible = "arm,external-bus-interface"; | ||
56 | reg = <0x12000000 0x100>; | ||
57 | }; | ||
58 | |||
51 | syscon { | 59 | syscon { |
52 | compatible = "arm,integrator-ap-syscon"; | 60 | compatible = "arm,integrator-ap-syscon"; |
53 | reg = <0x11000000 0x100>; | 61 | reg = <0x11000000 0x100>; |
diff --git a/arch/arm/boot/dts/integrator.dtsi b/arch/arm/boot/dts/integrator.dtsi index 0f06f8687b0b..88e3d477bf16 100644 --- a/arch/arm/boot/dts/integrator.dtsi +++ b/arch/arm/boot/dts/integrator.dtsi | |||
@@ -10,6 +10,11 @@ | |||
10 | reg = <0x10000000 0x200>; | 10 | reg = <0x10000000 0x200>; |
11 | }; | 11 | }; |
12 | 12 | ||
13 | ebi@12000000 { | ||
14 | compatible = "arm,external-bus-interface"; | ||
15 | reg = <0x12000000 0x100>; | ||
16 | }; | ||
17 | |||
13 | timer@13000000 { | 18 | timer@13000000 { |
14 | reg = <0x13000000 0x100>; | 19 | reg = <0x13000000 0x100>; |
15 | interrupt-parent = <&pic>; | 20 | interrupt-parent = <&pic>; |
diff --git a/arch/arm/mach-integrator/integrator_ap.c b/arch/arm/mach-integrator/integrator_ap.c index d50dc2dbfd89..cc1d3fe21c4e 100644 --- a/arch/arm/mach-integrator/integrator_ap.c +++ b/arch/arm/mach-integrator/integrator_ap.c | |||
@@ -63,6 +63,9 @@ | |||
63 | 63 | ||
64 | /* Base address to the AP system controller */ | 64 | /* Base address to the AP system controller */ |
65 | void __iomem *ap_syscon_base; | 65 | void __iomem *ap_syscon_base; |
66 | /* Base address to the external bus interface */ | ||
67 | static void __iomem *ebi_base; | ||
68 | |||
66 | 69 | ||
67 | /* | 70 | /* |
68 | * All IO addresses are mapped onto VA 0xFFFx.xxxx, where x.xxxx | 71 | * All IO addresses are mapped onto VA 0xFFFx.xxxx, where x.xxxx |
@@ -72,15 +75,11 @@ void __iomem *ap_syscon_base; | |||
72 | * just for now). | 75 | * just for now). |
73 | */ | 76 | */ |
74 | #define VA_IC_BASE __io_address(INTEGRATOR_IC_BASE) | 77 | #define VA_IC_BASE __io_address(INTEGRATOR_IC_BASE) |
75 | #define VA_EBI_BASE __io_address(INTEGRATOR_EBI_BASE) | ||
76 | #define VA_CMIC_BASE __io_address(INTEGRATOR_HDR_IC) | ||
77 | 78 | ||
78 | /* | 79 | /* |
79 | * Logical Physical | 80 | * Logical Physical |
80 | * ef000000 Cache flush | 81 | * ef000000 Cache flush |
81 | * f1000000 10000000 Core module registers | ||
82 | * f1100000 11000000 System controller registers | 82 | * f1100000 11000000 System controller registers |
83 | * f1200000 12000000 EBI registers | ||
84 | * f1300000 13000000 Counter/Timer | 83 | * f1300000 13000000 Counter/Timer |
85 | * f1400000 14000000 Interrupt controller | 84 | * f1400000 14000000 Interrupt controller |
86 | * f1600000 16000000 UART 0 | 85 | * f1600000 16000000 UART 0 |
@@ -91,16 +90,6 @@ void __iomem *ap_syscon_base; | |||
91 | 90 | ||
92 | static struct map_desc ap_io_desc[] __initdata __maybe_unused = { | 91 | static struct map_desc ap_io_desc[] __initdata __maybe_unused = { |
93 | { | 92 | { |
94 | .virtual = IO_ADDRESS(INTEGRATOR_HDR_BASE), | ||
95 | .pfn = __phys_to_pfn(INTEGRATOR_HDR_BASE), | ||
96 | .length = SZ_4K, | ||
97 | .type = MT_DEVICE | ||
98 | }, { | ||
99 | .virtual = IO_ADDRESS(INTEGRATOR_EBI_BASE), | ||
100 | .pfn = __phys_to_pfn(INTEGRATOR_EBI_BASE), | ||
101 | .length = SZ_4K, | ||
102 | .type = MT_DEVICE | ||
103 | }, { | ||
104 | .virtual = IO_ADDRESS(INTEGRATOR_CT_BASE), | 93 | .virtual = IO_ADDRESS(INTEGRATOR_CT_BASE), |
105 | .pfn = __phys_to_pfn(INTEGRATOR_CT_BASE), | 94 | .pfn = __phys_to_pfn(INTEGRATOR_CT_BASE), |
106 | .length = SZ_4K, | 95 | .length = SZ_4K, |
@@ -174,9 +163,6 @@ device_initcall(irq_syscore_init); | |||
174 | /* | 163 | /* |
175 | * Flash handling. | 164 | * Flash handling. |
176 | */ | 165 | */ |
177 | #define EBI_CSR1 (VA_EBI_BASE + INTEGRATOR_EBI_CSR1_OFFSET) | ||
178 | #define EBI_LOCK (VA_EBI_BASE + INTEGRATOR_EBI_LOCK_OFFSET) | ||
179 | |||
180 | static int ap_flash_init(struct platform_device *dev) | 166 | static int ap_flash_init(struct platform_device *dev) |
181 | { | 167 | { |
182 | u32 tmp; | 168 | u32 tmp; |
@@ -184,13 +170,15 @@ static int ap_flash_init(struct platform_device *dev) | |||
184 | writel(INTEGRATOR_SC_CTRL_nFLVPPEN | INTEGRATOR_SC_CTRL_nFLWP, | 170 | writel(INTEGRATOR_SC_CTRL_nFLVPPEN | INTEGRATOR_SC_CTRL_nFLWP, |
185 | ap_syscon_base + INTEGRATOR_SC_CTRLC_OFFSET); | 171 | ap_syscon_base + INTEGRATOR_SC_CTRLC_OFFSET); |
186 | 172 | ||
187 | tmp = readl(EBI_CSR1) | INTEGRATOR_EBI_WRITE_ENABLE; | 173 | tmp = readl(ebi_base + INTEGRATOR_EBI_CSR1_OFFSET) | |
188 | writel(tmp, EBI_CSR1); | 174 | INTEGRATOR_EBI_WRITE_ENABLE; |
175 | writel(tmp, ebi_base + INTEGRATOR_EBI_CSR1_OFFSET); | ||
189 | 176 | ||
190 | if (!(readl(EBI_CSR1) & INTEGRATOR_EBI_WRITE_ENABLE)) { | 177 | if (!(readl(ebi_base + INTEGRATOR_EBI_CSR1_OFFSET) |
191 | writel(0xa05f, EBI_LOCK); | 178 | & INTEGRATOR_EBI_WRITE_ENABLE)) { |
192 | writel(tmp, EBI_CSR1); | 179 | writel(0xa05f, ebi_base + INTEGRATOR_EBI_LOCK_OFFSET); |
193 | writel(0, EBI_LOCK); | 180 | writel(tmp, ebi_base + INTEGRATOR_EBI_CSR1_OFFSET); |
181 | writel(0, ebi_base + INTEGRATOR_EBI_LOCK_OFFSET); | ||
194 | } | 182 | } |
195 | return 0; | 183 | return 0; |
196 | } | 184 | } |
@@ -202,13 +190,15 @@ static void ap_flash_exit(struct platform_device *dev) | |||
202 | writel(INTEGRATOR_SC_CTRL_nFLVPPEN | INTEGRATOR_SC_CTRL_nFLWP, | 190 | writel(INTEGRATOR_SC_CTRL_nFLVPPEN | INTEGRATOR_SC_CTRL_nFLWP, |
203 | ap_syscon_base + INTEGRATOR_SC_CTRLC_OFFSET); | 191 | ap_syscon_base + INTEGRATOR_SC_CTRLC_OFFSET); |
204 | 192 | ||
205 | tmp = readl(EBI_CSR1) & ~INTEGRATOR_EBI_WRITE_ENABLE; | 193 | tmp = readl(ebi_base + INTEGRATOR_EBI_CSR1_OFFSET) & |
206 | writel(tmp, EBI_CSR1); | 194 | ~INTEGRATOR_EBI_WRITE_ENABLE; |
195 | writel(tmp, ebi_base + INTEGRATOR_EBI_CSR1_OFFSET); | ||
207 | 196 | ||
208 | if (readl(EBI_CSR1) & INTEGRATOR_EBI_WRITE_ENABLE) { | 197 | if (readl(ebi_base + INTEGRATOR_EBI_CSR1_OFFSET) & |
209 | writel(0xa05f, EBI_LOCK); | 198 | INTEGRATOR_EBI_WRITE_ENABLE) { |
210 | writel(tmp, EBI_CSR1); | 199 | writel(0xa05f, ebi_base + INTEGRATOR_EBI_LOCK_OFFSET); |
211 | writel(0, EBI_LOCK); | 200 | writel(tmp, ebi_base + INTEGRATOR_EBI_CSR1_OFFSET); |
201 | writel(0, ebi_base + INTEGRATOR_EBI_LOCK_OFFSET); | ||
212 | } | 202 | } |
213 | } | 203 | } |
214 | 204 | ||
@@ -475,11 +465,17 @@ static const struct of_device_id ap_syscon_match[] = { | |||
475 | { }, | 465 | { }, |
476 | }; | 466 | }; |
477 | 467 | ||
468 | static const struct of_device_id ebi_match[] = { | ||
469 | { .compatible = "arm,external-bus-interface"}, | ||
470 | { }, | ||
471 | }; | ||
472 | |||
478 | static void __init ap_init_of(void) | 473 | static void __init ap_init_of(void) |
479 | { | 474 | { |
480 | unsigned long sc_dec; | 475 | unsigned long sc_dec; |
481 | struct device_node *root; | 476 | struct device_node *root; |
482 | struct device_node *syscon; | 477 | struct device_node *syscon; |
478 | struct device_node *ebi; | ||
483 | struct device *parent; | 479 | struct device *parent; |
484 | struct soc_device *soc_dev; | 480 | struct soc_device *soc_dev; |
485 | struct soc_device_attribute *soc_dev_attr; | 481 | struct soc_device_attribute *soc_dev_attr; |
@@ -495,10 +491,16 @@ static void __init ap_init_of(void) | |||
495 | syscon = of_find_matching_node(root, ap_syscon_match); | 491 | syscon = of_find_matching_node(root, ap_syscon_match); |
496 | if (!syscon) | 492 | if (!syscon) |
497 | return; | 493 | return; |
494 | ebi = of_find_matching_node(root, ebi_match); | ||
495 | if (!ebi) | ||
496 | return; | ||
498 | 497 | ||
499 | ap_syscon_base = of_iomap(syscon, 0); | 498 | ap_syscon_base = of_iomap(syscon, 0); |
500 | if (!ap_syscon_base) | 499 | if (!ap_syscon_base) |
501 | return; | 500 | return; |
501 | ebi_base = of_iomap(ebi, 0); | ||
502 | if (!ebi_base) | ||
503 | return; | ||
502 | 504 | ||
503 | ap_sc_id = readl(ap_syscon_base); | 505 | ap_sc_id = readl(ap_syscon_base); |
504 | 506 | ||
diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c index 4fc0a195de01..5e84149d1790 100644 --- a/arch/arm/mach-integrator/integrator_cp.c +++ b/arch/arm/mach-integrator/integrator_cp.c | |||
@@ -64,9 +64,6 @@ static void __iomem *intcp_con_base; | |||
64 | 64 | ||
65 | /* | 65 | /* |
66 | * Logical Physical | 66 | * Logical Physical |
67 | * f1000000 10000000 Core module registers | ||
68 | * f1100000 11000000 System controller registers | ||
69 | * f1200000 12000000 EBI registers | ||
70 | * f1300000 13000000 Counter/Timer | 67 | * f1300000 13000000 Counter/Timer |
71 | * f1400000 14000000 Interrupt controller | 68 | * f1400000 14000000 Interrupt controller |
72 | * f1600000 16000000 UART 0 | 69 | * f1600000 16000000 UART 0 |
@@ -74,21 +71,10 @@ static void __iomem *intcp_con_base; | |||
74 | * f1a00000 1a000000 Debug LEDs | 71 | * f1a00000 1a000000 Debug LEDs |
75 | * fc900000 c9000000 GPIO | 72 | * fc900000 c9000000 GPIO |
76 | * fca00000 ca000000 SIC | 73 | * fca00000 ca000000 SIC |
77 | * fcb00000 cb000000 CP system control | ||
78 | */ | 74 | */ |
79 | 75 | ||
80 | static struct map_desc intcp_io_desc[] __initdata __maybe_unused = { | 76 | static struct map_desc intcp_io_desc[] __initdata __maybe_unused = { |
81 | { | 77 | { |
82 | .virtual = IO_ADDRESS(INTEGRATOR_HDR_BASE), | ||
83 | .pfn = __phys_to_pfn(INTEGRATOR_HDR_BASE), | ||
84 | .length = SZ_4K, | ||
85 | .type = MT_DEVICE | ||
86 | }, { | ||
87 | .virtual = IO_ADDRESS(INTEGRATOR_EBI_BASE), | ||
88 | .pfn = __phys_to_pfn(INTEGRATOR_EBI_BASE), | ||
89 | .length = SZ_4K, | ||
90 | .type = MT_DEVICE | ||
91 | }, { | ||
92 | .virtual = IO_ADDRESS(INTEGRATOR_CT_BASE), | 78 | .virtual = IO_ADDRESS(INTEGRATOR_CT_BASE), |
93 | .pfn = __phys_to_pfn(INTEGRATOR_CT_BASE), | 79 | .pfn = __phys_to_pfn(INTEGRATOR_CT_BASE), |
94 | .length = SZ_4K, | 80 | .length = SZ_4K, |