aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-realview/realview_pb1176.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-realview/realview_pb1176.c')
-rw-r--r--arch/arm/mach-realview/realview_pb1176.c46
1 files changed, 36 insertions, 10 deletions
diff --git a/arch/arm/mach-realview/realview_pb1176.c b/arch/arm/mach-realview/realview_pb1176.c
index 099a1f125cf8..d2be12eb829e 100644
--- a/arch/arm/mach-realview/realview_pb1176.c
+++ b/arch/arm/mach-realview/realview_pb1176.c
@@ -25,6 +25,7 @@
25#include <linux/amba/bus.h> 25#include <linux/amba/bus.h>
26#include <linux/amba/pl061.h> 26#include <linux/amba/pl061.h>
27#include <linux/amba/mmci.h> 27#include <linux/amba/mmci.h>
28#include <linux/amba/pl022.h>
28#include <linux/io.h> 29#include <linux/io.h>
29 30
30#include <mach/hardware.h> 31#include <mach/hardware.h>
@@ -123,6 +124,12 @@ static struct pl061_platform_data gpio2_plat_data = {
123 .irq_base = -1, 124 .irq_base = -1,
124}; 125};
125 126
127static struct pl022_ssp_controller ssp0_plat_data = {
128 .bus_id = 0,
129 .enable_dma = 0,
130 .num_chipselect = 1,
131};
132
126/* 133/*
127 * RealView PB1176 AMBA devices 134 * RealView PB1176 AMBA devices
128 */ 135 */
@@ -144,8 +151,6 @@ static struct pl061_platform_data gpio2_plat_data = {
144#define MPMC_DMA { 0, 0 } 151#define MPMC_DMA { 0, 0 }
145#define PB1176_CLCD_IRQ { IRQ_DC1176_CLCD, NO_IRQ } 152#define PB1176_CLCD_IRQ { IRQ_DC1176_CLCD, NO_IRQ }
146#define PB1176_CLCD_DMA { 0, 0 } 153#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 } 154#define SCTL_IRQ { NO_IRQ, NO_IRQ }
150#define SCTL_DMA { 0, 0 } 155#define SCTL_DMA { 0, 0 }
151#define PB1176_WATCHDOG_IRQ { IRQ_DC1176_WATCHDOG, NO_IRQ } 156#define PB1176_WATCHDOG_IRQ { IRQ_DC1176_WATCHDOG, NO_IRQ }
@@ -166,7 +171,9 @@ static struct pl061_platform_data gpio2_plat_data = {
166#define PB1176_UART2_DMA { 11, 10 } 171#define PB1176_UART2_DMA { 11, 10 }
167#define PB1176_UART3_IRQ { IRQ_DC1176_UART3, NO_IRQ } 172#define PB1176_UART3_IRQ { IRQ_DC1176_UART3, NO_IRQ }
168#define PB1176_UART3_DMA { 0x86, 0x87 } 173#define PB1176_UART3_DMA { 0x86, 0x87 }
169#define PB1176_SSP_IRQ { IRQ_PB1176_SSP, NO_IRQ } 174#define PB1176_UART4_IRQ { IRQ_PB1176_UART4, NO_IRQ }
175#define PB1176_UART4_DMA { 0, 0 }
176#define PB1176_SSP_IRQ { IRQ_DC1176_SSP, NO_IRQ }
170#define PB1176_SSP_DMA { 9, 8 } 177#define PB1176_SSP_DMA { 9, 8 }
171 178
172/* FPGA Primecells */ 179/* FPGA Primecells */
@@ -174,7 +181,7 @@ AMBA_DEVICE(aaci, "fpga:aaci", AACI, NULL);
174AMBA_DEVICE(mmc0, "fpga:mmc0", MMCI0, &realview_mmc0_plat_data); 181AMBA_DEVICE(mmc0, "fpga:mmc0", MMCI0, &realview_mmc0_plat_data);
175AMBA_DEVICE(kmi0, "fpga:kmi0", KMI0, NULL); 182AMBA_DEVICE(kmi0, "fpga:kmi0", KMI0, NULL);
176AMBA_DEVICE(kmi1, "fpga:kmi1", KMI1, NULL); 183AMBA_DEVICE(kmi1, "fpga:kmi1", KMI1, NULL);
177AMBA_DEVICE(uart3, "fpga:uart3", PB1176_UART3, NULL); 184AMBA_DEVICE(uart4, "fpga:uart4", PB1176_UART4, NULL);
178 185
179/* DevChip Primecells */ 186/* DevChip Primecells */
180AMBA_DEVICE(smc, "dev:smc", PB1176_SMC, NULL); 187AMBA_DEVICE(smc, "dev:smc", PB1176_SMC, NULL);
@@ -188,18 +195,16 @@ AMBA_DEVICE(sci0, "dev:sci0", SCI, NULL);
188AMBA_DEVICE(uart0, "dev:uart0", PB1176_UART0, NULL); 195AMBA_DEVICE(uart0, "dev:uart0", PB1176_UART0, NULL);
189AMBA_DEVICE(uart1, "dev:uart1", PB1176_UART1, NULL); 196AMBA_DEVICE(uart1, "dev:uart1", PB1176_UART1, NULL);
190AMBA_DEVICE(uart2, "dev:uart2", PB1176_UART2, NULL); 197AMBA_DEVICE(uart2, "dev:uart2", PB1176_UART2, NULL);
191AMBA_DEVICE(ssp0, "dev:ssp0", PB1176_SSP, NULL); 198AMBA_DEVICE(uart3, "dev:uart3", PB1176_UART3, NULL);
192 199AMBA_DEVICE(ssp0, "dev:ssp0", PB1176_SSP, &ssp0_plat_data);
193/* Primecells on the NEC ISSP chip */ 200AMBA_DEVICE(clcd, "dev:clcd", PB1176_CLCD, &clcd_plat_data);
194AMBA_DEVICE(clcd, "issp:clcd", PB1176_CLCD, &clcd_plat_data);
195//AMBA_DEVICE(dmac, "issp:dmac", PB1176_DMAC, NULL);
196 201
197static struct amba_device *amba_devs[] __initdata = { 202static struct amba_device *amba_devs[] __initdata = {
198// &dmac_device,
199 &uart0_device, 203 &uart0_device,
200 &uart1_device, 204 &uart1_device,
201 &uart2_device, 205 &uart2_device,
202 &uart3_device, 206 &uart3_device,
207 &uart4_device,
203 &smc_device, 208 &smc_device,
204 &clcd_device, 209 &clcd_device,
205 &sctl_device, 210 &sctl_device,
@@ -276,6 +281,26 @@ static struct platform_device pmu_device = {
276 .resource = &pmu_resource, 281 .resource = &pmu_resource,
277}; 282};
278 283
284static struct resource char_lcd_resources[] = {
285 {
286 .start = REALVIEW_CHAR_LCD_BASE,
287 .end = (REALVIEW_CHAR_LCD_BASE + SZ_4K - 1),
288 .flags = IORESOURCE_MEM,
289 },
290 {
291 .start = IRQ_PB1176_CHARLCD,
292 .end = IRQ_PB1176_CHARLCD,
293 .flags = IORESOURCE_IRQ,
294 },
295};
296
297static struct platform_device char_lcd_device = {
298 .name = "arm-charlcd",
299 .id = -1,
300 .num_resources = ARRAY_SIZE(char_lcd_resources),
301 .resource = char_lcd_resources,
302};
303
279static void __init gic_init_irq(void) 304static void __init gic_init_irq(void)
280{ 305{
281 /* ARM1176 DevChip GIC, primary */ 306 /* ARM1176 DevChip GIC, primary */
@@ -338,6 +363,7 @@ static void __init realview_pb1176_init(void)
338 platform_device_register(&realview_i2c_device); 363 platform_device_register(&realview_i2c_device);
339 realview_usb_register(realview_pb1176_isp1761_resources); 364 realview_usb_register(realview_pb1176_isp1761_resources);
340 platform_device_register(&pmu_device); 365 platform_device_register(&pmu_device);
366 platform_device_register(&char_lcd_device);
341 367
342 for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { 368 for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
343 struct amba_device *d = amba_devs[i]; 369 struct amba_device *d = amba_devs[i];