diff options
Diffstat (limited to 'arch/arm/mach-realview/realview_eb.c')
-rw-r--r-- | arch/arm/mach-realview/realview_eb.c | 33 |
1 files changed, 11 insertions, 22 deletions
diff --git a/arch/arm/mach-realview/realview_eb.c b/arch/arm/mach-realview/realview_eb.c index eb829eb1ebe2..bed39ed97613 100644 --- a/arch/arm/mach-realview/realview_eb.c +++ b/arch/arm/mach-realview/realview_eb.c | |||
@@ -108,7 +108,7 @@ static struct map_desc realview_eb11mp_io_desc[] __initdata = { | |||
108 | static void __init realview_eb_map_io(void) | 108 | static void __init realview_eb_map_io(void) |
109 | { | 109 | { |
110 | iotable_init(realview_eb_io_desc, ARRAY_SIZE(realview_eb_io_desc)); | 110 | iotable_init(realview_eb_io_desc, ARRAY_SIZE(realview_eb_io_desc)); |
111 | if (core_tile_eb11mp()) | 111 | if (core_tile_eb11mp() || core_tile_a9mp()) |
112 | iotable_init(realview_eb11mp_io_desc, ARRAY_SIZE(realview_eb11mp_io_desc)); | 112 | iotable_init(realview_eb11mp_io_desc, ARRAY_SIZE(realview_eb11mp_io_desc)); |
113 | } | 113 | } |
114 | 114 | ||
@@ -242,12 +242,6 @@ static struct resource realview_eb_eth_resources[] = { | |||
242 | }, | 242 | }, |
243 | }; | 243 | }; |
244 | 244 | ||
245 | static struct platform_device realview_eb_eth_device = { | ||
246 | .id = 0, | ||
247 | .num_resources = ARRAY_SIZE(realview_eb_eth_resources), | ||
248 | .resource = realview_eb_eth_resources, | ||
249 | }; | ||
250 | |||
251 | /* | 245 | /* |
252 | * Detect and register the correct Ethernet device. RealView/EB rev D | 246 | * Detect and register the correct Ethernet device. RealView/EB rev D |
253 | * platforms use the newer SMSC LAN9118 Ethernet chip | 247 | * platforms use the newer SMSC LAN9118 Ethernet chip |
@@ -255,26 +249,24 @@ static struct platform_device realview_eb_eth_device = { | |||
255 | static int eth_device_register(void) | 249 | static int eth_device_register(void) |
256 | { | 250 | { |
257 | void __iomem *eth_addr = ioremap(REALVIEW_EB_ETH_BASE, SZ_4K); | 251 | void __iomem *eth_addr = ioremap(REALVIEW_EB_ETH_BASE, SZ_4K); |
252 | const char *name = NULL; | ||
258 | u32 idrev; | 253 | u32 idrev; |
259 | 254 | ||
260 | if (!eth_addr) | 255 | if (!eth_addr) |
261 | return -ENOMEM; | 256 | return -ENOMEM; |
262 | 257 | ||
263 | idrev = readl(eth_addr + 0x50); | 258 | idrev = readl(eth_addr + 0x50); |
264 | if ((idrev & 0xFFFF0000) == 0x01180000) | 259 | if ((idrev & 0xFFFF0000) != 0x01180000) |
265 | /* SMSC LAN9118 chip present */ | 260 | /* SMSC LAN9118 not present, use LAN91C111 instead */ |
266 | realview_eb_eth_device.name = "smc911x"; | 261 | name = "smc91x"; |
267 | else | ||
268 | /* SMSC 91C111 chip present */ | ||
269 | realview_eb_eth_device.name = "smc91x"; | ||
270 | 262 | ||
271 | iounmap(eth_addr); | 263 | iounmap(eth_addr); |
272 | return platform_device_register(&realview_eb_eth_device); | 264 | return realview_eth_register(name, realview_eb_eth_resources); |
273 | } | 265 | } |
274 | 266 | ||
275 | static void __init gic_init_irq(void) | 267 | static void __init gic_init_irq(void) |
276 | { | 268 | { |
277 | if (core_tile_eb11mp()) { | 269 | if (core_tile_eb11mp() || core_tile_a9mp()) { |
278 | unsigned int pldctrl; | 270 | unsigned int pldctrl; |
279 | 271 | ||
280 | /* new irq mode */ | 272 | /* new irq mode */ |
@@ -342,10 +334,9 @@ static void __init realview_eb_timer_init(void) | |||
342 | timer2_va_base = __io_address(REALVIEW_EB_TIMER2_3_BASE); | 334 | timer2_va_base = __io_address(REALVIEW_EB_TIMER2_3_BASE); |
343 | timer3_va_base = __io_address(REALVIEW_EB_TIMER2_3_BASE) + 0x20; | 335 | timer3_va_base = __io_address(REALVIEW_EB_TIMER2_3_BASE) + 0x20; |
344 | 336 | ||
345 | if (core_tile_eb11mp()) { | 337 | if (core_tile_eb11mp() || core_tile_a9mp()) { |
346 | #ifdef CONFIG_LOCAL_TIMERS | 338 | #ifdef CONFIG_LOCAL_TIMERS |
347 | twd_base_addr = __io_address(REALVIEW_EB11MP_TWD_BASE); | 339 | twd_base = __io_address(REALVIEW_EB11MP_TWD_BASE); |
348 | twd_size = REALVIEW_EB11MP_TWD_SIZE; | ||
349 | #endif | 340 | #endif |
350 | timer_irq = IRQ_EB11MP_TIMER0_1; | 341 | timer_irq = IRQ_EB11MP_TIMER0_1; |
351 | } else | 342 | } else |
@@ -362,7 +353,7 @@ static void __init realview_eb_init(void) | |||
362 | { | 353 | { |
363 | int i; | 354 | int i; |
364 | 355 | ||
365 | if (core_tile_eb11mp()) { | 356 | if (core_tile_eb11mp() || core_tile_a9mp()) { |
366 | realview_eb11mp_fixup(); | 357 | realview_eb11mp_fixup(); |
367 | 358 | ||
368 | #ifdef CONFIG_CACHE_L2X0 | 359 | #ifdef CONFIG_CACHE_L2X0 |
@@ -372,8 +363,6 @@ static void __init realview_eb_init(void) | |||
372 | #endif | 363 | #endif |
373 | } | 364 | } |
374 | 365 | ||
375 | clk_register(&realview_clcd_clk); | ||
376 | |||
377 | realview_flash_register(&realview_eb_flash_resource, 1); | 366 | realview_flash_register(&realview_eb_flash_resource, 1); |
378 | platform_device_register(&realview_i2c_device); | 367 | platform_device_register(&realview_i2c_device); |
379 | eth_device_register(); | 368 | eth_device_register(); |
@@ -392,7 +381,7 @@ MACHINE_START(REALVIEW_EB, "ARM-RealView EB") | |||
392 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ | 381 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ |
393 | .phys_io = REALVIEW_EB_UART0_BASE, | 382 | .phys_io = REALVIEW_EB_UART0_BASE, |
394 | .io_pg_offst = (IO_ADDRESS(REALVIEW_EB_UART0_BASE) >> 18) & 0xfffc, | 383 | .io_pg_offst = (IO_ADDRESS(REALVIEW_EB_UART0_BASE) >> 18) & 0xfffc, |
395 | .boot_params = 0x00000100, | 384 | .boot_params = PHYS_OFFSET + 0x00000100, |
396 | .map_io = realview_eb_map_io, | 385 | .map_io = realview_eb_map_io, |
397 | .init_irq = gic_init_irq, | 386 | .init_irq = gic_init_irq, |
398 | .timer = &realview_eb_timer, | 387 | .timer = &realview_eb_timer, |