diff options
author | Linus Walleij <linus.walleij@stericsson.com> | 2010-07-02 05:24:03 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-07-09 09:32:35 -0400 |
commit | 48f1d5a3cef5782cbc7a32c29f1eda2342877c13 (patch) | |
tree | 1a7852e7b646f48118dbb97988c44f1971cd4a8e /arch/arm/mach-realview | |
parent | bde28b846e7e0ea6fea78f6ad1c43091fdf4d3e0 (diff) |
ARM: 6204/1: Fixups for the RealView PB1176
This is a number of basic fixes to the PB1176 that makes it tick
properly:
- Detect MMC insertion/removal even when PL061 GPIO is not compiled
in. The register to read this status directly is removed on the
PB1176.
- Define the UART3 on the DevChip (where is actually is) and define
the new UART4 serial port on the FPGA.
- Also define the clocks for these two UARTs apropriately.
- Remove the false notion that the PB1176 should have its CLCD
on the ISSP, this is not the case, it is in the DevChip.
- Remove the defintions and the previously commented-out PL081
DMAC. As confirmed by mail this was found to be broken on the
PB1176 board and removed from the subsequent FPGA images.
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-realview')
-rw-r--r-- | arch/arm/mach-realview/core.c | 23 | ||||
-rw-r--r-- | arch/arm/mach-realview/include/mach/board-pb1176.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-realview/realview_pb1176.c | 14 |
3 files changed, 29 insertions, 9 deletions
diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c index 595be19f8ad5..9e17b4afc47e 100644 --- a/arch/arm/mach-realview/core.c +++ b/arch/arm/mach-realview/core.c | |||
@@ -232,6 +232,21 @@ static unsigned int realview_mmc_status(struct device *dev) | |||
232 | struct amba_device *adev = container_of(dev, struct amba_device, dev); | 232 | struct amba_device *adev = container_of(dev, struct amba_device, dev); |
233 | u32 mask; | 233 | u32 mask; |
234 | 234 | ||
235 | if (machine_is_realview_pb1176()) { | ||
236 | static bool inserted = false; | ||
237 | |||
238 | /* | ||
239 | * The PB1176 does not have the status register, | ||
240 | * assume it is inserted at startup, then invert | ||
241 | * for each call so card insertion/removal will | ||
242 | * be detected anyway. This will not be called if | ||
243 | * GPIO on PL061 is active, which is the proper | ||
244 | * way to do this on the PB1176. | ||
245 | */ | ||
246 | inserted = !inserted; | ||
247 | return inserted ? 0 : 1; | ||
248 | } | ||
249 | |||
235 | if (adev->res.start == REALVIEW_MMCI0_BASE) | 250 | if (adev->res.start == REALVIEW_MMCI0_BASE) |
236 | mask = 1; | 251 | mask = 1; |
237 | else | 252 | else |
@@ -313,6 +328,12 @@ static struct clk_lookup lookups[] = { | |||
313 | }, { /* UART3 */ | 328 | }, { /* UART3 */ |
314 | .dev_id = "fpga:uart3", | 329 | .dev_id = "fpga:uart3", |
315 | .clk = &ref24_clk, | 330 | .clk = &ref24_clk, |
331 | }, { /* UART3 is on the dev chip in PB1176 */ | ||
332 | .dev_id = "dev:uart3", | ||
333 | .clk = &ref24_clk, | ||
334 | }, { /* UART4 only exists in PB1176 */ | ||
335 | .dev_id = "fpga:uart4", | ||
336 | .clk = &ref24_clk, | ||
316 | }, { /* KMI0 */ | 337 | }, { /* KMI0 */ |
317 | .dev_id = "fpga:kmi0", | 338 | .dev_id = "fpga:kmi0", |
318 | .clk = &ref24_clk, | 339 | .clk = &ref24_clk, |
@@ -322,7 +343,7 @@ static struct clk_lookup lookups[] = { | |||
322 | }, { /* MMC0 */ | 343 | }, { /* MMC0 */ |
323 | .dev_id = "fpga:mmc0", | 344 | .dev_id = "fpga:mmc0", |
324 | .clk = &ref24_clk, | 345 | .clk = &ref24_clk, |
325 | }, { /* EB:CLCD */ | 346 | }, { /* CLCD is in the PB1176 and EB DevChip */ |
326 | .dev_id = "dev:clcd", | 347 | .dev_id = "dev:clcd", |
327 | .clk = &oscvco_clk, | 348 | .clk = &oscvco_clk, |
328 | }, { /* PB:CLCD */ | 349 | }, { /* PB:CLCD */ |
diff --git a/arch/arm/mach-realview/include/mach/board-pb1176.h b/arch/arm/mach-realview/include/mach/board-pb1176.h index 2f5ccb298858..002ab5d8c11c 100644 --- a/arch/arm/mach-realview/include/mach/board-pb1176.h +++ b/arch/arm/mach-realview/include/mach/board-pb1176.h | |||
@@ -26,6 +26,7 @@ | |||
26 | /* | 26 | /* |
27 | * Peripheral addresses | 27 | * Peripheral addresses |
28 | */ | 28 | */ |
29 | #define REALVIEW_PB1176_UART4_BASE 0x10009000 /* UART 4 */ | ||
29 | #define REALVIEW_PB1176_SCTL_BASE 0x10100000 /* System controller */ | 30 | #define REALVIEW_PB1176_SCTL_BASE 0x10100000 /* System controller */ |
30 | #define REALVIEW_PB1176_SMC_BASE 0x10111000 /* SMC */ | 31 | #define REALVIEW_PB1176_SMC_BASE 0x10111000 /* SMC */ |
31 | #define REALVIEW_PB1176_DMC_BASE 0x10109000 /* DMC configuration */ | 32 | #define REALVIEW_PB1176_DMC_BASE 0x10109000 /* DMC configuration */ |
diff --git a/arch/arm/mach-realview/realview_pb1176.c b/arch/arm/mach-realview/realview_pb1176.c index 099a1f125cf8..9f02350cff3b 100644 --- a/arch/arm/mach-realview/realview_pb1176.c +++ b/arch/arm/mach-realview/realview_pb1176.c | |||
@@ -144,8 +144,6 @@ static struct pl061_platform_data gpio2_plat_data = { | |||
144 | #define MPMC_DMA { 0, 0 } | 144 | #define MPMC_DMA { 0, 0 } |
145 | #define PB1176_CLCD_IRQ { IRQ_DC1176_CLCD, NO_IRQ } | 145 | #define PB1176_CLCD_IRQ { IRQ_DC1176_CLCD, NO_IRQ } |
146 | #define PB1176_CLCD_DMA { 0, 0 } | 146 | #define PB1176_CLCD_DMA { 0, 0 } |
147 | #define DMAC_IRQ { IRQ_PB1176_DMAC, NO_IRQ } | ||
148 | #define DMAC_DMA { 0, 0 } | ||
149 | #define SCTL_IRQ { NO_IRQ, NO_IRQ } | 147 | #define SCTL_IRQ { NO_IRQ, NO_IRQ } |
150 | #define SCTL_DMA { 0, 0 } | 148 | #define SCTL_DMA { 0, 0 } |
151 | #define PB1176_WATCHDOG_IRQ { IRQ_DC1176_WATCHDOG, NO_IRQ } | 149 | #define PB1176_WATCHDOG_IRQ { IRQ_DC1176_WATCHDOG, NO_IRQ } |
@@ -166,6 +164,8 @@ static struct pl061_platform_data gpio2_plat_data = { | |||
166 | #define PB1176_UART2_DMA { 11, 10 } | 164 | #define PB1176_UART2_DMA { 11, 10 } |
167 | #define PB1176_UART3_IRQ { IRQ_DC1176_UART3, NO_IRQ } | 165 | #define PB1176_UART3_IRQ { IRQ_DC1176_UART3, NO_IRQ } |
168 | #define PB1176_UART3_DMA { 0x86, 0x87 } | 166 | #define PB1176_UART3_DMA { 0x86, 0x87 } |
167 | #define PB1176_UART4_IRQ { IRQ_PB1176_UART4, NO_IRQ } | ||
168 | #define PB1176_UART4_DMA { 0, 0 } | ||
169 | #define PB1176_SSP_IRQ { IRQ_PB1176_SSP, NO_IRQ } | 169 | #define PB1176_SSP_IRQ { IRQ_PB1176_SSP, NO_IRQ } |
170 | #define PB1176_SSP_DMA { 9, 8 } | 170 | #define PB1176_SSP_DMA { 9, 8 } |
171 | 171 | ||
@@ -174,7 +174,7 @@ AMBA_DEVICE(aaci, "fpga:aaci", AACI, NULL); | |||
174 | AMBA_DEVICE(mmc0, "fpga:mmc0", MMCI0, &realview_mmc0_plat_data); | 174 | AMBA_DEVICE(mmc0, "fpga:mmc0", MMCI0, &realview_mmc0_plat_data); |
175 | AMBA_DEVICE(kmi0, "fpga:kmi0", KMI0, NULL); | 175 | AMBA_DEVICE(kmi0, "fpga:kmi0", KMI0, NULL); |
176 | AMBA_DEVICE(kmi1, "fpga:kmi1", KMI1, NULL); | 176 | AMBA_DEVICE(kmi1, "fpga:kmi1", KMI1, NULL); |
177 | AMBA_DEVICE(uart3, "fpga:uart3", PB1176_UART3, NULL); | 177 | AMBA_DEVICE(uart4, "fpga:uart4", PB1176_UART4, NULL); |
178 | 178 | ||
179 | /* DevChip Primecells */ | 179 | /* DevChip Primecells */ |
180 | AMBA_DEVICE(smc, "dev:smc", PB1176_SMC, NULL); | 180 | AMBA_DEVICE(smc, "dev:smc", PB1176_SMC, NULL); |
@@ -188,18 +188,16 @@ AMBA_DEVICE(sci0, "dev:sci0", SCI, NULL); | |||
188 | AMBA_DEVICE(uart0, "dev:uart0", PB1176_UART0, NULL); | 188 | AMBA_DEVICE(uart0, "dev:uart0", PB1176_UART0, NULL); |
189 | AMBA_DEVICE(uart1, "dev:uart1", PB1176_UART1, NULL); | 189 | AMBA_DEVICE(uart1, "dev:uart1", PB1176_UART1, NULL); |
190 | AMBA_DEVICE(uart2, "dev:uart2", PB1176_UART2, NULL); | 190 | AMBA_DEVICE(uart2, "dev:uart2", PB1176_UART2, NULL); |
191 | AMBA_DEVICE(uart3, "dev:uart3", PB1176_UART3, NULL); | ||
191 | AMBA_DEVICE(ssp0, "dev:ssp0", PB1176_SSP, NULL); | 192 | AMBA_DEVICE(ssp0, "dev:ssp0", PB1176_SSP, NULL); |
192 | 193 | AMBA_DEVICE(clcd, "dev:clcd", PB1176_CLCD, &clcd_plat_data); | |
193 | /* Primecells on the NEC ISSP chip */ | ||
194 | AMBA_DEVICE(clcd, "issp:clcd", PB1176_CLCD, &clcd_plat_data); | ||
195 | //AMBA_DEVICE(dmac, "issp:dmac", PB1176_DMAC, NULL); | ||
196 | 194 | ||
197 | static struct amba_device *amba_devs[] __initdata = { | 195 | static struct amba_device *amba_devs[] __initdata = { |
198 | // &dmac_device, | ||
199 | &uart0_device, | 196 | &uart0_device, |
200 | &uart1_device, | 197 | &uart1_device, |
201 | &uart2_device, | 198 | &uart2_device, |
202 | &uart3_device, | 199 | &uart3_device, |
200 | &uart4_device, | ||
203 | &smc_device, | 201 | &smc_device, |
204 | &clcd_device, | 202 | &clcd_device, |
205 | &sctl_device, | 203 | &sctl_device, |