aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-realview/realview_eb.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-realview/realview_eb.c')
-rw-r--r--arch/arm/mach-realview/realview_eb.c123
1 files changed, 122 insertions, 1 deletions
diff --git a/arch/arm/mach-realview/realview_eb.c b/arch/arm/mach-realview/realview_eb.c
index 9c992568ee40..afcf27ceac57 100644
--- a/arch/arm/mach-realview/realview_eb.c
+++ b/arch/arm/mach-realview/realview_eb.c
@@ -109,6 +109,69 @@ static void __init realview_eb_map_io(void)
109 iotable_init(realview_eb_io_desc, ARRAY_SIZE(realview_eb_io_desc)); 109 iotable_init(realview_eb_io_desc, ARRAY_SIZE(realview_eb_io_desc));
110} 110}
111 111
112/*
113 * RealView EB AMBA devices
114 */
115
116/*
117 * These devices are connected via the core APB bridge
118 */
119#define GPIO2_IRQ { IRQ_EB_GPIO2, NO_IRQ }
120#define GPIO2_DMA { 0, 0 }
121#define GPIO3_IRQ { IRQ_EB_GPIO3, NO_IRQ }
122#define GPIO3_DMA { 0, 0 }
123
124#define AACI_IRQ { IRQ_EB_AACI, NO_IRQ }
125#define AACI_DMA { 0x80, 0x81 }
126#define MMCI0_IRQ { IRQ_EB_MMCI0A, IRQ_EB_MMCI0B }
127#define MMCI0_DMA { 0x84, 0 }
128#define KMI0_IRQ { IRQ_EB_KMI0, NO_IRQ }
129#define KMI0_DMA { 0, 0 }
130#define KMI1_IRQ { IRQ_EB_KMI1, NO_IRQ }
131#define KMI1_DMA { 0, 0 }
132
133/*
134 * These devices are connected directly to the multi-layer AHB switch
135 */
136#define SMC_IRQ { NO_IRQ, NO_IRQ }
137#define SMC_DMA { 0, 0 }
138#define MPMC_IRQ { NO_IRQ, NO_IRQ }
139#define MPMC_DMA { 0, 0 }
140#define CLCD_IRQ { IRQ_EB_CLCD, NO_IRQ }
141#define CLCD_DMA { 0, 0 }
142#define DMAC_IRQ { IRQ_EB_DMA, NO_IRQ }
143#define DMAC_DMA { 0, 0 }
144
145/*
146 * These devices are connected via the core APB bridge
147 */
148#define SCTL_IRQ { NO_IRQ, NO_IRQ }
149#define SCTL_DMA { 0, 0 }
150#define WATCHDOG_IRQ { IRQ_EB_WDOG, NO_IRQ }
151#define WATCHDOG_DMA { 0, 0 }
152#define GPIO0_IRQ { IRQ_EB_GPIO0, NO_IRQ }
153#define GPIO0_DMA { 0, 0 }
154#define GPIO1_IRQ { IRQ_EB_GPIO1, NO_IRQ }
155#define GPIO1_DMA { 0, 0 }
156#define RTC_IRQ { IRQ_EB_RTC, NO_IRQ }
157#define RTC_DMA { 0, 0 }
158
159/*
160 * These devices are connected via the DMA APB bridge
161 */
162#define SCI_IRQ { IRQ_EB_SCI, NO_IRQ }
163#define SCI_DMA { 7, 6 }
164#define UART0_IRQ { IRQ_EB_UART0, NO_IRQ }
165#define UART0_DMA { 15, 14 }
166#define UART1_IRQ { IRQ_EB_UART1, NO_IRQ }
167#define UART1_DMA { 13, 12 }
168#define UART2_IRQ { IRQ_EB_UART2, NO_IRQ }
169#define UART2_DMA { 11, 10 }
170#define UART3_IRQ { IRQ_EB_UART3, NO_IRQ }
171#define UART3_DMA { 0x86, 0x87 }
172#define SSP_IRQ { IRQ_EB_SSP, NO_IRQ }
173#define SSP_DMA { 9, 8 }
174
112/* FPGA Primecells */ 175/* FPGA Primecells */
113AMBA_DEVICE(aaci, "fpga:04", AACI, NULL); 176AMBA_DEVICE(aaci, "fpga:04", AACI, NULL);
114AMBA_DEVICE(mmc0, "fpga:05", MMCI0, &realview_mmc0_plat_data); 177AMBA_DEVICE(mmc0, "fpga:05", MMCI0, &realview_mmc0_plat_data);
@@ -154,6 +217,30 @@ static struct amba_device *amba_devs[] __initdata = {
154 &kmi1_device, 217 &kmi1_device,
155}; 218};
156 219
220/*
221 * RealView EB platform devices
222 */
223
224static struct resource realview_eb_smc91x_resources[] = {
225 [0] = {
226 .start = REALVIEW_ETH_BASE,
227 .end = REALVIEW_ETH_BASE + SZ_64K - 1,
228 .flags = IORESOURCE_MEM,
229 },
230 [1] = {
231 .start = IRQ_EB_ETH,
232 .end = IRQ_EB_ETH,
233 .flags = IORESOURCE_IRQ,
234 },
235};
236
237static struct platform_device realview_eb_smc91x_device = {
238 .name = "smc91x",
239 .id = 0,
240 .num_resources = ARRAY_SIZE(realview_eb_smc91x_resources),
241 .resource = realview_eb_smc91x_resources,
242};
243
157static void __init gic_init_irq(void) 244static void __init gic_init_irq(void)
158{ 245{
159#ifdef CONFIG_REALVIEW_MPCORE 246#ifdef CONFIG_REALVIEW_MPCORE
@@ -173,11 +260,45 @@ static void __init gic_init_irq(void)
173#endif 260#endif
174} 261}
175 262
263#ifdef CONFIG_REALVIEW_MPCORE
264/*
265 * Fix up the IRQ numbers for the RealView EB/ARM11MPCore tile
266 */
267static void realview_eb11mp_fixup(void)
268{
269 /* AMBA devices */
270 dmac_device.irq[0] = IRQ_EB11MP_DMA;
271 uart0_device.irq[0] = IRQ_EB11MP_UART0;
272 uart1_device.irq[0] = IRQ_EB11MP_UART1;
273 uart2_device.irq[0] = IRQ_EB11MP_UART2;
274 uart3_device.irq[0] = IRQ_EB11MP_UART3;
275 clcd_device.irq[0] = IRQ_EB11MP_CLCD;
276 wdog_device.irq[0] = IRQ_EB11MP_WDOG;
277 gpio0_device.irq[0] = IRQ_EB11MP_GPIO0;
278 gpio1_device.irq[0] = IRQ_EB11MP_GPIO1;
279 gpio2_device.irq[0] = IRQ_EB11MP_GPIO2;
280 rtc_device.irq[0] = IRQ_EB11MP_RTC;
281 sci0_device.irq[0] = IRQ_EB11MP_SCI;
282 ssp0_device.irq[0] = IRQ_EB11MP_SSP;
283 aaci_device.irq[0] = IRQ_EB11MP_AACI;
284 mmc0_device.irq[0] = IRQ_EB11MP_MMCI0A;
285 mmc0_device.irq[1] = IRQ_EB11MP_MMCI0B;
286 kmi0_device.irq[0] = IRQ_EB11MP_KMI0;
287 kmi1_device.irq[0] = IRQ_EB11MP_KMI1;
288
289 /* platform devices */
290 realview_eb_smc91x_resources[1].start = IRQ_EB11MP_ETH;
291 realview_eb_smc91x_resources[1].end = IRQ_EB11MP_ETH;
292}
293#endif
294
176static void __init realview_eb_init(void) 295static void __init realview_eb_init(void)
177{ 296{
178 int i; 297 int i;
179 298
180#ifdef CONFIG_REALVIEW_MPCORE 299#ifdef CONFIG_REALVIEW_MPCORE
300 realview_eb11mp_fixup();
301
181 /* 1MB (128KB/way), 8-way associativity, evmon/parity/share enabled 302 /* 1MB (128KB/way), 8-way associativity, evmon/parity/share enabled
182 * Bits: .... ...0 0111 1001 0000 .... .... .... */ 303 * Bits: .... ...0 0111 1001 0000 .... .... .... */
183 l2x0_init(__io_address(REALVIEW_MPCORE_L220_BASE), 0x00790000, 0xfe000fff); 304 l2x0_init(__io_address(REALVIEW_MPCORE_L220_BASE), 0x00790000, 0xfe000fff);
@@ -185,7 +306,7 @@ static void __init realview_eb_init(void)
185 clk_register(&realview_clcd_clk); 306 clk_register(&realview_clcd_clk);
186 307
187 platform_device_register(&realview_flash_device); 308 platform_device_register(&realview_flash_device);
188 platform_device_register(&realview_smc91x_device); 309 platform_device_register(&realview_eb_smc91x_device);
189 platform_device_register(&realview_i2c_device); 310 platform_device_register(&realview_i2c_device);
190 311
191 for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { 312 for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {