From f086f23435bf42f700296f1be3878f6aa6e9b7dd Mon Sep 17 00:00:00 2001 From: Michael Hennerich Date: Tue, 20 May 2008 16:42:39 +0800 Subject: Blackfin arch: Cleanup no functional changes Singed-off-by: Michael Hennerich Signed-off-by: Bryan Wu --- arch/blackfin/kernel/gptimers.c | 2 +- arch/blackfin/mach-bf548/boards/cm_bf548.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/blackfin') diff --git a/arch/blackfin/kernel/gptimers.c b/arch/blackfin/kernel/gptimers.c index e698554895a7..3a3e9615b002 100644 --- a/arch/blackfin/kernel/gptimers.c +++ b/arch/blackfin/kernel/gptimers.c @@ -10,8 +10,8 @@ #include #include +#include -#include #include #include diff --git a/arch/blackfin/mach-bf548/boards/cm_bf548.c b/arch/blackfin/mach-bf548/boards/cm_bf548.c index 3b74f96d3590..4f4ae8787edf 100644 --- a/arch/blackfin/mach-bf548/boards/cm_bf548.c +++ b/arch/blackfin/mach-bf548/boards/cm_bf548.c @@ -684,7 +684,7 @@ static struct platform_device *cm_bf548_devices[] __initdata = { static int __init cm_bf548_init(void) { - printk(KERN_INFO "%s(): registering device resources\n", __FUNCTION__); + printk(KERN_INFO "%s(): registering device resources\n", __func__); platform_add_devices(cm_bf548_devices, ARRAY_SIZE(cm_bf548_devices)); #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) -- cgit v1.2.3 From ca56d9aaf2a135e0eb528df427f7dda15d077b11 Mon Sep 17 00:00:00 2001 From: Bryan Wu Date: Tue, 20 May 2008 16:45:29 +0800 Subject: Blackfin arch: Fix typo. it should be _outsw_8 Signed-off-by: Bryan Wu --- arch/blackfin/lib/outs.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/blackfin') diff --git a/arch/blackfin/lib/outs.S b/arch/blackfin/lib/outs.S index 3daf96035bf6..4685b7aa0080 100644 --- a/arch/blackfin/lib/outs.S +++ b/arch/blackfin/lib/outs.S @@ -76,4 +76,4 @@ ENTRY(_outsw_8) R0 = R0 + R1; .Lword8_loop_e: W[P0] = R0; RTS; -ENDPROC(_outsw) +ENDPROC(_outsw_8) -- cgit v1.2.3 From 2eb74ae20e65e71c2d5bf7b8ad7d0ac5d5acf55f Mon Sep 17 00:00:00 2001 From: Bryan Wu Date: Sat, 31 May 2008 15:17:25 +0800 Subject: Blackfin arch: Fix bug - set corret SSEL and IRQ to enable AD7877 on BF527 AD7877 use SSEL_2 (P9.9) and IRQ_PF8 (P9.14) on BF527 - populating JP3 to enable STAMP - disable SW11.2 to disconnect SSEL_2/PF12 from Rotary NAND - disable SW18.1 to disconnect SSEL_2 from MAX1233 touchscreen chip Signed-off-by: Bryan Wu --- arch/blackfin/mach-bf527/boards/ezkit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/blackfin') diff --git a/arch/blackfin/mach-bf527/boards/ezkit.c b/arch/blackfin/mach-bf527/boards/ezkit.c index bb6d58c931de..fa4f4e833e84 100644 --- a/arch/blackfin/mach-bf527/boards/ezkit.c +++ b/arch/blackfin/mach-bf527/boards/ezkit.c @@ -647,10 +647,10 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { { .modalias = "ad7877", .platform_data = &bfin_ad7877_ts_info, - .irq = IRQ_PF6, + .irq = IRQ_PF8, .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ .bus_num = 0, - .chip_select = 1, + .chip_select = 2, .controller_data = &spi_ad7877_chip_info, }, #endif -- cgit v1.2.3 From b06dcee9c8d24ef903dc0d192af22b8e179eef4b Mon Sep 17 00:00:00 2001 From: Michael Hennerich Date: Sat, 31 May 2008 15:35:40 +0800 Subject: Blackfin arch: Remove bad and usless code Signed-off-by: Michael Hennerich Signed-off-by: Bryan Wu --- arch/blackfin/mach-bf537/boards/Makefile | 2 +- arch/blackfin/mach-bf537/boards/led.S | 183 ------------------------------- arch/blackfin/mach-bf548/boards/Makefile | 2 +- arch/blackfin/mach-bf548/boards/led.S | 172 ----------------------------- 4 files changed, 2 insertions(+), 357 deletions(-) delete mode 100644 arch/blackfin/mach-bf537/boards/led.S delete mode 100644 arch/blackfin/mach-bf548/boards/led.S (limited to 'arch/blackfin') diff --git a/arch/blackfin/mach-bf537/boards/Makefile b/arch/blackfin/mach-bf537/boards/Makefile index 87e450f29e37..c94f7a5b8211 100644 --- a/arch/blackfin/mach-bf537/boards/Makefile +++ b/arch/blackfin/mach-bf537/boards/Makefile @@ -3,7 +3,7 @@ # obj-$(CONFIG_GENERIC_BF537_BOARD) += generic_board.o -obj-$(CONFIG_BFIN537_STAMP) += stamp.o led.o +obj-$(CONFIG_BFIN537_STAMP) += stamp.o obj-$(CONFIG_BFIN537_BLUETECHNIX_CM) += cm_bf537.o obj-$(CONFIG_PNAV10) += pnav10.o obj-$(CONFIG_CAMSIG_MINOTAUR) += minotaur.o diff --git a/arch/blackfin/mach-bf537/boards/led.S b/arch/blackfin/mach-bf537/boards/led.S deleted file mode 100644 index 4e9ea4283e5f..000000000000 --- a/arch/blackfin/mach-bf537/boards/led.S +++ /dev/null @@ -1,183 +0,0 @@ -/**************************************************** - * LED1 ---- PF6 LED2 ---- PF7 * - * LED3 ---- PF8 LED4 ---- PF9 * - * LED5 ---- PF10 LED6 ---- PF11 * - ****************************************************/ - -#include -#include - -/* All functions in this file save the registers they uses. - So there is no need to save any registers before calling them. */ - - .text; - -/* Initialize LEDs. */ - -ENTRY(_led_init) - LINK 12; - [--SP] = P0; - [--SP] = R0; - [--SP] = R1; - [--SP] = R2; - R1 = PF6|PF7|PF8|PF9|PF10|PF11 (Z); - R2 = ~R1; - - P0.H = hi(PORTF_FER); - P0.L = lo(PORTF_FER); - R0 = W[P0](Z); - SSYNC; - R0 = R0 & R2; - W[P0] = R0.L; - SSYNC; - - P0.H = hi(PORTFIO_DIR); - P0.L = lo(PORTFIO_DIR); - R0 = W[P0](Z); - SSYNC; - R0 = R0 | R1; - W[P0] = R0.L; - SSYNC; - - P0.H = hi(PORTFIO_INEN); - P0.L = lo(PORTFIO_INEN); - R0 = W[P0](Z); - SSYNC; - R0 = R0 & R2; - W[P0] = R0.L; - SSYNC; - - R2 = [SP++]; - R1 = [SP++]; - R0 = [SP++]; - P0 = [SP++]; - UNLINK; - RTS; - .size _led_init, .-_led_init - -/* Set one LED on. Leave other LEDs unchanged. - It expects the LED number passed through R0. */ - -ENTRY(_led_on) - LINK 12; - [--SP] = P0; - [--SP] = R1; - CALL _led_init; - R1 = 1; - R0 += 5; - R1 <<= R0; - P0.H = hi(PORTFIO); - P0.L = lo(PORTFIO); - R0 = W[P0](Z); - SSYNC; - R0 = R0 | R1; - W[P0] = R0.L; - SSYNC; - R1 = [SP++]; - P0 = [SP++]; - UNLINK; - RTS; - .size _led_on, .-_led_on - -/* Set one LED off. Leave other LEDs unchanged. */ - -ENTRY(_led_off) - LINK 12; - [--SP] = P0; - [--SP] = R1; - CALL _led_init; - R1 = 1; - R0 += 5; - R1 <<= R0; - R1 = ~R1; - P0.H = hi(PORTFIO); - P0.L = lo(PORTFIO); - R0 = W[P0](Z); - SSYNC; - R0 = R0 & R1; - W[P0] = R0.L; - SSYNC; - R1 = [SP++]; - P0 = [SP++]; - UNLINK; - RTS; - .size _led_off, .-_led_off - -/* Toggle one LED. Leave other LEDs unchanged. */ - -ENTRY(_led_toggle) - LINK 12; - [--SP] = P0; - [--SP] = R1; - CALL _led_init; - R1 = 1; - R0 += 5; - R1 <<= R0; - P0.H = hi(PORTFIO); - P0.L = lo(PORTFIO); - R0 = W[P0](Z); - SSYNC; - R0 = R0 ^ R1; - W[P0] = R0.L; - SSYNC; - R1 = [SP++]; - P0 = [SP++]; - UNLINK; - RTS; - .size _led_toggle, .-_led_toggle - -/* Display the number using LEDs in binary format. */ - -ENTRY(_led_disp_num) - LINK 12; - [--SP] = P0; - [--SP] = R1; - [--SP] = R2; - CALL _led_init; - R1 = 0x3f(X); - R0 = R0 & R1; - R2 = 6(X); - R0 <<= R2; - R1 <<= R2; - P0.H = hi(PORTFIO); - P0.L = lo(PORTFIO); - R2 = W[P0](Z); - SSYNC; - R1 = ~R1; - R2 = R2 & R1; - R2 = R2 | R0; - W[P0] = R2.L; - SSYNC; - R2 = [SP++]; - R1 = [SP++]; - P0 = [SP++]; - UNLINK; - RTS; - .size _led_disp_num, .-_led_disp_num - -/* Toggle the number using LEDs in binary format. */ - -ENTRY(_led_toggle_num) - LINK 12; - [--SP] = P0; - [--SP] = R1; - [--SP] = R2; - CALL _led_init; - R1 = 0x3f(X); - R0 = R0 & R1; - R1 = 6(X); - R0 <<= R1; - P0.H = hi(PORTFIO); - P0.L = lo(PORTFIO); - R1 = W[P0](Z); - SSYNC; - R1 = R1 ^ R0; - W[P0] = R1.L; - SSYNC; - R2 = [SP++]; - R1 = [SP++]; - P0 = [SP++]; - UNLINK; - RTS; - .size _led_toggle_num, .-_led_toggle_num - diff --git a/arch/blackfin/mach-bf548/boards/Makefile b/arch/blackfin/mach-bf548/boards/Makefile index eed161dd7845..319ef54c4221 100644 --- a/arch/blackfin/mach-bf548/boards/Makefile +++ b/arch/blackfin/mach-bf548/boards/Makefile @@ -2,5 +2,5 @@ # arch/blackfin/mach-bf548/boards/Makefile # -obj-$(CONFIG_BFIN548_EZKIT) += ezkit.o led.o +obj-$(CONFIG_BFIN548_EZKIT) += ezkit.o obj-$(CONFIG_BFIN548_BLUETECHNIX_CM) += cm_bf548.o diff --git a/arch/blackfin/mach-bf548/boards/led.S b/arch/blackfin/mach-bf548/boards/led.S deleted file mode 100644 index f47daf3770d0..000000000000 --- a/arch/blackfin/mach-bf548/boards/led.S +++ /dev/null @@ -1,172 +0,0 @@ -/**************************************************** - * LED1 ---- PG6 LED2 ---- PG7 * - * LED3 ---- PG8 LED4 ---- PG9 * - * LED5 ---- PG10 LED6 ---- PG11 * - ****************************************************/ - -#include -#include - -/* All functions in this file save the registers they uses. - So there is no need to save any registers before calling them. */ - - .text; - -/* Initialize LEDs. */ - -ENTRY(_led_init) - LINK 0; - [--SP] = P0; - [--SP] = R0; - [--SP] = R1; - [--SP] = R2; - R1 = (PG6|PG7|PG8|PG9|PG10|PG11)(Z); - R2 = ~R1; - - P0.H = hi(PORTG_FER); - P0.L = lo(PORTG_FER); - R0 = W[P0](Z); - SSYNC; - R0 = R0 & R2; - W[P0] = R0.L; - SSYNC; - - P0.H = hi(PORTG_DIR_SET); - P0.L = lo(PORTG_DIR_SET); - W[P0] = R1.L; - SSYNC; - - P0.H = hi(PORTG_INEN); - P0.L = lo(PORTG_INEN); - R0 = W[P0](Z); - SSYNC; - R0 = R0 & R2; - W[P0] = R0.L; - SSYNC; - - R2 = [SP++]; - R1 = [SP++]; - R0 = [SP++]; - P0 = [SP++]; - RTS; - .size _led_init, .-_led_init - -/* Set one LED on. Leave other LEDs unchanged. - It expects the LED number passed through R0. */ - -ENTRY(_led_on) - LINK 0; - [--SP] = P0; - [--SP] = R1; - CALL _led_init; - R1 = 1; - R0 += 5; - R1 <<= R0; - P0.H = hi(PORTG_SET); - P0.L = lo(PORTG_SET); - W[P0] = R1.L; - SSYNC; - R1 = [SP++]; - P0 = [SP++]; - UNLINK; - RTS; - .size _led_on, .-_led_on - -/* Set one LED off. Leave other LEDs unchanged. */ - -ENTRY(_led_off) - LINK 0; - [--SP] = P0; - [--SP] = R1; - CALL _led_init; - R1 = 1; - R0 += 5; - R1 <<= R0; - P0.H = hi(PORTG_CLEAR); - P0.L = lo(PORTG_CLEAR); - W[P0] = R1.L; - SSYNC; - R1 = [SP++]; - P0 = [SP++]; - UNLINK; - RTS; - .size _led_off, .-_led_off - -/* Toggle one LED. Leave other LEDs unchanged. */ - -ENTRY(_led_toggle) - LINK 0; - [--SP] = P0; - [--SP] = R1; - CALL _led_init; - R1 = 1; - R0 += 5; - R1 <<= R0; - P0.H = hi(PORTG); - P0.L = lo(PORTG); - R0 = W[P0](Z); - SSYNC; - R0 = R0 ^ R1; - W[P0] = R0.L; - SSYNC; - R1 = [SP++]; - P0 = [SP++]; - UNLINK; - RTS; - .size _led_toggle, .-_led_toggle - -/* Display the number using LEDs in binary format. */ - -ENTRY(_led_disp_num) - LINK 0; - [--SP] = P0; - [--SP] = R1; - [--SP] = R2; - CALL _led_init; - R1 = 0x3f(X); - R0 = R0 & R1; - R2 = 6(X); - R0 <<= R2; - R1 <<= R2; - P0.H = hi(PORTG); - P0.L = lo(PORTG); - R2 = W[P0](Z); - SSYNC; - R1 = ~R1; - R2 = R2 & R1; - R2 = R2 | R0; - W[P0] = R2.L; - SSYNC; - R2 = [SP++]; - R1 = [SP++]; - P0 = [SP++]; - UNLINK; - RTS; - .size _led_disp_num, .-_led_disp_num - -/* Toggle the number using LEDs in binary format. */ - -ENTRY(_led_toggle_num) - LINK 0; - [--SP] = P0; - [--SP] = R1; - [--SP] = R2; - CALL _led_init; - R1 = 0x3f(X); - R0 = R0 & R1; - R1 = 6(X); - R0 <<= R1; - P0.H = hi(PORTG); - P0.L = lo(PORTG); - R1 = W[P0](Z); - SSYNC; - R1 = R1 ^ R0; - W[P0] = R1.L; - SSYNC; - R2 = [SP++]; - R1 = [SP++]; - P0 = [SP++]; - UNLINK; - RTS; - .size _led_toggle_num, .-_led_toggle_num - -- cgit v1.2.3 From bd628bd085c459838d38f93f2f154f1a2e019e48 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 3 Jun 2008 12:23:45 +0800 Subject: Blackfin arch: fixup warnings with the new cplb saved values Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu --- arch/blackfin/kernel/traps.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'arch/blackfin') diff --git a/arch/blackfin/kernel/traps.c b/arch/blackfin/kernel/traps.c index 7bfbd958980c..f061f5181623 100644 --- a/arch/blackfin/kernel/traps.c +++ b/arch/blackfin/kernel/traps.c @@ -67,7 +67,7 @@ void __init trap_init(void) CSYNC(); } -void *saved_icplb_fault_addr, *saved_dcplb_fault_addr; +unsigned long saved_icplb_fault_addr, saved_dcplb_fault_addr; int kstack_depth_to_print = 48; @@ -366,7 +366,7 @@ asmlinkage void trap_c(struct pt_regs *fp) info.si_code = ILL_CPLB_MULHIT; sig = SIGSEGV; #ifdef CONFIG_DEBUG_HUNT_FOR_ZERO - if (saved_dcplb_fault_addr < (void *)FIXED_CODE_START) + if (saved_dcplb_fault_addr < FIXED_CODE_START) printk(KERN_NOTICE "NULL pointer access\n"); else #endif @@ -421,7 +421,7 @@ asmlinkage void trap_c(struct pt_regs *fp) info.si_code = ILL_CPLB_MULHIT; sig = SIGSEGV; #ifdef CONFIG_DEBUG_HUNT_FOR_ZERO - if (saved_icplb_fault_addr < (void *)FIXED_CODE_START) + if (saved_icplb_fault_addr < FIXED_CODE_START) printk(KERN_NOTICE "Jump to NULL address\n"); else #endif @@ -939,8 +939,6 @@ void panic_cplb_error(int cplb_panic, struct pt_regs *fp) oops_in_progress = 1; - printk(KERN_EMERG "DCPLB_FAULT_ADDR=%p\n", saved_dcplb_fault_addr); - printk(KERN_EMERG "ICPLB_FAULT_ADDR=%p\n", saved_icplb_fault_addr); dump_bfin_process(fp); dump_bfin_mem(fp); show_regs(fp); -- cgit v1.2.3 From 5bda27235b24146cf870de663141ee4fbfa8a70b Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 7 Jun 2008 15:03:01 +0800 Subject: Blackfin arch: protect only the SPI bus controller with CONFIG_SPI_BFIN Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu --- arch/blackfin/mach-bf527/boards/ezkit.c | 9 ++------- arch/blackfin/mach-bf533/boards/ezkit.c | 6 +----- arch/blackfin/mach-bf533/boards/stamp.c | 10 +++------- arch/blackfin/mach-bf537/boards/stamp.c | 9 ++------- arch/blackfin/mach-bf548/boards/ezkit.c | 10 +++------- arch/blackfin/mach-bf561/boards/ezkit.c | 9 +++------ 6 files changed, 14 insertions(+), 39 deletions(-) (limited to 'arch/blackfin') diff --git a/arch/blackfin/mach-bf527/boards/ezkit.c b/arch/blackfin/mach-bf527/boards/ezkit.c index fa4f4e833e84..5958eecefcf1 100644 --- a/arch/blackfin/mach-bf527/boards/ezkit.c +++ b/arch/blackfin/mach-bf527/boards/ezkit.c @@ -451,9 +451,6 @@ static struct platform_device net2272_bfin_device = { }; #endif -#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) -/* all SPI peripherals info goes here */ - #if defined(CONFIG_MTD_M25P80) \ || defined(CONFIG_MTD_M25P80_MODULE) static struct mtd_partition bfin_spi_flash_partitions[] = { @@ -676,6 +673,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { #endif }; +#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) /* SPI controller data */ static struct bfin5xx_spi_master bfin_spi0_info = { .num_chipselect = 8, @@ -1018,10 +1016,7 @@ static int __init stamp_init(void) #endif platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); -#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) - spi_register_board_info(bfin_spi_board_info, - ARRAY_SIZE(bfin_spi_board_info)); -#endif + spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) irq_desc[PATA_INT].status |= IRQ_NOAUTOEN; diff --git a/arch/blackfin/mach-bf533/boards/ezkit.c b/arch/blackfin/mach-bf533/boards/ezkit.c index 9d28415163ea..079389cbd859 100644 --- a/arch/blackfin/mach-bf533/boards/ezkit.c +++ b/arch/blackfin/mach-bf533/boards/ezkit.c @@ -87,9 +87,6 @@ static struct platform_device smc91x_device = { }; #endif -#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) -/* all SPI peripherals info goes here */ - #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) static struct mtd_partition bfin_spi_flash_partitions[] = { { @@ -189,6 +186,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { #endif }; +#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) /* SPI (0) */ static struct resource bfin_spi0_resource[] = { [0] = { @@ -425,9 +423,7 @@ static int __init ezkit_init(void) { printk(KERN_INFO "%s(): registering device resources\n", __func__); platform_add_devices(ezkit_devices, ARRAY_SIZE(ezkit_devices)); -#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); -#endif #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) irq_desc[PATA_INT].status |= IRQ_NOAUTOEN; diff --git a/arch/blackfin/mach-bf533/boards/stamp.c b/arch/blackfin/mach-bf533/boards/stamp.c index ec05b236dc3f..13ae49515f73 100644 --- a/arch/blackfin/mach-bf533/boards/stamp.c +++ b/arch/blackfin/mach-bf533/boards/stamp.c @@ -161,9 +161,6 @@ static struct platform_device stamp_flash_device = { }; #endif -#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) -/* all SPI peripherals info goes here */ - #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) static struct mtd_partition bfin_spi_flash_partitions[] = { { @@ -320,6 +317,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { #endif }; +#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) /* SPI (0) */ static struct resource bfin_spi0_resource[] = { [0] = { @@ -626,10 +624,8 @@ static int __init stamp_init(void) SSYNC(); #endif -#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) - spi_register_board_info(bfin_spi_board_info, - ARRAY_SIZE(bfin_spi_board_info)); -#endif + spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); + #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) irq_desc[PATA_INT].status |= IRQ_NOAUTOEN; #endif diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c index 9a756d1f3d73..671f9d67f23a 100644 --- a/arch/blackfin/mach-bf537/boards/stamp.c +++ b/arch/blackfin/mach-bf537/boards/stamp.c @@ -400,9 +400,6 @@ static struct platform_device stamp_flash_device = { }; #endif -#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) -/* all SPI peripherals info goes here */ - #if defined(CONFIG_MTD_M25P80) \ || defined(CONFIG_MTD_M25P80_MODULE) static struct mtd_partition bfin_spi_flash_partitions[] = { @@ -629,6 +626,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { #endif }; +#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) /* SPI controller data */ static struct bfin5xx_spi_master bfin_spi0_info = { .num_chipselect = 8, @@ -939,10 +937,7 @@ static int __init stamp_init(void) #endif platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); -#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) - spi_register_board_info(bfin_spi_board_info, - ARRAY_SIZE(bfin_spi_board_info)); -#endif + spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) irq_desc[PATA_INT].status |= IRQ_NOAUTOEN; diff --git a/arch/blackfin/mach-bf548/boards/ezkit.c b/arch/blackfin/mach-bf548/boards/ezkit.c index d1682bb37509..af7c211a580e 100644 --- a/arch/blackfin/mach-bf548/boards/ezkit.c +++ b/arch/blackfin/mach-bf548/boards/ezkit.c @@ -412,8 +412,6 @@ static struct platform_device ezkit_flash_device = { }; #endif -#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) -/* all SPI peripherals info goes here */ #if defined(CONFIG_MTD_M25P80) \ || defined(CONFIG_MTD_M25P80_MODULE) /* SPI flash chip (m25p16) */ @@ -481,7 +479,7 @@ static struct bfin5xx_spi_chip spidev_chip_info = { }; #endif -static struct spi_board_info bf54x_spi_board_info[] __initdata = { +static struct spi_board_info bfin_spi_board_info[] __initdata = { #if defined(CONFIG_MTD_M25P80) \ || defined(CONFIG_MTD_M25P80_MODULE) { @@ -527,6 +525,7 @@ static struct spi_board_info bf54x_spi_board_info[] __initdata = { #endif }; +#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) /* SPI (0) */ static struct resource bfin_spi0_resource[] = { [0] = { @@ -800,10 +799,7 @@ static int __init ezkit_init(void) platform_add_devices(ezkit_devices, ARRAY_SIZE(ezkit_devices)); -#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) - spi_register_board_info(bf54x_spi_board_info, - ARRAY_SIZE(bf54x_spi_board_info)); -#endif + spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); return 0; } diff --git a/arch/blackfin/mach-bf561/boards/ezkit.c b/arch/blackfin/mach-bf561/boards/ezkit.c index 61d8f7648b24..bc6feded8569 100644 --- a/arch/blackfin/mach-bf561/boards/ezkit.c +++ b/arch/blackfin/mach-bf561/boards/ezkit.c @@ -280,7 +280,6 @@ static struct platform_device ezkit_flash_device = { }; #endif -#ifdef CONFIG_SPI_BFIN #if defined(CONFIG_SND_BLACKFIN_AD1836) \ || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) static struct bfin5xx_spi_chip ad1836_spi_chip_info = { @@ -295,8 +294,8 @@ static struct bfin5xx_spi_chip spidev_chip_info = { .bits_per_word = 8, }; #endif -#endif +#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) /* SPI (0) */ static struct resource bfin_spi0_resource[] = { [0] = { @@ -327,6 +326,7 @@ static struct platform_device bfin_spi0_device = { .platform_data = &bfin_spi0_info, /* Passed to driver */ }, }; +#endif static struct spi_board_info bfin_spi_board_info[] __initdata = { #if defined(CONFIG_SND_BLACKFIN_AD1836) \ @@ -537,10 +537,7 @@ static int __init ezkit_init(void) SSYNC(); #endif -#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) - spi_register_board_info(bfin_spi_board_info, - ARRAY_SIZE(bfin_spi_board_info)); -#endif + spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) irq_desc[PATA_INT].status |= IRQ_NOAUTOEN; -- cgit v1.2.3