diff options
author | Mike Frysinger <vapier.adi@gmail.com> | 2008-06-07 03:03:01 -0400 |
---|---|---|
committer | Bryan Wu <cooloney@kernel.org> | 2008-06-07 03:03:01 -0400 |
commit | 5bda27235b24146cf870de663141ee4fbfa8a70b (patch) | |
tree | 053b0b0049a2243ba73587b78ee35c71e472ae57 /arch/blackfin | |
parent | bd628bd085c459838d38f93f2f154f1a2e019e48 (diff) |
Blackfin arch: protect only the SPI bus controller with CONFIG_SPI_BFIN
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Diffstat (limited to 'arch/blackfin')
-rw-r--r-- | arch/blackfin/mach-bf527/boards/ezkit.c | 9 | ||||
-rw-r--r-- | arch/blackfin/mach-bf533/boards/ezkit.c | 6 | ||||
-rw-r--r-- | arch/blackfin/mach-bf533/boards/stamp.c | 10 | ||||
-rw-r--r-- | arch/blackfin/mach-bf537/boards/stamp.c | 9 | ||||
-rw-r--r-- | arch/blackfin/mach-bf548/boards/ezkit.c | 10 | ||||
-rw-r--r-- | arch/blackfin/mach-bf561/boards/ezkit.c | 9 |
6 files changed, 14 insertions, 39 deletions
diff --git a/arch/blackfin/mach-bf527/boards/ezkit.c b/arch/blackfin/mach-bf527/boards/ezkit.c index fa4f4e833e8..5958eecefcf 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 = { | |||
451 | }; | 451 | }; |
452 | #endif | 452 | #endif |
453 | 453 | ||
454 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | ||
455 | /* all SPI peripherals info goes here */ | ||
456 | |||
457 | #if defined(CONFIG_MTD_M25P80) \ | 454 | #if defined(CONFIG_MTD_M25P80) \ |
458 | || defined(CONFIG_MTD_M25P80_MODULE) | 455 | || defined(CONFIG_MTD_M25P80_MODULE) |
459 | static struct mtd_partition bfin_spi_flash_partitions[] = { | 456 | static struct mtd_partition bfin_spi_flash_partitions[] = { |
@@ -676,6 +673,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
676 | #endif | 673 | #endif |
677 | }; | 674 | }; |
678 | 675 | ||
676 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | ||
679 | /* SPI controller data */ | 677 | /* SPI controller data */ |
680 | static struct bfin5xx_spi_master bfin_spi0_info = { | 678 | static struct bfin5xx_spi_master bfin_spi0_info = { |
681 | .num_chipselect = 8, | 679 | .num_chipselect = 8, |
@@ -1018,10 +1016,7 @@ static int __init stamp_init(void) | |||
1018 | #endif | 1016 | #endif |
1019 | 1017 | ||
1020 | platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); | 1018 | platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); |
1021 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | 1019 | spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); |
1022 | spi_register_board_info(bfin_spi_board_info, | ||
1023 | ARRAY_SIZE(bfin_spi_board_info)); | ||
1024 | #endif | ||
1025 | 1020 | ||
1026 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) | 1021 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) |
1027 | irq_desc[PATA_INT].status |= IRQ_NOAUTOEN; | 1022 | 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 9d28415163e..079389cbd85 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 = { | |||
87 | }; | 87 | }; |
88 | #endif | 88 | #endif |
89 | 89 | ||
90 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | ||
91 | /* all SPI peripherals info goes here */ | ||
92 | |||
93 | #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) | 90 | #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) |
94 | static struct mtd_partition bfin_spi_flash_partitions[] = { | 91 | static struct mtd_partition bfin_spi_flash_partitions[] = { |
95 | { | 92 | { |
@@ -189,6 +186,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
189 | #endif | 186 | #endif |
190 | }; | 187 | }; |
191 | 188 | ||
189 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | ||
192 | /* SPI (0) */ | 190 | /* SPI (0) */ |
193 | static struct resource bfin_spi0_resource[] = { | 191 | static struct resource bfin_spi0_resource[] = { |
194 | [0] = { | 192 | [0] = { |
@@ -425,9 +423,7 @@ static int __init ezkit_init(void) | |||
425 | { | 423 | { |
426 | printk(KERN_INFO "%s(): registering device resources\n", __func__); | 424 | printk(KERN_INFO "%s(): registering device resources\n", __func__); |
427 | platform_add_devices(ezkit_devices, ARRAY_SIZE(ezkit_devices)); | 425 | platform_add_devices(ezkit_devices, ARRAY_SIZE(ezkit_devices)); |
428 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | ||
429 | spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); | 426 | spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); |
430 | #endif | ||
431 | 427 | ||
432 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) | 428 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) |
433 | irq_desc[PATA_INT].status |= IRQ_NOAUTOEN; | 429 | 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 ec05b236dc3..13ae49515f7 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 = { | |||
161 | }; | 161 | }; |
162 | #endif | 162 | #endif |
163 | 163 | ||
164 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | ||
165 | /* all SPI peripherals info goes here */ | ||
166 | |||
167 | #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) | 164 | #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) |
168 | static struct mtd_partition bfin_spi_flash_partitions[] = { | 165 | static struct mtd_partition bfin_spi_flash_partitions[] = { |
169 | { | 166 | { |
@@ -320,6 +317,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
320 | #endif | 317 | #endif |
321 | }; | 318 | }; |
322 | 319 | ||
320 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | ||
323 | /* SPI (0) */ | 321 | /* SPI (0) */ |
324 | static struct resource bfin_spi0_resource[] = { | 322 | static struct resource bfin_spi0_resource[] = { |
325 | [0] = { | 323 | [0] = { |
@@ -626,10 +624,8 @@ static int __init stamp_init(void) | |||
626 | SSYNC(); | 624 | SSYNC(); |
627 | #endif | 625 | #endif |
628 | 626 | ||
629 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | 627 | spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); |
630 | spi_register_board_info(bfin_spi_board_info, | 628 | |
631 | ARRAY_SIZE(bfin_spi_board_info)); | ||
632 | #endif | ||
633 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) | 629 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) |
634 | irq_desc[PATA_INT].status |= IRQ_NOAUTOEN; | 630 | irq_desc[PATA_INT].status |= IRQ_NOAUTOEN; |
635 | #endif | 631 | #endif |
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c index 9a756d1f3d7..671f9d67f23 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 = { | |||
400 | }; | 400 | }; |
401 | #endif | 401 | #endif |
402 | 402 | ||
403 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | ||
404 | /* all SPI peripherals info goes here */ | ||
405 | |||
406 | #if defined(CONFIG_MTD_M25P80) \ | 403 | #if defined(CONFIG_MTD_M25P80) \ |
407 | || defined(CONFIG_MTD_M25P80_MODULE) | 404 | || defined(CONFIG_MTD_M25P80_MODULE) |
408 | static struct mtd_partition bfin_spi_flash_partitions[] = { | 405 | static struct mtd_partition bfin_spi_flash_partitions[] = { |
@@ -629,6 +626,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
629 | #endif | 626 | #endif |
630 | }; | 627 | }; |
631 | 628 | ||
629 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | ||
632 | /* SPI controller data */ | 630 | /* SPI controller data */ |
633 | static struct bfin5xx_spi_master bfin_spi0_info = { | 631 | static struct bfin5xx_spi_master bfin_spi0_info = { |
634 | .num_chipselect = 8, | 632 | .num_chipselect = 8, |
@@ -939,10 +937,7 @@ static int __init stamp_init(void) | |||
939 | #endif | 937 | #endif |
940 | 938 | ||
941 | platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); | 939 | platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); |
942 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | 940 | spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); |
943 | spi_register_board_info(bfin_spi_board_info, | ||
944 | ARRAY_SIZE(bfin_spi_board_info)); | ||
945 | #endif | ||
946 | 941 | ||
947 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) | 942 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) |
948 | irq_desc[PATA_INT].status |= IRQ_NOAUTOEN; | 943 | 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 d1682bb3750..af7c211a580 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 = { | |||
412 | }; | 412 | }; |
413 | #endif | 413 | #endif |
414 | 414 | ||
415 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | ||
416 | /* all SPI peripherals info goes here */ | ||
417 | #if defined(CONFIG_MTD_M25P80) \ | 415 | #if defined(CONFIG_MTD_M25P80) \ |
418 | || defined(CONFIG_MTD_M25P80_MODULE) | 416 | || defined(CONFIG_MTD_M25P80_MODULE) |
419 | /* SPI flash chip (m25p16) */ | 417 | /* SPI flash chip (m25p16) */ |
@@ -481,7 +479,7 @@ static struct bfin5xx_spi_chip spidev_chip_info = { | |||
481 | }; | 479 | }; |
482 | #endif | 480 | #endif |
483 | 481 | ||
484 | static struct spi_board_info bf54x_spi_board_info[] __initdata = { | 482 | static struct spi_board_info bfin_spi_board_info[] __initdata = { |
485 | #if defined(CONFIG_MTD_M25P80) \ | 483 | #if defined(CONFIG_MTD_M25P80) \ |
486 | || defined(CONFIG_MTD_M25P80_MODULE) | 484 | || defined(CONFIG_MTD_M25P80_MODULE) |
487 | { | 485 | { |
@@ -527,6 +525,7 @@ static struct spi_board_info bf54x_spi_board_info[] __initdata = { | |||
527 | #endif | 525 | #endif |
528 | }; | 526 | }; |
529 | 527 | ||
528 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | ||
530 | /* SPI (0) */ | 529 | /* SPI (0) */ |
531 | static struct resource bfin_spi0_resource[] = { | 530 | static struct resource bfin_spi0_resource[] = { |
532 | [0] = { | 531 | [0] = { |
@@ -800,10 +799,7 @@ static int __init ezkit_init(void) | |||
800 | 799 | ||
801 | platform_add_devices(ezkit_devices, ARRAY_SIZE(ezkit_devices)); | 800 | platform_add_devices(ezkit_devices, ARRAY_SIZE(ezkit_devices)); |
802 | 801 | ||
803 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | 802 | spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); |
804 | spi_register_board_info(bf54x_spi_board_info, | ||
805 | ARRAY_SIZE(bf54x_spi_board_info)); | ||
806 | #endif | ||
807 | 803 | ||
808 | return 0; | 804 | return 0; |
809 | } | 805 | } |
diff --git a/arch/blackfin/mach-bf561/boards/ezkit.c b/arch/blackfin/mach-bf561/boards/ezkit.c index 61d8f7648b2..bc6feded856 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 = { | |||
280 | }; | 280 | }; |
281 | #endif | 281 | #endif |
282 | 282 | ||
283 | #ifdef CONFIG_SPI_BFIN | ||
284 | #if defined(CONFIG_SND_BLACKFIN_AD1836) \ | 283 | #if defined(CONFIG_SND_BLACKFIN_AD1836) \ |
285 | || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) | 284 | || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) |
286 | static struct bfin5xx_spi_chip ad1836_spi_chip_info = { | 285 | static struct bfin5xx_spi_chip ad1836_spi_chip_info = { |
@@ -295,8 +294,8 @@ static struct bfin5xx_spi_chip spidev_chip_info = { | |||
295 | .bits_per_word = 8, | 294 | .bits_per_word = 8, |
296 | }; | 295 | }; |
297 | #endif | 296 | #endif |
298 | #endif | ||
299 | 297 | ||
298 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | ||
300 | /* SPI (0) */ | 299 | /* SPI (0) */ |
301 | static struct resource bfin_spi0_resource[] = { | 300 | static struct resource bfin_spi0_resource[] = { |
302 | [0] = { | 301 | [0] = { |
@@ -327,6 +326,7 @@ static struct platform_device bfin_spi0_device = { | |||
327 | .platform_data = &bfin_spi0_info, /* Passed to driver */ | 326 | .platform_data = &bfin_spi0_info, /* Passed to driver */ |
328 | }, | 327 | }, |
329 | }; | 328 | }; |
329 | #endif | ||
330 | 330 | ||
331 | static struct spi_board_info bfin_spi_board_info[] __initdata = { | 331 | static struct spi_board_info bfin_spi_board_info[] __initdata = { |
332 | #if defined(CONFIG_SND_BLACKFIN_AD1836) \ | 332 | #if defined(CONFIG_SND_BLACKFIN_AD1836) \ |
@@ -537,10 +537,7 @@ static int __init ezkit_init(void) | |||
537 | SSYNC(); | 537 | SSYNC(); |
538 | #endif | 538 | #endif |
539 | 539 | ||
540 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | 540 | spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); |
541 | spi_register_board_info(bfin_spi_board_info, | ||
542 | ARRAY_SIZE(bfin_spi_board_info)); | ||
543 | #endif | ||
544 | 541 | ||
545 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) | 542 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) |
546 | irq_desc[PATA_INT].status |= IRQ_NOAUTOEN; | 543 | irq_desc[PATA_INT].status |= IRQ_NOAUTOEN; |