aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-bf561/boards
diff options
context:
space:
mode:
authorSteven Miao <realmz6@gmail.com>2014-04-11 14:07:27 -0400
committerSteven Miao <realmz6@gmail.com>2014-04-11 20:48:01 -0400
commitc4a2c58d20953ff1080f50f705cdd952f6d301b2 (patch)
tree9e604fad91d728839cbbea1549248339729a1829 /arch/blackfin/mach-bf561/boards
parentf8ef77d9389f9b52fe80de4f1b236af3391420b8 (diff)
blackfin: cleanup board files
using IS_ENABLED() macro instead of defined(CONFIG_XXX) || defined(CONFIG_XXX_MODULE) Signed-off-by: Steven Miao <realmz6@gmail.com>
Diffstat (limited to 'arch/blackfin/mach-bf561/boards')
-rw-r--r--arch/blackfin/mach-bf561/boards/acvilon.c28
-rw-r--r--arch/blackfin/mach-bf561/boards/cm_bf561.c56
-rw-r--r--arch/blackfin/mach-bf561/boards/ezkit.c74
-rw-r--r--arch/blackfin/mach-bf561/boards/tepla.c8
4 files changed, 80 insertions, 86 deletions
diff --git a/arch/blackfin/mach-bf561/boards/acvilon.c b/arch/blackfin/mach-bf561/boards/acvilon.c
index 0b74218fdd3a..430b16d5ccb1 100644
--- a/arch/blackfin/mach-bf561/boards/acvilon.c
+++ b/arch/blackfin/mach-bf561/boards/acvilon.c
@@ -60,7 +60,7 @@
60 */ 60 */
61const char bfin_board_name[] = "Acvilon board"; 61const char bfin_board_name[] = "Acvilon board";
62 62
63#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) 63#if IS_ENABLED(CONFIG_USB_ISP1760_HCD)
64#include <linux/usb/isp1760.h> 64#include <linux/usb/isp1760.h>
65static struct resource bfin_isp1760_resources[] = { 65static struct resource bfin_isp1760_resources[] = {
66 [0] = { 66 [0] = {
@@ -137,7 +137,7 @@ static struct i2c_board_info acvilon_i2c_devs[] __initdata = {
137 }, 137 },
138}; 138};
139 139
140#if defined(CONFIG_MTD_PLATRAM) || defined(CONFIG_MTD_PLATRAM_MODULE) 140#if IS_ENABLED(CONFIG_MTD_PLATRAM)
141static struct platdata_mtd_ram mtd_ram_data = { 141static struct platdata_mtd_ram mtd_ram_data = {
142 .mapname = "rootfs(RAM)", 142 .mapname = "rootfs(RAM)",
143 .bankwidth = 4, 143 .bankwidth = 4,
@@ -160,7 +160,7 @@ static struct platform_device mtd_ram_device = {
160}; 160};
161#endif 161#endif
162 162
163#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) 163#if IS_ENABLED(CONFIG_SMSC911X)
164#include <linux/smsc911x.h> 164#include <linux/smsc911x.h>
165static struct resource smsc911x_resources[] = { 165static struct resource smsc911x_resources[] = {
166 { 166 {
@@ -194,7 +194,7 @@ static struct platform_device smsc911x_device = {
194}; 194};
195#endif 195#endif
196 196
197#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 197#if IS_ENABLED(CONFIG_SERIAL_BFIN)
198#ifdef CONFIG_SERIAL_BFIN_UART0 198#ifdef CONFIG_SERIAL_BFIN_UART0
199static struct resource bfin_uart0_resources[] = { 199static struct resource bfin_uart0_resources[] = {
200 { 200 {
@@ -246,7 +246,7 @@ static struct platform_device bfin_uart0_device = {
246#endif 246#endif
247#endif 247#endif
248 248
249#if defined(CONFIG_MTD_NAND_PLATFORM) || defined(CONFIG_MTD_NAND_PLATFORM_MODULE) 249#if IS_ENABLED(CONFIG_MTD_NAND_PLATFORM)
250 250
251static struct mtd_partition bfin_plat_nand_partitions[] = { 251static struct mtd_partition bfin_plat_nand_partitions[] = {
252 { 252 {
@@ -323,7 +323,7 @@ static void bfin_plat_nand_init(void)
323} 323}
324#endif 324#endif
325 325
326#if defined(CONFIG_MTD_DATAFLASH) || defined(CONFIG_MTD_DATAFLASH_MODULE) 326#if IS_ENABLED(CONFIG_MTD_DATAFLASH)
327static struct mtd_partition bfin_spi_dataflash_partitions[] = { 327static struct mtd_partition bfin_spi_dataflash_partitions[] = {
328 { 328 {
329 .name = "bootloader", 329 .name = "bootloader",
@@ -369,7 +369,7 @@ static struct bfin5xx_spi_chip data_flash_chip_info = {
369}; 369};
370#endif 370#endif
371 371
372#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 372#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
373/* SPI (0) */ 373/* SPI (0) */
374static struct resource bfin_spi0_resource[] = { 374static struct resource bfin_spi0_resource[] = {
375 [0] = { 375 [0] = {
@@ -408,7 +408,7 @@ static struct platform_device bfin_spi0_device = {
408#endif 408#endif
409 409
410static struct spi_board_info bfin_spi_board_info[] __initdata = { 410static struct spi_board_info bfin_spi_board_info[] __initdata = {
411#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 411#if IS_ENABLED(CONFIG_SPI_SPIDEV)
412 { 412 {
413 .modalias = "spidev", 413 .modalias = "spidev",
414 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 414 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
@@ -416,7 +416,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
416 .chip_select = 3, 416 .chip_select = 3,
417 }, 417 },
418#endif 418#endif
419#if defined(CONFIG_MTD_DATAFLASH) || defined(CONFIG_MTD_DATAFLASH_MODULE) 419#if IS_ENABLED(CONFIG_MTD_DATAFLASH)
420 { /* DataFlash chip */ 420 { /* DataFlash chip */
421 .modalias = "mtd_dataflash", 421 .modalias = "mtd_dataflash",
422 .max_speed_hz = 33250000, /* max spi clock (SCK) speed in HZ */ 422 .max_speed_hz = 33250000, /* max spi clock (SCK) speed in HZ */
@@ -472,11 +472,11 @@ static struct platform_device bfin_dpmc = {
472static struct platform_device *acvilon_devices[] __initdata = { 472static struct platform_device *acvilon_devices[] __initdata = {
473 &bfin_dpmc, 473 &bfin_dpmc,
474 474
475#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 475#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
476 &bfin_spi0_device, 476 &bfin_spi0_device,
477#endif 477#endif
478 478
479#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 479#if IS_ENABLED(CONFIG_SERIAL_BFIN)
480#ifdef CONFIG_SERIAL_BFIN_UART0 480#ifdef CONFIG_SERIAL_BFIN_UART0
481 &bfin_uart0_device, 481 &bfin_uart0_device,
482#endif 482#endif
@@ -484,17 +484,17 @@ static struct platform_device *acvilon_devices[] __initdata = {
484 484
485 &bfin_gpios_device, 485 &bfin_gpios_device,
486 486
487#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) 487#if IS_ENABLED(CONFIG_SMSC911X)
488 &smsc911x_device, 488 &smsc911x_device,
489#endif 489#endif
490 490
491 &bfin_i2c_pca_device, 491 &bfin_i2c_pca_device,
492 492
493#if defined(CONFIG_MTD_NAND_PLATFORM) || defined(CONFIG_MTD_NAND_PLATFORM_MODULE) 493#if IS_ENABLED(CONFIG_MTD_NAND_PLATFORM)
494 &bfin_async_nand_device, 494 &bfin_async_nand_device,
495#endif 495#endif
496 496
497#if defined(CONFIG_MTD_PLATRAM) || defined(CONFIG_MTD_PLATRAM_MODULE) 497#if IS_ENABLED(CONFIG_MTD_PLATRAM)
498 &mtd_ram_device, 498 &mtd_ram_device,
499#endif 499#endif
500 500
diff --git a/arch/blackfin/mach-bf561/boards/cm_bf561.c b/arch/blackfin/mach-bf561/boards/cm_bf561.c
index d81450f635df..9f777df4cacc 100644
--- a/arch/blackfin/mach-bf561/boards/cm_bf561.c
+++ b/arch/blackfin/mach-bf561/boards/cm_bf561.c
@@ -13,7 +13,7 @@
13#include <linux/mtd/partitions.h> 13#include <linux/mtd/partitions.h>
14#include <linux/spi/spi.h> 14#include <linux/spi/spi.h>
15#include <linux/spi/flash.h> 15#include <linux/spi/flash.h>
16#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 16#if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
17#include <linux/usb/isp1362.h> 17#include <linux/usb/isp1362.h>
18#endif 18#endif
19#include <linux/ata_platform.h> 19#include <linux/ata_platform.h>
@@ -29,10 +29,10 @@
29 */ 29 */
30const char bfin_board_name[] = "Bluetechnix CM BF561"; 30const char bfin_board_name[] = "Bluetechnix CM BF561";
31 31
32#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 32#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
33/* all SPI peripherals info goes here */ 33/* all SPI peripherals info goes here */
34 34
35#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) 35#if IS_ENABLED(CONFIG_MTD_M25P80)
36static struct mtd_partition bfin_spi_flash_partitions[] = { 36static struct mtd_partition bfin_spi_flash_partitions[] = {
37 { 37 {
38 .name = "bootloader(spi)", 38 .name = "bootloader(spi)",
@@ -64,7 +64,7 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = {
64#endif 64#endif
65 65
66static struct spi_board_info bfin_spi_board_info[] __initdata = { 66static struct spi_board_info bfin_spi_board_info[] __initdata = {
67#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) 67#if IS_ENABLED(CONFIG_MTD_M25P80)
68 { 68 {
69 /* the modalias must be the same as spi device driver name */ 69 /* the modalias must be the same as spi device driver name */
70 .modalias = "m25p80", /* Name of spi_driver for this device */ 70 .modalias = "m25p80", /* Name of spi_driver for this device */
@@ -77,7 +77,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
77 }, 77 },
78#endif 78#endif
79 79
80#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) 80#if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD183X)
81 { 81 {
82 .modalias = "ad183x", 82 .modalias = "ad183x",
83 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 83 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
@@ -85,7 +85,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
85 .chip_select = 4, 85 .chip_select = 4,
86 }, 86 },
87#endif 87#endif
88#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 88#if IS_ENABLED(CONFIG_MMC_SPI)
89 { 89 {
90 .modalias = "mmc_spi", 90 .modalias = "mmc_spi",
91 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ 91 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
@@ -134,14 +134,14 @@ static struct platform_device bfin_spi0_device = {
134#endif /* spi master and devices */ 134#endif /* spi master and devices */
135 135
136 136
137#if defined(CONFIG_FB_HITACHI_TX09) || defined(CONFIG_FB_HITACHI_TX09_MODULE) 137#if IS_ENABLED(CONFIG_FB_HITACHI_TX09)
138static struct platform_device hitachi_fb_device = { 138static struct platform_device hitachi_fb_device = {
139 .name = "hitachi-tx09", 139 .name = "hitachi-tx09",
140}; 140};
141#endif 141#endif
142 142
143 143
144#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 144#if IS_ENABLED(CONFIG_SMC91X)
145#include <linux/smc91x.h> 145#include <linux/smc91x.h>
146 146
147static struct smc91x_platdata smc91x_info = { 147static struct smc91x_platdata smc91x_info = {
@@ -173,7 +173,7 @@ static struct platform_device smc91x_device = {
173}; 173};
174#endif 174#endif
175 175
176#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) 176#if IS_ENABLED(CONFIG_SMSC911X)
177#include <linux/smsc911x.h> 177#include <linux/smsc911x.h>
178 178
179static struct resource smsc911x_resources[] = { 179static struct resource smsc911x_resources[] = {
@@ -208,7 +208,7 @@ static struct platform_device smsc911x_device = {
208}; 208};
209#endif 209#endif
210 210
211#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 211#if IS_ENABLED(CONFIG_USB_NET2272)
212static struct resource net2272_bfin_resources[] = { 212static struct resource net2272_bfin_resources[] = {
213 { 213 {
214 .start = 0x24000000, 214 .start = 0x24000000,
@@ -229,7 +229,7 @@ static struct platform_device net2272_bfin_device = {
229}; 229};
230#endif 230#endif
231 231
232#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 232#if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
233static struct resource isp1362_hcd_resources[] = { 233static struct resource isp1362_hcd_resources[] = {
234 { 234 {
235 .start = 0x24008000, 235 .start = 0x24008000,
@@ -268,7 +268,7 @@ static struct platform_device isp1362_hcd_device = {
268}; 268};
269#endif 269#endif
270 270
271#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 271#if IS_ENABLED(CONFIG_SERIAL_BFIN)
272#ifdef CONFIG_SERIAL_BFIN_UART0 272#ifdef CONFIG_SERIAL_BFIN_UART0
273static struct resource bfin_uart0_resources[] = { 273static struct resource bfin_uart0_resources[] = {
274 { 274 {
@@ -319,7 +319,7 @@ static struct platform_device bfin_uart0_device = {
319#endif 319#endif
320#endif 320#endif
321 321
322#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 322#if IS_ENABLED(CONFIG_BFIN_SIR)
323#ifdef CONFIG_BFIN_SIR0 323#ifdef CONFIG_BFIN_SIR0
324static struct resource bfin_sir0_resources[] = { 324static struct resource bfin_sir0_resources[] = {
325 { 325 {
@@ -348,7 +348,7 @@ static struct platform_device bfin_sir0_device = {
348#endif 348#endif
349#endif 349#endif
350 350
351#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 351#if IS_ENABLED(CONFIG_PATA_PLATFORM)
352#define PATA_INT IRQ_PF46 352#define PATA_INT IRQ_PF46
353 353
354static struct pata_platform_info bfin_pata_platform_data = { 354static struct pata_platform_info bfin_pata_platform_data = {
@@ -385,7 +385,7 @@ static struct platform_device bfin_pata_device = {
385}; 385};
386#endif 386#endif
387 387
388#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 388#if IS_ENABLED(CONFIG_MTD_PHYSMAP)
389static struct mtd_partition para_partitions[] = { 389static struct mtd_partition para_partitions[] = {
390 { 390 {
391 .name = "bootloader(nor)", 391 .name = "bootloader(nor)",
@@ -456,54 +456,54 @@ static struct platform_device *cm_bf561_devices[] __initdata = {
456 456
457 &bfin_dpmc, 457 &bfin_dpmc,
458 458
459#if defined(CONFIG_FB_HITACHI_TX09) || defined(CONFIG_FB_HITACHI_TX09_MODULE) 459#if IS_ENABLED(CONFIG_FB_HITACHI_TX09)
460 &hitachi_fb_device, 460 &hitachi_fb_device,
461#endif 461#endif
462 462
463#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 463#if IS_ENABLED(CONFIG_SERIAL_BFIN)
464#ifdef CONFIG_SERIAL_BFIN_UART0 464#ifdef CONFIG_SERIAL_BFIN_UART0
465 &bfin_uart0_device, 465 &bfin_uart0_device,
466#endif 466#endif
467#endif 467#endif
468 468
469#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 469#if IS_ENABLED(CONFIG_BFIN_SIR)
470#ifdef CONFIG_BFIN_SIR0 470#ifdef CONFIG_BFIN_SIR0
471 &bfin_sir0_device, 471 &bfin_sir0_device,
472#endif 472#endif
473#endif 473#endif
474 474
475#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 475#if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
476 &isp1362_hcd_device, 476 &isp1362_hcd_device,
477#endif 477#endif
478 478
479#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 479#if IS_ENABLED(CONFIG_SMC91X)
480 &smc91x_device, 480 &smc91x_device,
481#endif 481#endif
482 482
483#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) 483#if IS_ENABLED(CONFIG_SMSC911X)
484 &smsc911x_device, 484 &smsc911x_device,
485#endif 485#endif
486 486
487#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 487#if IS_ENABLED(CONFIG_USB_NET2272)
488 &net2272_bfin_device, 488 &net2272_bfin_device,
489#endif 489#endif
490 490
491#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 491#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
492 &bfin_spi0_device, 492 &bfin_spi0_device,
493#endif 493#endif
494 494
495#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 495#if IS_ENABLED(CONFIG_PATA_PLATFORM)
496 &bfin_pata_device, 496 &bfin_pata_device,
497#endif 497#endif
498 498
499#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 499#if IS_ENABLED(CONFIG_MTD_PHYSMAP)
500 &para_flash_device, 500 &para_flash_device,
501#endif 501#endif
502}; 502};
503 503
504static int __init net2272_init(void) 504static int __init net2272_init(void)
505{ 505{
506#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 506#if IS_ENABLED(CONFIG_USB_NET2272)
507 int ret; 507 int ret;
508 508
509 ret = gpio_request(GPIO_PF46, "net2272"); 509 ret = gpio_request(GPIO_PF46, "net2272");
@@ -523,11 +523,11 @@ static int __init cm_bf561_init(void)
523{ 523{
524 printk(KERN_INFO "%s(): registering device resources\n", __func__); 524 printk(KERN_INFO "%s(): registering device resources\n", __func__);
525 platform_add_devices(cm_bf561_devices, ARRAY_SIZE(cm_bf561_devices)); 525 platform_add_devices(cm_bf561_devices, ARRAY_SIZE(cm_bf561_devices));
526#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 526#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
527 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 527 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
528#endif 528#endif
529 529
530#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 530#if IS_ENABLED(CONFIG_PATA_PLATFORM)
531 irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN); 531 irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN);
532#endif 532#endif
533 533
diff --git a/arch/blackfin/mach-bf561/boards/ezkit.c b/arch/blackfin/mach-bf561/boards/ezkit.c
index 92938e79b9e3..88dee43e7abe 100644
--- a/arch/blackfin/mach-bf561/boards/ezkit.c
+++ b/arch/blackfin/mach-bf561/boards/ezkit.c
@@ -25,7 +25,7 @@
25 */ 25 */
26const char bfin_board_name[] = "ADI BF561-EZKIT"; 26const char bfin_board_name[] = "ADI BF561-EZKIT";
27 27
28#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) 28#if IS_ENABLED(CONFIG_USB_ISP1760_HCD)
29#include <linux/usb/isp1760.h> 29#include <linux/usb/isp1760.h>
30static struct resource bfin_isp1760_resources[] = { 30static struct resource bfin_isp1760_resources[] = {
31 [0] = { 31 [0] = {
@@ -60,7 +60,7 @@ static struct platform_device bfin_isp1760_device = {
60}; 60};
61#endif 61#endif
62 62
63#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 63#if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
64#include <linux/usb/isp1362.h> 64#include <linux/usb/isp1362.h>
65 65
66static struct resource isp1362_hcd_resources[] = { 66static struct resource isp1362_hcd_resources[] = {
@@ -101,7 +101,7 @@ static struct platform_device isp1362_hcd_device = {
101}; 101};
102#endif 102#endif
103 103
104#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 104#if IS_ENABLED(CONFIG_USB_NET2272)
105static struct resource net2272_bfin_resources[] = { 105static struct resource net2272_bfin_resources[] = {
106 { 106 {
107 .start = 0x2C000000, 107 .start = 0x2C000000,
@@ -129,7 +129,7 @@ static struct platform_device net2272_bfin_device = {
129 * USB-LAN EzExtender board 129 * USB-LAN EzExtender board
130 * Driver needs to know address, irq and flag pin. 130 * Driver needs to know address, irq and flag pin.
131 */ 131 */
132#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 132#if IS_ENABLED(CONFIG_SMC91X)
133#include <linux/smc91x.h> 133#include <linux/smc91x.h>
134 134
135static struct smc91x_platdata smc91x_info = { 135static struct smc91x_platdata smc91x_info = {
@@ -163,7 +163,7 @@ static struct platform_device smc91x_device = {
163}; 163};
164#endif 164#endif
165 165
166#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 166#if IS_ENABLED(CONFIG_SERIAL_BFIN)
167#ifdef CONFIG_SERIAL_BFIN_UART0 167#ifdef CONFIG_SERIAL_BFIN_UART0
168static struct resource bfin_uart0_resources[] = { 168static struct resource bfin_uart0_resources[] = {
169 { 169 {
@@ -214,7 +214,7 @@ static struct platform_device bfin_uart0_device = {
214#endif 214#endif
215#endif 215#endif
216 216
217#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 217#if IS_ENABLED(CONFIG_BFIN_SIR)
218#ifdef CONFIG_BFIN_SIR0 218#ifdef CONFIG_BFIN_SIR0
219static struct resource bfin_sir0_resources[] = { 219static struct resource bfin_sir0_resources[] = {
220 { 220 {
@@ -243,7 +243,7 @@ static struct platform_device bfin_sir0_device = {
243#endif 243#endif
244#endif 244#endif
245 245
246#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 246#if IS_ENABLED(CONFIG_MTD_PHYSMAP)
247static struct mtd_partition ezkit_partitions[] = { 247static struct mtd_partition ezkit_partitions[] = {
248 { 248 {
249 .name = "bootloader(nor)", 249 .name = "bootloader(nor)",
@@ -291,7 +291,7 @@ static struct platform_device ezkit_flash_device = {
291}; 291};
292#endif 292#endif
293 293
294#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 294#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
295/* SPI (0) */ 295/* SPI (0) */
296static struct resource bfin_spi0_resource[] = { 296static struct resource bfin_spi0_resource[] = {
297 [0] = { 297 [0] = {
@@ -330,8 +330,7 @@ static struct platform_device bfin_spi0_device = {
330#endif 330#endif
331 331
332static struct spi_board_info bfin_spi_board_info[] __initdata = { 332static struct spi_board_info bfin_spi_board_info[] __initdata = {
333#if defined(CONFIG_SND_BF5XX_SOC_AD183X) \ 333#if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD183X)
334 || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
335 { 334 {
336 .modalias = "ad183x", 335 .modalias = "ad183x",
337 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 336 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
@@ -341,7 +340,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
341 .mode = SPI_MODE_3, 340 .mode = SPI_MODE_3,
342 }, 341 },
343#endif 342#endif
344#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 343#if IS_ENABLED(CONFIG_SPI_SPIDEV)
345 { 344 {
346 .modalias = "spidev", 345 .modalias = "spidev",
347 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 346 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
@@ -351,7 +350,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
351#endif 350#endif
352}; 351};
353 352
354#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 353#if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
355#include <linux/input.h> 354#include <linux/input.h>
356#include <linux/gpio_keys.h> 355#include <linux/gpio_keys.h>
357 356
@@ -375,7 +374,7 @@ static struct platform_device bfin_device_gpiokeys = {
375}; 374};
376#endif 375#endif
377 376
378#if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE) 377#if IS_ENABLED(CONFIG_I2C_GPIO)
379#include <linux/i2c-gpio.h> 378#include <linux/i2c-gpio.h>
380 379
381static struct i2c_gpio_platform_data i2c_gpio_data = { 380static struct i2c_gpio_platform_data i2c_gpio_data = {
@@ -422,8 +421,7 @@ static struct platform_device bfin_dpmc = {
422 }, 421 },
423}; 422};
424 423
425#if defined(CONFIG_VIDEO_BLACKFIN_CAPTURE) \ 424#if IS_ENABLED(CONFIG_VIDEO_BLACKFIN_CAPTURE)
426 || defined(CONFIG_VIDEO_BLACKFIN_CAPTURE_MODULE)
427#include <linux/videodev2.h> 425#include <linux/videodev2.h>
428#include <media/blackfin/bfin_capture.h> 426#include <media/blackfin/bfin_capture.h>
429#include <media/blackfin/ppi.h> 427#include <media/blackfin/ppi.h>
@@ -443,8 +441,7 @@ static const struct ppi_info ppi_info = {
443 .pin_req = ppi_req, 441 .pin_req = ppi_req,
444}; 442};
445 443
446#if defined(CONFIG_VIDEO_ADV7183) \ 444#if IS_ENABLED(CONFIG_VIDEO_ADV7183)
447 || defined(CONFIG_VIDEO_ADV7183_MODULE)
448#include <media/adv7183.h> 445#include <media/adv7183.h>
449static struct v4l2_input adv7183_inputs[] = { 446static struct v4l2_input adv7183_inputs[] = {
450 { 447 {
@@ -515,7 +512,7 @@ static struct platform_device bfin_capture_device = {
515}; 512};
516#endif 513#endif
517 514
518#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 515#if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
519static struct platform_device bfin_i2s = { 516static struct platform_device bfin_i2s = {
520 .name = "bfin-i2s", 517 .name = "bfin-i2s",
521 .id = CONFIG_SND_BF5XX_SPORT_NUM, 518 .id = CONFIG_SND_BF5XX_SPORT_NUM,
@@ -523,7 +520,7 @@ static struct platform_device bfin_i2s = {
523}; 520};
524#endif 521#endif
525 522
526#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) 523#if IS_ENABLED(CONFIG_SND_BF5XX_AC97)
527static struct platform_device bfin_ac97 = { 524static struct platform_device bfin_ac97 = {
528 .name = "bfin-ac97", 525 .name = "bfin-ac97",
529 .id = CONFIG_SND_BF5XX_SPORT_NUM, 526 .id = CONFIG_SND_BF5XX_SPORT_NUM,
@@ -531,8 +528,7 @@ static struct platform_device bfin_ac97 = {
531}; 528};
532#endif 529#endif
533 530
534#if defined(CONFIG_SND_BF5XX_SOC_AD1836) \ 531#if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD1836)
535 || defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
536static const char * const ad1836_link[] = { 532static const char * const ad1836_link[] = {
537 "bfin-i2s.0", 533 "bfin-i2s.0",
538 "spi0.4", 534 "spi0.4",
@@ -550,72 +546,70 @@ static struct platform_device *ezkit_devices[] __initdata = {
550 546
551 &bfin_dpmc, 547 &bfin_dpmc,
552 548
553#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 549#if IS_ENABLED(CONFIG_SMC91X)
554 &smc91x_device, 550 &smc91x_device,
555#endif 551#endif
556 552
557#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 553#if IS_ENABLED(CONFIG_USB_NET2272)
558 &net2272_bfin_device, 554 &net2272_bfin_device,
559#endif 555#endif
560 556
561#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) 557#if IS_ENABLED(CONFIG_USB_ISP1760_HCD)
562 &bfin_isp1760_device, 558 &bfin_isp1760_device,
563#endif 559#endif
564 560
565#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 561#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
566 &bfin_spi0_device, 562 &bfin_spi0_device,
567#endif 563#endif
568 564
569#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 565#if IS_ENABLED(CONFIG_SERIAL_BFIN)
570#ifdef CONFIG_SERIAL_BFIN_UART0 566#ifdef CONFIG_SERIAL_BFIN_UART0
571 &bfin_uart0_device, 567 &bfin_uart0_device,
572#endif 568#endif
573#endif 569#endif
574 570
575#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 571#if IS_ENABLED(CONFIG_BFIN_SIR)
576#ifdef CONFIG_BFIN_SIR0 572#ifdef CONFIG_BFIN_SIR0
577 &bfin_sir0_device, 573 &bfin_sir0_device,
578#endif 574#endif
579#endif 575#endif
580 576
581#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 577#if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
582 &bfin_device_gpiokeys, 578 &bfin_device_gpiokeys,
583#endif 579#endif
584 580
585#if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE) 581#if IS_ENABLED(CONFIG_I2C_GPIO)
586 &i2c_gpio_device, 582 &i2c_gpio_device,
587#endif 583#endif
588 584
589#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 585#if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
590 &isp1362_hcd_device, 586 &isp1362_hcd_device,
591#endif 587#endif
592 588
593#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 589#if IS_ENABLED(CONFIG_MTD_PHYSMAP)
594 &ezkit_flash_device, 590 &ezkit_flash_device,
595#endif 591#endif
596 592
597#if defined(CONFIG_VIDEO_BLACKFIN_CAPTURE) \ 593#if IS_ENABLED(CONFIG_VIDEO_BLACKFIN_CAPTURE)
598 || defined(CONFIG_VIDEO_BLACKFIN_CAPTURE_MODULE)
599 &bfin_capture_device, 594 &bfin_capture_device,
600#endif 595#endif
601 596
602#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 597#if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
603 &bfin_i2s, 598 &bfin_i2s,
604#endif 599#endif
605 600
606#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) 601#if IS_ENABLED(CONFIG_SND_BF5XX_AC97)
607 &bfin_ac97, 602 &bfin_ac97,
608#endif 603#endif
609 604
610#if defined(CONFIG_SND_BF5XX_SOC_AD1836) || \ 605#if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD1836)
611 defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
612 &bfin_ad1836_machine, 606 &bfin_ad1836_machine,
613#endif 607#endif
614}; 608};
615 609
616static int __init net2272_init(void) 610static int __init net2272_init(void)
617{ 611{
618#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 612#if IS_ENABLED(CONFIG_USB_NET2272)
619 int ret; 613 int ret;
620 614
621 ret = gpio_request(GPIO_PF11, "net2272"); 615 ret = gpio_request(GPIO_PF11, "net2272");
@@ -641,12 +635,12 @@ static int __init ezkit_init(void)
641 if (ret < 0) 635 if (ret < 0)
642 return ret; 636 return ret;
643 637
644#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 638#if IS_ENABLED(CONFIG_SMC91X)
645 bfin_write_FIO0_DIR(bfin_read_FIO0_DIR() | (1 << 12)); 639 bfin_write_FIO0_DIR(bfin_read_FIO0_DIR() | (1 << 12));
646 SSYNC(); 640 SSYNC();
647#endif 641#endif
648 642
649#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) 643#if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD183X)
650 bfin_write_FIO0_DIR(bfin_read_FIO0_DIR() | (1 << 15)); 644 bfin_write_FIO0_DIR(bfin_read_FIO0_DIR() | (1 << 15));
651 bfin_write_FIO0_FLAG_S(1 << 15); 645 bfin_write_FIO0_FLAG_S(1 << 15);
652 SSYNC(); 646 SSYNC();
diff --git a/arch/blackfin/mach-bf561/boards/tepla.c b/arch/blackfin/mach-bf561/boards/tepla.c
index 1a57bc986aad..f87b8cc0cd4c 100644
--- a/arch/blackfin/mach-bf561/boards/tepla.c
+++ b/arch/blackfin/mach-bf561/boards/tepla.c
@@ -42,7 +42,7 @@ static struct platform_device smc91x_device = {
42 .resource = smc91x_resources, 42 .resource = smc91x_resources,
43}; 43};
44 44
45#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 45#if IS_ENABLED(CONFIG_SERIAL_BFIN)
46#ifdef CONFIG_SERIAL_BFIN_UART0 46#ifdef CONFIG_SERIAL_BFIN_UART0
47static struct resource bfin_uart0_resources[] = { 47static struct resource bfin_uart0_resources[] = {
48 { 48 {
@@ -93,7 +93,7 @@ static struct platform_device bfin_uart0_device = {
93#endif 93#endif
94#endif 94#endif
95 95
96#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 96#if IS_ENABLED(CONFIG_BFIN_SIR)
97#ifdef CONFIG_BFIN_SIR0 97#ifdef CONFIG_BFIN_SIR0
98static struct resource bfin_sir0_resources[] = { 98static struct resource bfin_sir0_resources[] = {
99 { 99 {
@@ -125,13 +125,13 @@ static struct platform_device bfin_sir0_device = {
125static struct platform_device *tepla_devices[] __initdata = { 125static struct platform_device *tepla_devices[] __initdata = {
126 &smc91x_device, 126 &smc91x_device,
127 127
128#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 128#if IS_ENABLED(CONFIG_SERIAL_BFIN)
129#ifdef CONFIG_SERIAL_BFIN_UART0 129#ifdef CONFIG_SERIAL_BFIN_UART0
130 &bfin_uart0_device, 130 &bfin_uart0_device,
131#endif 131#endif
132#endif 132#endif
133 133
134#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 134#if IS_ENABLED(CONFIG_BFIN_SIR)
135#ifdef CONFIG_BFIN_SIR0 135#ifdef CONFIG_BFIN_SIR0
136 &bfin_sir0_device, 136 &bfin_sir0_device,
137#endif 137#endif