diff options
-rw-r--r-- | arch/blackfin/kernel/setup.c | 20 | ||||
-rw-r--r-- | arch/blackfin/mach-bf533/boards/stamp.c | 19 | ||||
-rw-r--r-- | arch/blackfin/mach-bf561/boards/ezkit.c | 15 |
3 files changed, 28 insertions, 26 deletions
diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c index c456ee5c1b4a..b6ac6f8067b8 100644 --- a/arch/blackfin/kernel/setup.c +++ b/arch/blackfin/kernel/setup.c | |||
@@ -383,35 +383,19 @@ void __init setup_arch(char **cmdline_p) | |||
383 | 383 | ||
384 | bf53x_cache_init(); | 384 | bf53x_cache_init(); |
385 | 385 | ||
386 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) | ||
387 | # if defined(CONFIG_BFIN_SHARED_FLASH_ENET) && defined(CONFIG_BFIN533_STAMP) | ||
388 | /* setup BF533_STAMP CPLD to route AMS3 to Ethernet MAC */ | ||
389 | bfin_write_FIO_DIR(bfin_read_FIO_DIR() | (1 << CONFIG_ENET_FLASH_PIN)); | ||
390 | bfin_write_FIO_FLAG_S(1 << CONFIG_ENET_FLASH_PIN); | ||
391 | SSYNC(); | ||
392 | # endif | ||
393 | # if defined (CONFIG_BFIN561_EZKIT) | ||
394 | bfin_write_FIO0_DIR(bfin_read_FIO0_DIR() | (1 << 12)); | ||
395 | SSYNC(); | ||
396 | # endif /* defined (CONFIG_BFIN561_EZKIT) */ | ||
397 | #endif | ||
398 | |||
399 | printk(KERN_INFO "Hardware Trace Enabled\n"); | 386 | printk(KERN_INFO "Hardware Trace Enabled\n"); |
400 | bfin_write_TBUFCTL(0x03); | 387 | bfin_write_TBUFCTL(0x03); |
401 | } | 388 | } |
402 | 389 | ||
403 | #if defined(CONFIG_BF561) | ||
404 | static struct cpu cpu[2]; | ||
405 | #else | ||
406 | static struct cpu cpu[1]; | ||
407 | #endif | ||
408 | static int __init topology_init(void) | 390 | static int __init topology_init(void) |
409 | { | 391 | { |
410 | #if defined (CONFIG_BF561) | 392 | #if defined (CONFIG_BF561) |
393 | static struct cpu cpu[2]; | ||
411 | register_cpu(&cpu[0], 0); | 394 | register_cpu(&cpu[0], 0); |
412 | register_cpu(&cpu[1], 1); | 395 | register_cpu(&cpu[1], 1); |
413 | return 0; | 396 | return 0; |
414 | #else | 397 | #else |
398 | static struct cpu cpu[1]; | ||
415 | return register_cpu(cpu, 0); | 399 | return register_cpu(cpu, 0); |
416 | #endif | 400 | #endif |
417 | } | 401 | } |
diff --git a/arch/blackfin/mach-bf533/boards/stamp.c b/arch/blackfin/mach-bf533/boards/stamp.c index 7d3dfcbc54aa..9a472fe15833 100644 --- a/arch/blackfin/mach-bf533/boards/stamp.c +++ b/arch/blackfin/mach-bf533/boards/stamp.c | |||
@@ -338,12 +338,25 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
338 | 338 | ||
339 | static int __init stamp_init(void) | 339 | static int __init stamp_init(void) |
340 | { | 340 | { |
341 | int ret; | ||
342 | |||
341 | printk(KERN_INFO "%s(): registering device resources\n", __FUNCTION__); | 343 | printk(KERN_INFO "%s(): registering device resources\n", __FUNCTION__); |
342 | platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); | 344 | ret = platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); |
345 | if (ret < 0) | ||
346 | return ret; | ||
347 | |||
348 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) | ||
349 | # if defined(CONFIG_BFIN_SHARED_FLASH_ENET) | ||
350 | /* setup BF533_STAMP CPLD to route AMS3 to Ethernet MAC */ | ||
351 | bfin_write_FIO_DIR(bfin_read_FIO_DIR() | (1 << CONFIG_ENET_FLASH_PIN)); | ||
352 | bfin_write_FIO_FLAG_S(1 << CONFIG_ENET_FLASH_PIN); | ||
353 | SSYNC(); | ||
354 | # endif | ||
355 | #endif | ||
356 | |||
343 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | 357 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) |
344 | spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); | 358 | return spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); |
345 | #endif | 359 | #endif |
346 | return 0; | ||
347 | } | 360 | } |
348 | 361 | ||
349 | arch_initcall(stamp_init); | 362 | arch_initcall(stamp_init); |
diff --git a/arch/blackfin/mach-bf561/boards/ezkit.c b/arch/blackfin/mach-bf561/boards/ezkit.c index e8d4058dd7db..9720b5c307ab 100644 --- a/arch/blackfin/mach-bf561/boards/ezkit.c +++ b/arch/blackfin/mach-bf561/boards/ezkit.c | |||
@@ -184,13 +184,18 @@ static int __init ezkit_init(void) | |||
184 | { | 184 | { |
185 | int ret; | 185 | int ret; |
186 | 186 | ||
187 | printk(KERN_INFO "%s(): registering device resources\n", __FUNCTION__); | 187 | printk(KERN_INFO "%s(): registering device resources\n", __func__); |
188 | ret = platform_add_devices(ezkit_devices, | 188 | |
189 | ARRAY_SIZE(ezkit_devices)); | 189 | ret = platform_add_devices(ezkit_devices, ARRAY_SIZE(ezkit_devices)); |
190 | if (ret < 0) | 190 | if (ret < 0) |
191 | return ret; | 191 | return ret; |
192 | return spi_register_board_info(bfin_spi_board_info, | 192 | |
193 | ARRAY_SIZE(bfin_spi_board_info)); | 193 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) |
194 | bfin_write_FIO0_DIR(bfin_read_FIO0_DIR() | (1 << 12)); | ||
195 | SSYNC(); | ||
196 | #endif | ||
197 | |||
198 | return spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); | ||
194 | } | 199 | } |
195 | 200 | ||
196 | arch_initcall(ezkit_init); | 201 | arch_initcall(ezkit_init); |