aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-bf527
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-bf527
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-bf527')
-rw-r--r--arch/blackfin/mach-bf527/boards/ad7160eval.c71
-rw-r--r--arch/blackfin/mach-bf527/boards/cm_bf527.c91
-rw-r--r--arch/blackfin/mach-bf527/boards/ezbrd.c76
-rw-r--r--arch/blackfin/mach-bf527/boards/ezkit.c139
-rw-r--r--arch/blackfin/mach-bf527/boards/tll6527m.c91
5 files changed, 223 insertions, 245 deletions
diff --git a/arch/blackfin/mach-bf527/boards/ad7160eval.c b/arch/blackfin/mach-bf527/boards/ad7160eval.c
index 1e7be62fccb6..9501bd8d9cd1 100644
--- a/arch/blackfin/mach-bf527/boards/ad7160eval.c
+++ b/arch/blackfin/mach-bf527/boards/ad7160eval.c
@@ -37,7 +37,7 @@ const char bfin_board_name[] = "ADI BF527-AD7160EVAL";
37 * Driver needs to know address, irq and flag pin. 37 * Driver needs to know address, irq and flag pin.
38 */ 38 */
39 39
40#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) 40#if IS_ENABLED(CONFIG_USB_MUSB_HDRC)
41static struct resource musb_resources[] = { 41static struct resource musb_resources[] = {
42 [0] = { 42 [0] = {
43 .start = 0xffc03800, 43 .start = 0xffc03800,
@@ -97,7 +97,7 @@ static struct platform_device musb_device = {
97}; 97};
98#endif 98#endif
99 99
100#if defined(CONFIG_FB_BFIN_RA158Z) || defined(CONFIG_FB_BFIN_RA158Z_MODULE) 100#if IS_ENABLED(CONFIG_FB_BFIN_RA158Z)
101static struct resource bf52x_ra158z_resources[] = { 101static struct resource bf52x_ra158z_resources[] = {
102 { 102 {
103 .start = IRQ_PPI_ERROR, 103 .start = IRQ_PPI_ERROR,
@@ -114,7 +114,7 @@ static struct platform_device bf52x_ra158z_device = {
114}; 114};
115#endif 115#endif
116 116
117#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 117#if IS_ENABLED(CONFIG_MTD_PHYSMAP)
118static struct mtd_partition ad7160eval_partitions[] = { 118static struct mtd_partition ad7160eval_partitions[] = {
119 { 119 {
120 .name = "bootloader(nor)", 120 .name = "bootloader(nor)",
@@ -154,7 +154,7 @@ static struct platform_device ad7160eval_flash_device = {
154}; 154};
155#endif 155#endif
156 156
157#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) 157#if IS_ENABLED(CONFIG_MTD_NAND_BF5XX)
158static struct mtd_partition partition_info[] = { 158static struct mtd_partition partition_info[] = {
159 { 159 {
160 .name = "linux kernel(nand)", 160 .name = "linux kernel(nand)",
@@ -200,14 +200,14 @@ static struct platform_device bf5xx_nand_device = {
200}; 200};
201#endif 201#endif
202 202
203#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 203#if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
204static struct platform_device rtc_device = { 204static struct platform_device rtc_device = {
205 .name = "rtc-bfin", 205 .name = "rtc-bfin",
206 .id = -1, 206 .id = -1,
207}; 207};
208#endif 208#endif
209 209
210#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 210#if IS_ENABLED(CONFIG_BFIN_MAC)
211#include <linux/bfin_mac.h> 211#include <linux/bfin_mac.h>
212static const unsigned short bfin_mac_peripherals[] = P_RMII0; 212static const unsigned short bfin_mac_peripherals[] = P_RMII0;
213 213
@@ -241,8 +241,7 @@ static struct platform_device bfin_mac_device = {
241#endif 241#endif
242 242
243 243
244#if defined(CONFIG_MTD_M25P80) \ 244#if IS_ENABLED(CONFIG_MTD_M25P80)
245 || defined(CONFIG_MTD_M25P80_MODULE)
246static struct mtd_partition bfin_spi_flash_partitions[] = { 245static struct mtd_partition bfin_spi_flash_partitions[] = {
247 { 246 {
248 .name = "bootloader(spi)", 247 .name = "bootloader(spi)",
@@ -269,13 +268,13 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = {
269}; 268};
270#endif 269#endif
271 270
272#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 271#if IS_ENABLED(CONFIG_MMC_SPI)
273static struct bfin5xx_spi_chip mmc_spi_chip_info = { 272static struct bfin5xx_spi_chip mmc_spi_chip_info = {
274 .enable_dma = 0, 273 .enable_dma = 0,
275}; 274};
276#endif 275#endif
277 276
278#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 277#if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
279static struct platform_device bfin_i2s = { 278static struct platform_device bfin_i2s = {
280 .name = "bfin-i2s", 279 .name = "bfin-i2s",
281 .id = CONFIG_SND_BF5XX_SPORT_NUM, 280 .id = CONFIG_SND_BF5XX_SPORT_NUM,
@@ -284,8 +283,7 @@ static struct platform_device bfin_i2s = {
284#endif 283#endif
285 284
286static struct spi_board_info bfin_spi_board_info[] __initdata = { 285static struct spi_board_info bfin_spi_board_info[] __initdata = {
287#if defined(CONFIG_MTD_M25P80) \ 286#if IS_ENABLED(CONFIG_MTD_M25P80)
288 || defined(CONFIG_MTD_M25P80_MODULE)
289 { 287 {
290 /* the modalias must be the same as spi device driver name */ 288 /* the modalias must be the same as spi device driver name */
291 .modalias = "m25p80", /* Name of spi_driver for this device */ 289 .modalias = "m25p80", /* Name of spi_driver for this device */
@@ -297,8 +295,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
297 .mode = SPI_MODE_3, 295 .mode = SPI_MODE_3,
298 }, 296 },
299#endif 297#endif
300#if defined(CONFIG_SND_BF5XX_SOC_AD183X) \ 298#if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD183X)
301 || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
302 { 299 {
303 .modalias = "ad183x", 300 .modalias = "ad183x",
304 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 301 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
@@ -306,7 +303,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
306 .chip_select = 4, 303 .chip_select = 4,
307 }, 304 },
308#endif 305#endif
309#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 306#if IS_ENABLED(CONFIG_MMC_SPI)
310 { 307 {
311 .modalias = "mmc_spi", 308 .modalias = "mmc_spi",
312 .max_speed_hz = 30000000, /* max spi clock (SCK) speed in HZ */ 309 .max_speed_hz = 30000000, /* max spi clock (SCK) speed in HZ */
@@ -316,7 +313,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
316 .mode = SPI_MODE_3, 313 .mode = SPI_MODE_3,
317 }, 314 },
318#endif 315#endif
319#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 316#if IS_ENABLED(CONFIG_SPI_SPIDEV)
320 { 317 {
321 .modalias = "spidev", 318 .modalias = "spidev",
322 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 319 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
@@ -326,7 +323,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
326#endif 323#endif
327}; 324};
328 325
329#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 326#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
330/* SPI controller data */ 327/* SPI controller data */
331static struct bfin5xx_spi_master bfin_spi0_info = { 328static struct bfin5xx_spi_master bfin_spi0_info = {
332 .num_chipselect = MAX_CTRL_CS + MAX_BLACKFIN_GPIOS, 329 .num_chipselect = MAX_CTRL_CS + MAX_BLACKFIN_GPIOS,
@@ -364,7 +361,7 @@ static struct platform_device bfin_spi0_device = {
364}; 361};
365#endif /* spi master and devices */ 362#endif /* spi master and devices */
366 363
367#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 364#if IS_ENABLED(CONFIG_SERIAL_BFIN)
368#ifdef CONFIG_SERIAL_BFIN_UART0 365#ifdef CONFIG_SERIAL_BFIN_UART0
369static struct resource bfin_uart0_resources[] = { 366static struct resource bfin_uart0_resources[] = {
370 { 367 {
@@ -475,7 +472,7 @@ static struct platform_device bfin_uart1_device = {
475#endif 472#endif
476#endif 473#endif
477 474
478#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 475#if IS_ENABLED(CONFIG_BFIN_SIR)
479#ifdef CONFIG_BFIN_SIR0 476#ifdef CONFIG_BFIN_SIR0
480static struct resource bfin_sir0_resources[] = { 477static struct resource bfin_sir0_resources[] = {
481 { 478 {
@@ -530,7 +527,7 @@ static struct platform_device bfin_sir1_device = {
530#endif 527#endif
531#endif 528#endif
532 529
533#if defined(CONFIG_TOUCHSCREEN_AD7160) || defined(CONFIG_TOUCHSCREEN_AD7160_MODULE) 530#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7160)
534#include <linux/input/ad7160.h> 531#include <linux/input/ad7160.h>
535static const struct ad7160_platform_data bfin_ad7160_ts_info = { 532static const struct ad7160_platform_data bfin_ad7160_ts_info = {
536 .sensor_x_res = 854, 533 .sensor_x_res = 854,
@@ -560,7 +557,7 @@ static const struct ad7160_platform_data bfin_ad7160_ts_info = {
560}; 557};
561#endif 558#endif
562 559
563#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 560#if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
564static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; 561static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
565 562
566static struct resource bfin_twi0_resource[] = { 563static struct resource bfin_twi0_resource[] = {
@@ -588,7 +585,7 @@ static struct platform_device i2c_bfin_twi_device = {
588#endif 585#endif
589 586
590static struct i2c_board_info __initdata bfin_i2c_board_info[] = { 587static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
591#if defined(CONFIG_TOUCHSCREEN_AD7160) || defined(CONFIG_TOUCHSCREEN_AD7160_MODULE) 588#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7160)
592 { 589 {
593 I2C_BOARD_INFO("ad7160", 0x33), 590 I2C_BOARD_INFO("ad7160", 0x33),
594 .irq = IRQ_PH1, 591 .irq = IRQ_PH1,
@@ -597,7 +594,7 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
597#endif 594#endif
598}; 595};
599 596
600#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 597#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
601#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 598#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
602static struct resource bfin_sport0_uart_resources[] = { 599static struct resource bfin_sport0_uart_resources[] = {
603 { 600 {
@@ -668,7 +665,7 @@ static struct platform_device bfin_sport1_uart_device = {
668#endif 665#endif
669#endif 666#endif
670 667
671#if defined(CONFIG_INPUT_BFIN_ROTARY) || defined(CONFIG_INPUT_BFIN_ROTARY_MODULE) 668#if IS_ENABLED(CONFIG_INPUT_BFIN_ROTARY)
672#include <asm/bfin_rotary.h> 669#include <asm/bfin_rotary.h>
673 670
674static struct bfin_rotary_platform_data bfin_rotary_data = { 671static struct bfin_rotary_platform_data bfin_rotary_data = {
@@ -725,28 +722,28 @@ static struct platform_device *stamp_devices[] __initdata = {
725 722
726 &bfin_dpmc, 723 &bfin_dpmc,
727 724
728#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) 725#if IS_ENABLED(CONFIG_MTD_NAND_BF5XX)
729 &bf5xx_nand_device, 726 &bf5xx_nand_device,
730#endif 727#endif
731 728
732#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 729#if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
733 &rtc_device, 730 &rtc_device,
734#endif 731#endif
735 732
736#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) 733#if IS_ENABLED(CONFIG_USB_MUSB_HDRC)
737 &musb_device, 734 &musb_device,
738#endif 735#endif
739 736
740#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 737#if IS_ENABLED(CONFIG_BFIN_MAC)
741 &bfin_mii_bus, 738 &bfin_mii_bus,
742 &bfin_mac_device, 739 &bfin_mac_device,
743#endif 740#endif
744 741
745#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 742#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
746 &bfin_spi0_device, 743 &bfin_spi0_device,
747#endif 744#endif
748 745
749#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 746#if IS_ENABLED(CONFIG_SERIAL_BFIN)
750#ifdef CONFIG_SERIAL_BFIN_UART0 747#ifdef CONFIG_SERIAL_BFIN_UART0
751 &bfin_uart0_device, 748 &bfin_uart0_device,
752#endif 749#endif
@@ -755,11 +752,11 @@ static struct platform_device *stamp_devices[] __initdata = {
755#endif 752#endif
756#endif 753#endif
757 754
758#if defined(CONFIG_FB_BFIN_RA158Z) || defined(CONFIG_FB_BFIN_RA158Z_MODULE) 755#if IS_ENABLED(CONFIG_FB_BFIN_RA158Z)
759 &bf52x_ra158z_device, 756 &bf52x_ra158z_device,
760#endif 757#endif
761 758
762#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 759#if IS_ENABLED(CONFIG_BFIN_SIR)
763#ifdef CONFIG_BFIN_SIR0 760#ifdef CONFIG_BFIN_SIR0
764 &bfin_sir0_device, 761 &bfin_sir0_device,
765#endif 762#endif
@@ -768,11 +765,11 @@ static struct platform_device *stamp_devices[] __initdata = {
768#endif 765#endif
769#endif 766#endif
770 767
771#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 768#if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
772 &i2c_bfin_twi_device, 769 &i2c_bfin_twi_device,
773#endif 770#endif
774 771
775#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 772#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
776#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 773#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
777 &bfin_sport0_uart_device, 774 &bfin_sport0_uart_device,
778#endif 775#endif
@@ -781,15 +778,15 @@ static struct platform_device *stamp_devices[] __initdata = {
781#endif 778#endif
782#endif 779#endif
783 780
784#if defined(CONFIG_INPUT_BFIN_ROTARY) || defined(CONFIG_INPUT_BFIN_ROTARY_MODULE) 781#if IS_ENABLED(CONFIG_INPUT_BFIN_ROTARY)
785 &bfin_rotary_device, 782 &bfin_rotary_device,
786#endif 783#endif
787 784
788#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 785#if IS_ENABLED(CONFIG_MTD_PHYSMAP)
789 &ad7160eval_flash_device, 786 &ad7160eval_flash_device,
790#endif 787#endif
791 788
792#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 789#if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
793 &bfin_i2s, 790 &bfin_i2s,
794#endif 791#endif
795}; 792};
diff --git a/arch/blackfin/mach-bf527/boards/cm_bf527.c b/arch/blackfin/mach-bf527/boards/cm_bf527.c
index 413d0132b66f..b1004b35db36 100644
--- a/arch/blackfin/mach-bf527/boards/cm_bf527.c
+++ b/arch/blackfin/mach-bf527/boards/cm_bf527.c
@@ -37,7 +37,7 @@ const char bfin_board_name[] = "Bluetechnix CM-BF527";
37 * Driver needs to know address, irq and flag pin. 37 * Driver needs to know address, irq and flag pin.
38 */ 38 */
39 39
40#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) 40#if IS_ENABLED(CONFIG_USB_ISP1760_HCD)
41#include <linux/usb/isp1760.h> 41#include <linux/usb/isp1760.h>
42static struct resource bfin_isp1760_resources[] = { 42static struct resource bfin_isp1760_resources[] = {
43 [0] = { 43 [0] = {
@@ -72,7 +72,7 @@ static struct platform_device bfin_isp1760_device = {
72}; 72};
73#endif 73#endif
74 74
75#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) 75#if IS_ENABLED(CONFIG_USB_MUSB_HDRC)
76static struct resource musb_resources[] = { 76static struct resource musb_resources[] = {
77 [0] = { 77 [0] = {
78 .start = 0xffc03800, 78 .start = 0xffc03800,
@@ -134,7 +134,7 @@ static struct platform_device musb_device = {
134}; 134};
135#endif 135#endif
136 136
137#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) 137#if IS_ENABLED(CONFIG_MTD_NAND_BF5XX)
138static struct mtd_partition partition_info[] = { 138static struct mtd_partition partition_info[] = {
139 { 139 {
140 .name = "linux kernel(nand)", 140 .name = "linux kernel(nand)",
@@ -180,7 +180,7 @@ static struct platform_device bf5xx_nand_device = {
180}; 180};
181#endif 181#endif
182 182
183#if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) 183#if IS_ENABLED(CONFIG_BFIN_CFPCMCIA)
184static struct resource bfin_pcmcia_cf_resources[] = { 184static struct resource bfin_pcmcia_cf_resources[] = {
185 { 185 {
186 .start = 0x20310000, /* IO PORT */ 186 .start = 0x20310000, /* IO PORT */
@@ -209,14 +209,14 @@ static struct platform_device bfin_pcmcia_cf_device = {
209}; 209};
210#endif 210#endif
211 211
212#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 212#if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
213static struct platform_device rtc_device = { 213static struct platform_device rtc_device = {
214 .name = "rtc-bfin", 214 .name = "rtc-bfin",
215 .id = -1, 215 .id = -1,
216}; 216};
217#endif 217#endif
218 218
219#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 219#if IS_ENABLED(CONFIG_SMC91X)
220#include <linux/smc91x.h> 220#include <linux/smc91x.h>
221 221
222static struct smc91x_platdata smc91x_info = { 222static struct smc91x_platdata smc91x_info = {
@@ -249,7 +249,7 @@ static struct platform_device smc91x_device = {
249}; 249};
250#endif 250#endif
251 251
252#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE) 252#if IS_ENABLED(CONFIG_DM9000)
253static struct resource dm9000_resources[] = { 253static struct resource dm9000_resources[] = {
254 [0] = { 254 [0] = {
255 .start = 0x203FB800, 255 .start = 0x203FB800,
@@ -276,7 +276,7 @@ static struct platform_device dm9000_device = {
276}; 276};
277#endif 277#endif
278 278
279#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 279#if IS_ENABLED(CONFIG_BFIN_MAC)
280#include <linux/bfin_mac.h> 280#include <linux/bfin_mac.h>
281static const unsigned short bfin_mac_peripherals[] = P_RMII0; 281static const unsigned short bfin_mac_peripherals[] = P_RMII0;
282 282
@@ -309,7 +309,7 @@ static struct platform_device bfin_mac_device = {
309}; 309};
310#endif 310#endif
311 311
312#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 312#if IS_ENABLED(CONFIG_USB_NET2272)
313static struct resource net2272_bfin_resources[] = { 313static struct resource net2272_bfin_resources[] = {
314 { 314 {
315 .start = 0x20300000, 315 .start = 0x20300000,
@@ -330,8 +330,7 @@ static struct platform_device net2272_bfin_device = {
330}; 330};
331#endif 331#endif
332 332
333#if defined(CONFIG_MTD_M25P80) \ 333#if IS_ENABLED(CONFIG_MTD_M25P80)
334 || defined(CONFIG_MTD_M25P80_MODULE)
335static struct mtd_partition bfin_spi_flash_partitions[] = { 334static struct mtd_partition bfin_spi_flash_partitions[] = {
336 { 335 {
337 .name = "bootloader(spi)", 336 .name = "bootloader(spi)",
@@ -358,13 +357,13 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = {
358}; 357};
359#endif 358#endif
360 359
361#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 360#if IS_ENABLED(CONFIG_MMC_SPI)
362static struct bfin5xx_spi_chip mmc_spi_chip_info = { 361static struct bfin5xx_spi_chip mmc_spi_chip_info = {
363 .enable_dma = 0, 362 .enable_dma = 0,
364}; 363};
365#endif 364#endif
366 365
367#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 366#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877)
368static const struct ad7877_platform_data bfin_ad7877_ts_info = { 367static const struct ad7877_platform_data bfin_ad7877_ts_info = {
369 .model = 7877, 368 .model = 7877,
370 .vref_delay_usecs = 50, /* internal, no capacitor */ 369 .vref_delay_usecs = 50, /* internal, no capacitor */
@@ -381,8 +380,7 @@ static const struct ad7877_platform_data bfin_ad7877_ts_info = {
381#endif 380#endif
382 381
383static struct spi_board_info bfin_spi_board_info[] __initdata = { 382static struct spi_board_info bfin_spi_board_info[] __initdata = {
384#if defined(CONFIG_MTD_M25P80) \ 383#if IS_ENABLED(CONFIG_MTD_M25P80)
385 || defined(CONFIG_MTD_M25P80_MODULE)
386 { 384 {
387 /* the modalias must be the same as spi device driver name */ 385 /* the modalias must be the same as spi device driver name */
388 .modalias = "m25p80", /* Name of spi_driver for this device */ 386 .modalias = "m25p80", /* Name of spi_driver for this device */
@@ -395,8 +393,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
395 }, 393 },
396#endif 394#endif
397 395
398#if defined(CONFIG_SND_BF5XX_SOC_AD183X) \ 396#if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD183X)
399 || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
400 { 397 {
401 .modalias = "ad183x", 398 .modalias = "ad183x",
402 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 399 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
@@ -404,7 +401,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
404 .chip_select = 4, 401 .chip_select = 4,
405 }, 402 },
406#endif 403#endif
407#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 404#if IS_ENABLED(CONFIG_MMC_SPI)
408 { 405 {
409 .modalias = "mmc_spi", 406 .modalias = "mmc_spi",
410 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ 407 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
@@ -414,7 +411,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
414 .mode = SPI_MODE_3, 411 .mode = SPI_MODE_3,
415 }, 412 },
416#endif 413#endif
417#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 414#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877)
418 { 415 {
419 .modalias = "ad7877", 416 .modalias = "ad7877",
420 .platform_data = &bfin_ad7877_ts_info, 417 .platform_data = &bfin_ad7877_ts_info,
@@ -424,7 +421,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
424 .chip_select = 2, 421 .chip_select = 2,
425 }, 422 },
426#endif 423#endif
427#if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ 424#if IS_ENABLED(CONFIG_SND_SOC_WM8731) \
428 && defined(CONFIG_SND_SOC_WM8731_SPI) 425 && defined(CONFIG_SND_SOC_WM8731_SPI)
429 { 426 {
430 .modalias = "wm8731", 427 .modalias = "wm8731",
@@ -434,7 +431,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
434 .mode = SPI_MODE_0, 431 .mode = SPI_MODE_0,
435 }, 432 },
436#endif 433#endif
437#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 434#if IS_ENABLED(CONFIG_SPI_SPIDEV)
438 { 435 {
439 .modalias = "spidev", 436 .modalias = "spidev",
440 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 437 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
@@ -444,7 +441,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
444#endif 441#endif
445}; 442};
446 443
447#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 444#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
448/* SPI controller data */ 445/* SPI controller data */
449static struct bfin5xx_spi_master bfin_spi0_info = { 446static struct bfin5xx_spi_master bfin_spi0_info = {
450 .num_chipselect = 8, 447 .num_chipselect = 8,
@@ -482,7 +479,7 @@ static struct platform_device bfin_spi0_device = {
482}; 479};
483#endif /* spi master and devices */ 480#endif /* spi master and devices */
484 481
485#if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE) 482#if IS_ENABLED(CONFIG_MTD_GPIO_ADDR)
486static struct mtd_partition cm_partitions[] = { 483static struct mtd_partition cm_partitions[] = {
487 { 484 {
488 .name = "bootloader(nor)", 485 .name = "bootloader(nor)",
@@ -531,7 +528,7 @@ static struct platform_device cm_flash_device = {
531}; 528};
532#endif 529#endif
533 530
534#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 531#if IS_ENABLED(CONFIG_SERIAL_BFIN)
535#ifdef CONFIG_SERIAL_BFIN_UART0 532#ifdef CONFIG_SERIAL_BFIN_UART0
536static struct resource bfin_uart0_resources[] = { 533static struct resource bfin_uart0_resources[] = {
537 { 534 {
@@ -642,7 +639,7 @@ static struct platform_device bfin_uart1_device = {
642#endif 639#endif
643#endif 640#endif
644 641
645#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 642#if IS_ENABLED(CONFIG_BFIN_SIR)
646#ifdef CONFIG_BFIN_SIR0 643#ifdef CONFIG_BFIN_SIR0
647static struct resource bfin_sir0_resources[] = { 644static struct resource bfin_sir0_resources[] = {
648 { 645 {
@@ -697,7 +694,7 @@ static struct platform_device bfin_sir1_device = {
697#endif 694#endif
698#endif 695#endif
699 696
700#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 697#if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
701static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; 698static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
702 699
703static struct resource bfin_twi0_resource[] = { 700static struct resource bfin_twi0_resource[] = {
@@ -725,25 +722,25 @@ static struct platform_device i2c_bfin_twi_device = {
725#endif 722#endif
726 723
727static struct i2c_board_info __initdata bfin_i2c_board_info[] = { 724static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
728#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) 725#if IS_ENABLED(CONFIG_BFIN_TWI_LCD)
729 { 726 {
730 I2C_BOARD_INFO("pcf8574_lcd", 0x22), 727 I2C_BOARD_INFO("pcf8574_lcd", 0x22),
731 }, 728 },
732#endif 729#endif
733#if defined(CONFIG_INPUT_PCF8574) || defined(CONFIG_INPUT_PCF8574_MODULE) 730#if IS_ENABLED(CONFIG_INPUT_PCF8574)
734 { 731 {
735 I2C_BOARD_INFO("pcf8574_keypad", 0x27), 732 I2C_BOARD_INFO("pcf8574_keypad", 0x27),
736 .irq = IRQ_PF8, 733 .irq = IRQ_PF8,
737 }, 734 },
738#endif 735#endif
739#if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE) 736#if IS_ENABLED(CONFIG_FB_BFIN_7393)
740 { 737 {
741 I2C_BOARD_INFO("bfin-adv7393", 0x2B), 738 I2C_BOARD_INFO("bfin-adv7393", 0x2B),
742 }, 739 },
743#endif 740#endif
744}; 741};
745 742
746#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 743#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
747#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 744#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
748static struct resource bfin_sport0_uart_resources[] = { 745static struct resource bfin_sport0_uart_resources[] = {
749 { 746 {
@@ -814,7 +811,7 @@ static struct platform_device bfin_sport1_uart_device = {
814#endif 811#endif
815#endif 812#endif
816 813
817#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 814#if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
818#include <linux/input.h> 815#include <linux/input.h>
819#include <linux/gpio_keys.h> 816#include <linux/gpio_keys.h>
820 817
@@ -861,48 +858,48 @@ static struct platform_device *cmbf527_devices[] __initdata = {
861 858
862 &bfin_dpmc, 859 &bfin_dpmc,
863 860
864#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) 861#if IS_ENABLED(CONFIG_MTD_NAND_BF5XX)
865 &bf5xx_nand_device, 862 &bf5xx_nand_device,
866#endif 863#endif
867 864
868#if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) 865#if IS_ENABLED(CONFIG_BFIN_CFPCMCIA)
869 &bfin_pcmcia_cf_device, 866 &bfin_pcmcia_cf_device,
870#endif 867#endif
871 868
872#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 869#if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
873 &rtc_device, 870 &rtc_device,
874#endif 871#endif
875 872
876#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) 873#if IS_ENABLED(CONFIG_USB_ISP1760_HCD)
877 &bfin_isp1760_device, 874 &bfin_isp1760_device,
878#endif 875#endif
879 876
880#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) 877#if IS_ENABLED(CONFIG_USB_MUSB_HDRC)
881 &musb_device, 878 &musb_device,
882#endif 879#endif
883 880
884#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 881#if IS_ENABLED(CONFIG_SMC91X)
885 &smc91x_device, 882 &smc91x_device,
886#endif 883#endif
887 884
888#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE) 885#if IS_ENABLED(CONFIG_DM9000)
889 &dm9000_device, 886 &dm9000_device,
890#endif 887#endif
891 888
892#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 889#if IS_ENABLED(CONFIG_BFIN_MAC)
893 &bfin_mii_bus, 890 &bfin_mii_bus,
894 &bfin_mac_device, 891 &bfin_mac_device,
895#endif 892#endif
896 893
897#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 894#if IS_ENABLED(CONFIG_USB_NET2272)
898 &net2272_bfin_device, 895 &net2272_bfin_device,
899#endif 896#endif
900 897
901#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 898#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
902 &bfin_spi0_device, 899 &bfin_spi0_device,
903#endif 900#endif
904 901
905#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 902#if IS_ENABLED(CONFIG_SERIAL_BFIN)
906#ifdef CONFIG_SERIAL_BFIN_UART0 903#ifdef CONFIG_SERIAL_BFIN_UART0
907 &bfin_uart0_device, 904 &bfin_uart0_device,
908#endif 905#endif
@@ -911,7 +908,7 @@ static struct platform_device *cmbf527_devices[] __initdata = {
911#endif 908#endif
912#endif 909#endif
913 910
914#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 911#if IS_ENABLED(CONFIG_BFIN_SIR)
915#ifdef CONFIG_BFIN_SIR0 912#ifdef CONFIG_BFIN_SIR0
916 &bfin_sir0_device, 913 &bfin_sir0_device,
917#endif 914#endif
@@ -920,11 +917,11 @@ static struct platform_device *cmbf527_devices[] __initdata = {
920#endif 917#endif
921#endif 918#endif
922 919
923#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 920#if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
924 &i2c_bfin_twi_device, 921 &i2c_bfin_twi_device,
925#endif 922#endif
926 923
927#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 924#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
928#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 925#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
929 &bfin_sport0_uart_device, 926 &bfin_sport0_uart_device,
930#endif 927#endif
@@ -933,11 +930,11 @@ static struct platform_device *cmbf527_devices[] __initdata = {
933#endif 930#endif
934#endif 931#endif
935 932
936#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 933#if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
937 &bfin_device_gpiokeys, 934 &bfin_device_gpiokeys,
938#endif 935#endif
939 936
940#if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE) 937#if IS_ENABLED(CONFIG_MTD_GPIO_ADDR)
941 &cm_flash_device, 938 &cm_flash_device,
942#endif 939#endif
943}; 940};
diff --git a/arch/blackfin/mach-bf527/boards/ezbrd.c b/arch/blackfin/mach-bf527/boards/ezbrd.c
index 50bda79194e5..a3a572352769 100644
--- a/arch/blackfin/mach-bf527/boards/ezbrd.c
+++ b/arch/blackfin/mach-bf527/boards/ezbrd.c
@@ -36,7 +36,7 @@ const char bfin_board_name[] = "ADI BF526-EZBRD";
36 * Driver needs to know address, irq and flag pin. 36 * Driver needs to know address, irq and flag pin.
37 */ 37 */
38 38
39#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) 39#if IS_ENABLED(CONFIG_USB_MUSB_HDRC)
40static struct resource musb_resources[] = { 40static struct resource musb_resources[] = {
41 [0] = { 41 [0] = {
42 .start = 0xffc03800, 42 .start = 0xffc03800,
@@ -98,7 +98,7 @@ static struct platform_device musb_device = {
98}; 98};
99#endif 99#endif
100 100
101#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 101#if IS_ENABLED(CONFIG_MTD_PHYSMAP)
102static struct mtd_partition ezbrd_partitions[] = { 102static struct mtd_partition ezbrd_partitions[] = {
103 { 103 {
104 .name = "bootloader(nor)", 104 .name = "bootloader(nor)",
@@ -138,7 +138,7 @@ static struct platform_device ezbrd_flash_device = {
138}; 138};
139#endif 139#endif
140 140
141#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) 141#if IS_ENABLED(CONFIG_MTD_NAND_BF5XX)
142static struct mtd_partition partition_info[] = { 142static struct mtd_partition partition_info[] = {
143 { 143 {
144 .name = "bootloader(nand)", 144 .name = "bootloader(nand)",
@@ -188,7 +188,7 @@ static struct platform_device bf5xx_nand_device = {
188}; 188};
189#endif 189#endif
190 190
191#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 191#if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
192static struct platform_device rtc_device = { 192static struct platform_device rtc_device = {
193 .name = "rtc-bfin", 193 .name = "rtc-bfin",
194 .id = -1, 194 .id = -1,
@@ -196,7 +196,7 @@ static struct platform_device rtc_device = {
196#endif 196#endif
197 197
198 198
199#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 199#if IS_ENABLED(CONFIG_BFIN_MAC)
200#include <linux/bfin_mac.h> 200#include <linux/bfin_mac.h>
201static const unsigned short bfin_mac_peripherals[] = P_RMII0; 201static const unsigned short bfin_mac_peripherals[] = P_RMII0;
202 202
@@ -229,8 +229,7 @@ static struct platform_device bfin_mac_device = {
229}; 229};
230#endif 230#endif
231 231
232#if defined(CONFIG_MTD_M25P80) \ 232#if IS_ENABLED(CONFIG_MTD_M25P80)
233 || defined(CONFIG_MTD_M25P80_MODULE)
234static struct mtd_partition bfin_spi_flash_partitions[] = { 233static struct mtd_partition bfin_spi_flash_partitions[] = {
235 { 234 {
236 .name = "bootloader(spi)", 235 .name = "bootloader(spi)",
@@ -257,13 +256,13 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = {
257}; 256};
258#endif 257#endif
259 258
260#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 259#if IS_ENABLED(CONFIG_MMC_SPI)
261static struct bfin5xx_spi_chip mmc_spi_chip_info = { 260static struct bfin5xx_spi_chip mmc_spi_chip_info = {
262 .enable_dma = 0, 261 .enable_dma = 0,
263}; 262};
264#endif 263#endif
265 264
266#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 265#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877)
267static const struct ad7877_platform_data bfin_ad7877_ts_info = { 266static const struct ad7877_platform_data bfin_ad7877_ts_info = {
268 .model = 7877, 267 .model = 7877,
269 .vref_delay_usecs = 50, /* internal, no capacitor */ 268 .vref_delay_usecs = 50, /* internal, no capacitor */
@@ -279,7 +278,7 @@ static const struct ad7877_platform_data bfin_ad7877_ts_info = {
279}; 278};
280#endif 279#endif
281 280
282#if defined(CONFIG_TOUCHSCREEN_AD7879) || defined(CONFIG_TOUCHSCREEN_AD7879_MODULE) 281#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7879)
283#include <linux/spi/ad7879.h> 282#include <linux/spi/ad7879.h>
284static const struct ad7879_platform_data bfin_ad7879_ts_info = { 283static const struct ad7879_platform_data bfin_ad7879_ts_info = {
285 .model = 7879, /* Model = AD7879 */ 284 .model = 7879, /* Model = AD7879 */
@@ -297,8 +296,7 @@ static const struct ad7879_platform_data bfin_ad7879_ts_info = {
297#endif 296#endif
298 297
299static struct spi_board_info bfin_spi_board_info[] __initdata = { 298static struct spi_board_info bfin_spi_board_info[] __initdata = {
300#if defined(CONFIG_MTD_M25P80) \ 299#if IS_ENABLED(CONFIG_MTD_M25P80)
301 || defined(CONFIG_MTD_M25P80_MODULE)
302 { 300 {
303 /* the modalias must be the same as spi device driver name */ 301 /* the modalias must be the same as spi device driver name */
304 .modalias = "m25p80", /* Name of spi_driver for this device */ 302 .modalias = "m25p80", /* Name of spi_driver for this device */
@@ -311,7 +309,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
311 }, 309 },
312#endif 310#endif
313 311
314#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 312#if IS_ENABLED(CONFIG_MMC_SPI)
315 { 313 {
316 .modalias = "mmc_spi", 314 .modalias = "mmc_spi",
317 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ 315 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
@@ -321,7 +319,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
321 .mode = SPI_MODE_3, 319 .mode = SPI_MODE_3,
322 }, 320 },
323#endif 321#endif
324#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 322#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877)
325 { 323 {
326 .modalias = "ad7877", 324 .modalias = "ad7877",
327 .platform_data = &bfin_ad7877_ts_info, 325 .platform_data = &bfin_ad7877_ts_info,
@@ -331,7 +329,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
331 .chip_select = 2, 329 .chip_select = 2,
332 }, 330 },
333#endif 331#endif
334#if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE) 332#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7879_SPI)
335 { 333 {
336 .modalias = "ad7879", 334 .modalias = "ad7879",
337 .platform_data = &bfin_ad7879_ts_info, 335 .platform_data = &bfin_ad7879_ts_info,
@@ -342,7 +340,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
342 .mode = SPI_CPHA | SPI_CPOL, 340 .mode = SPI_CPHA | SPI_CPOL,
343 }, 341 },
344#endif 342#endif
345#if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ 343#if IS_ENABLED(CONFIG_SND_SOC_WM8731) \
346 && defined(CONFIG_SND_SOC_WM8731_SPI) 344 && defined(CONFIG_SND_SOC_WM8731_SPI)
347 { 345 {
348 .modalias = "wm8731", 346 .modalias = "wm8731",
@@ -352,7 +350,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
352 .mode = SPI_MODE_0, 350 .mode = SPI_MODE_0,
353 }, 351 },
354#endif 352#endif
355#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 353#if IS_ENABLED(CONFIG_SPI_SPIDEV)
356 { 354 {
357 .modalias = "spidev", 355 .modalias = "spidev",
358 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 356 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
@@ -360,7 +358,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
360 .chip_select = 1, 358 .chip_select = 1,
361 }, 359 },
362#endif 360#endif
363#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) 361#if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1)
364 { 362 {
365 .modalias = "bfin-lq035q1-spi", 363 .modalias = "bfin-lq035q1-spi",
366 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ 364 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
@@ -371,7 +369,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
371#endif 369#endif
372}; 370};
373 371
374#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 372#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
375/* SPI controller data */ 373/* SPI controller data */
376static struct bfin5xx_spi_master bfin_spi0_info = { 374static struct bfin5xx_spi_master bfin_spi0_info = {
377 .num_chipselect = 8, 375 .num_chipselect = 8,
@@ -409,7 +407,7 @@ static struct platform_device bfin_spi0_device = {
409}; 407};
410#endif /* spi master and devices */ 408#endif /* spi master and devices */
411 409
412#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 410#if IS_ENABLED(CONFIG_SERIAL_BFIN)
413#ifdef CONFIG_SERIAL_BFIN_UART0 411#ifdef CONFIG_SERIAL_BFIN_UART0
414static struct resource bfin_uart0_resources[] = { 412static struct resource bfin_uart0_resources[] = {
415 { 413 {
@@ -520,7 +518,7 @@ static struct platform_device bfin_uart1_device = {
520#endif 518#endif
521#endif 519#endif
522 520
523#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 521#if IS_ENABLED(CONFIG_BFIN_SIR)
524#ifdef CONFIG_BFIN_SIR0 522#ifdef CONFIG_BFIN_SIR0
525static struct resource bfin_sir0_resources[] = { 523static struct resource bfin_sir0_resources[] = {
526 { 524 {
@@ -575,7 +573,7 @@ static struct platform_device bfin_sir1_device = {
575#endif 573#endif
576#endif 574#endif
577 575
578#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 576#if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
579static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; 577static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
580 578
581static struct resource bfin_twi0_resource[] = { 579static struct resource bfin_twi0_resource[] = {
@@ -603,12 +601,12 @@ static struct platform_device i2c_bfin_twi_device = {
603#endif 601#endif
604 602
605static struct i2c_board_info __initdata bfin_i2c_board_info[] = { 603static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
606#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) 604#if IS_ENABLED(CONFIG_BFIN_TWI_LCD)
607 { 605 {
608 I2C_BOARD_INFO("pcf8574_lcd", 0x22), 606 I2C_BOARD_INFO("pcf8574_lcd", 0x22),
609 }, 607 },
610#endif 608#endif
611#if defined(CONFIG_INPUT_PCF8574) || defined(CONFIG_INPUT_PCF8574_MODULE) 609#if IS_ENABLED(CONFIG_INPUT_PCF8574)
612 { 610 {
613 I2C_BOARD_INFO("pcf8574_keypad", 0x27), 611 I2C_BOARD_INFO("pcf8574_keypad", 0x27),
614 .irq = IRQ_PF8, 612 .irq = IRQ_PF8,
@@ -616,7 +614,7 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
616#endif 614#endif
617}; 615};
618 616
619#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 617#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
620#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 618#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
621static struct resource bfin_sport0_uart_resources[] = { 619static struct resource bfin_sport0_uart_resources[] = {
622 { 620 {
@@ -687,7 +685,7 @@ static struct platform_device bfin_sport1_uart_device = {
687#endif 685#endif
688#endif 686#endif
689 687
690#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 688#if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
691#include <linux/input.h> 689#include <linux/input.h>
692#include <linux/gpio_keys.h> 690#include <linux/gpio_keys.h>
693 691
@@ -731,7 +729,7 @@ static struct platform_device bfin_dpmc = {
731 }, 729 },
732}; 730};
733 731
734#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) 732#if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1)
735#include <asm/bfin-lq035q1.h> 733#include <asm/bfin-lq035q1.h>
736 734
737static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = { 735static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = {
@@ -764,28 +762,28 @@ static struct platform_device *stamp_devices[] __initdata = {
764 762
765 &bfin_dpmc, 763 &bfin_dpmc,
766 764
767#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) 765#if IS_ENABLED(CONFIG_MTD_NAND_BF5XX)
768 &bf5xx_nand_device, 766 &bf5xx_nand_device,
769#endif 767#endif
770 768
771#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 769#if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
772 &rtc_device, 770 &rtc_device,
773#endif 771#endif
774 772
775#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) 773#if IS_ENABLED(CONFIG_USB_MUSB_HDRC)
776 &musb_device, 774 &musb_device,
777#endif 775#endif
778 776
779#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 777#if IS_ENABLED(CONFIG_BFIN_MAC)
780 &bfin_mii_bus, 778 &bfin_mii_bus,
781 &bfin_mac_device, 779 &bfin_mac_device,
782#endif 780#endif
783 781
784#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 782#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
785 &bfin_spi0_device, 783 &bfin_spi0_device,
786#endif 784#endif
787 785
788#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 786#if IS_ENABLED(CONFIG_SERIAL_BFIN)
789#ifdef CONFIG_SERIAL_BFIN_UART0 787#ifdef CONFIG_SERIAL_BFIN_UART0
790 &bfin_uart0_device, 788 &bfin_uart0_device,
791#endif 789#endif
@@ -794,11 +792,11 @@ static struct platform_device *stamp_devices[] __initdata = {
794#endif 792#endif
795#endif 793#endif
796 794
797#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) 795#if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1)
798 &bfin_lq035q1_device, 796 &bfin_lq035q1_device,
799#endif 797#endif
800 798
801#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 799#if IS_ENABLED(CONFIG_BFIN_SIR)
802#ifdef CONFIG_BFIN_SIR0 800#ifdef CONFIG_BFIN_SIR0
803 &bfin_sir0_device, 801 &bfin_sir0_device,
804#endif 802#endif
@@ -807,11 +805,11 @@ static struct platform_device *stamp_devices[] __initdata = {
807#endif 805#endif
808#endif 806#endif
809 807
810#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 808#if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
811 &i2c_bfin_twi_device, 809 &i2c_bfin_twi_device,
812#endif 810#endif
813 811
814#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 812#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
815#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 813#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
816 &bfin_sport0_uart_device, 814 &bfin_sport0_uart_device,
817#endif 815#endif
@@ -820,11 +818,11 @@ static struct platform_device *stamp_devices[] __initdata = {
820#endif 818#endif
821#endif 819#endif
822 820
823#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 821#if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
824 &bfin_device_gpiokeys, 822 &bfin_device_gpiokeys,
825#endif 823#endif
826 824
827#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 825#if IS_ENABLED(CONFIG_MTD_PHYSMAP)
828 &ezbrd_flash_device, 826 &ezbrd_flash_device,
829#endif 827#endif
830}; 828};
diff --git a/arch/blackfin/mach-bf527/boards/ezkit.c b/arch/blackfin/mach-bf527/boards/ezkit.c
index d0a0c5e527cd..d64f565dc2a0 100644
--- a/arch/blackfin/mach-bf527/boards/ezkit.c
+++ b/arch/blackfin/mach-bf527/boards/ezkit.c
@@ -42,7 +42,7 @@ const char bfin_board_name[] = "ADI BF527-EZKIT";
42 * Driver needs to know address, irq and flag pin. 42 * Driver needs to know address, irq and flag pin.
43 */ 43 */
44 44
45#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) 45#if IS_ENABLED(CONFIG_USB_ISP1760_HCD)
46#include <linux/usb/isp1760.h> 46#include <linux/usb/isp1760.h>
47static struct resource bfin_isp1760_resources[] = { 47static struct resource bfin_isp1760_resources[] = {
48 [0] = { 48 [0] = {
@@ -77,7 +77,7 @@ static struct platform_device bfin_isp1760_device = {
77}; 77};
78#endif 78#endif
79 79
80#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) 80#if IS_ENABLED(CONFIG_USB_MUSB_HDRC)
81static struct resource musb_resources[] = { 81static struct resource musb_resources[] = {
82 [0] = { 82 [0] = {
83 .start = 0xffc03800, 83 .start = 0xffc03800,
@@ -139,7 +139,7 @@ static struct platform_device musb_device = {
139}; 139};
140#endif 140#endif
141 141
142#if defined(CONFIG_FB_BFIN_T350MCQB) || defined(CONFIG_FB_BFIN_T350MCQB_MODULE) 142#if IS_ENABLED(CONFIG_FB_BFIN_T350MCQB)
143 143
144static struct resource bf52x_t350mcqb_resources[] = { 144static struct resource bf52x_t350mcqb_resources[] = {
145 { 145 {
@@ -157,7 +157,7 @@ static struct platform_device bf52x_t350mcqb_device = {
157}; 157};
158#endif 158#endif
159 159
160#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) 160#if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1)
161#include <asm/bfin-lq035q1.h> 161#include <asm/bfin-lq035q1.h>
162 162
163static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = { 163static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = {
@@ -184,7 +184,7 @@ static struct platform_device bfin_lq035q1_device = {
184}; 184};
185#endif 185#endif
186 186
187#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 187#if IS_ENABLED(CONFIG_MTD_PHYSMAP)
188static struct mtd_partition ezkit_partitions[] = { 188static struct mtd_partition ezkit_partitions[] = {
189 { 189 {
190 .name = "bootloader(nor)", 190 .name = "bootloader(nor)",
@@ -224,7 +224,7 @@ static struct platform_device ezkit_flash_device = {
224}; 224};
225#endif 225#endif
226 226
227#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) 227#if IS_ENABLED(CONFIG_MTD_NAND_BF5XX)
228static struct mtd_partition partition_info[] = { 228static struct mtd_partition partition_info[] = {
229 { 229 {
230 .name = "bootloader(nand)", 230 .name = "bootloader(nand)",
@@ -274,7 +274,7 @@ static struct platform_device bf5xx_nand_device = {
274}; 274};
275#endif 275#endif
276 276
277#if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) 277#if IS_ENABLED(CONFIG_BFIN_CFPCMCIA)
278static struct resource bfin_pcmcia_cf_resources[] = { 278static struct resource bfin_pcmcia_cf_resources[] = {
279 { 279 {
280 .start = 0x20310000, /* IO PORT */ 280 .start = 0x20310000, /* IO PORT */
@@ -303,14 +303,14 @@ static struct platform_device bfin_pcmcia_cf_device = {
303}; 303};
304#endif 304#endif
305 305
306#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 306#if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
307static struct platform_device rtc_device = { 307static struct platform_device rtc_device = {
308 .name = "rtc-bfin", 308 .name = "rtc-bfin",
309 .id = -1, 309 .id = -1,
310}; 310};
311#endif 311#endif
312 312
313#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 313#if IS_ENABLED(CONFIG_SMC91X)
314#include <linux/smc91x.h> 314#include <linux/smc91x.h>
315 315
316static struct smc91x_platdata smc91x_info = { 316static struct smc91x_platdata smc91x_info = {
@@ -343,7 +343,7 @@ static struct platform_device smc91x_device = {
343}; 343};
344#endif 344#endif
345 345
346#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE) 346#if IS_ENABLED(CONFIG_DM9000)
347static struct resource dm9000_resources[] = { 347static struct resource dm9000_resources[] = {
348 [0] = { 348 [0] = {
349 .start = 0x203FB800, 349 .start = 0x203FB800,
@@ -370,7 +370,7 @@ static struct platform_device dm9000_device = {
370}; 370};
371#endif 371#endif
372 372
373#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 373#if IS_ENABLED(CONFIG_BFIN_MAC)
374#include <linux/bfin_mac.h> 374#include <linux/bfin_mac.h>
375static const unsigned short bfin_mac_peripherals[] = P_RMII0; 375static const unsigned short bfin_mac_peripherals[] = P_RMII0;
376 376
@@ -403,7 +403,7 @@ static struct platform_device bfin_mac_device = {
403}; 403};
404#endif 404#endif
405 405
406#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 406#if IS_ENABLED(CONFIG_USB_NET2272)
407static struct resource net2272_bfin_resources[] = { 407static struct resource net2272_bfin_resources[] = {
408 { 408 {
409 .start = 0x20300000, 409 .start = 0x20300000,
@@ -427,8 +427,7 @@ static struct platform_device net2272_bfin_device = {
427}; 427};
428#endif 428#endif
429 429
430#if defined(CONFIG_MTD_M25P80) \ 430#if IS_ENABLED(CONFIG_MTD_M25P80)
431 || defined(CONFIG_MTD_M25P80_MODULE)
432static struct mtd_partition bfin_spi_flash_partitions[] = { 431static struct mtd_partition bfin_spi_flash_partitions[] = {
433 { 432 {
434 .name = "bootloader(spi)", 433 .name = "bootloader(spi)",
@@ -455,13 +454,13 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = {
455}; 454};
456#endif 455#endif
457 456
458#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 457#if IS_ENABLED(CONFIG_MMC_SPI)
459static struct bfin5xx_spi_chip mmc_spi_chip_info = { 458static struct bfin5xx_spi_chip mmc_spi_chip_info = {
460 .enable_dma = 0, 459 .enable_dma = 0,
461}; 460};
462#endif 461#endif
463 462
464#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 463#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877)
465static const struct ad7877_platform_data bfin_ad7877_ts_info = { 464static const struct ad7877_platform_data bfin_ad7877_ts_info = {
466 .model = 7877, 465 .model = 7877,
467 .vref_delay_usecs = 50, /* internal, no capacitor */ 466 .vref_delay_usecs = 50, /* internal, no capacitor */
@@ -477,7 +476,7 @@ static const struct ad7877_platform_data bfin_ad7877_ts_info = {
477}; 476};
478#endif 477#endif
479 478
480#if defined(CONFIG_TOUCHSCREEN_AD7879) || defined(CONFIG_TOUCHSCREEN_AD7879_MODULE) 479#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7879)
481#include <linux/spi/ad7879.h> 480#include <linux/spi/ad7879.h>
482static const struct ad7879_platform_data bfin_ad7879_ts_info = { 481static const struct ad7879_platform_data bfin_ad7879_ts_info = {
483 .model = 7879, /* Model = AD7879 */ 482 .model = 7879, /* Model = AD7879 */
@@ -493,7 +492,7 @@ static const struct ad7879_platform_data bfin_ad7879_ts_info = {
493}; 492};
494#endif 493#endif
495 494
496#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 495#if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
497 496
498static const u16 bfin_snd_pin[][7] = { 497static const u16 bfin_snd_pin[][7] = {
499 {P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS, 498 {P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS,
@@ -541,21 +540,21 @@ static struct resource bfin_snd_resources[][4] = {
541}; 540};
542#endif 541#endif
543 542
544#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 543#if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
545static struct platform_device bfin_i2s_pcm = { 544static struct platform_device bfin_i2s_pcm = {
546 .name = "bfin-i2s-pcm-audio", 545 .name = "bfin-i2s-pcm-audio",
547 .id = -1, 546 .id = -1,
548}; 547};
549#endif 548#endif
550 549
551#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) 550#if IS_ENABLED(CONFIG_SND_BF5XX_AC97)
552static struct platform_device bfin_ac97_pcm = { 551static struct platform_device bfin_ac97_pcm = {
553 .name = "bfin-ac97-pcm-audio", 552 .name = "bfin-ac97-pcm-audio",
554 .id = -1, 553 .id = -1,
555}; 554};
556#endif 555#endif
557 556
558#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 557#if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
559static struct platform_device bfin_i2s = { 558static struct platform_device bfin_i2s = {
560 .name = "bfin-i2s", 559 .name = "bfin-i2s",
561 .id = CONFIG_SND_BF5XX_SPORT_NUM, 560 .id = CONFIG_SND_BF5XX_SPORT_NUM,
@@ -567,8 +566,7 @@ static struct platform_device bfin_i2s = {
567}; 566};
568#endif 567#endif
569 568
570#if defined(CONFIG_SND_BF5XX_SOC_AD1836) \ 569#if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD1836)
571 || defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
572static const char * const ad1836_link[] = { 570static const char * const ad1836_link[] = {
573 "bfin-i2s.0", 571 "bfin-i2s.0",
574 "spi0.4", 572 "spi0.4",
@@ -583,8 +581,7 @@ static struct platform_device bfin_ad1836_machine = {
583#endif 581#endif
584 582
585static struct spi_board_info bfin_spi_board_info[] __initdata = { 583static struct spi_board_info bfin_spi_board_info[] __initdata = {
586#if defined(CONFIG_MTD_M25P80) \ 584#if IS_ENABLED(CONFIG_MTD_M25P80)
587 || defined(CONFIG_MTD_M25P80_MODULE)
588 { 585 {
589 /* the modalias must be the same as spi device driver name */ 586 /* the modalias must be the same as spi device driver name */
590 .modalias = "m25p80", /* Name of spi_driver for this device */ 587 .modalias = "m25p80", /* Name of spi_driver for this device */
@@ -597,8 +594,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
597 }, 594 },
598#endif 595#endif
599 596
600#if defined(CONFIG_SND_BF5XX_SOC_AD183X) \ 597#if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD183X)
601 || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
602 { 598 {
603 .modalias = "ad183x", 599 .modalias = "ad183x",
604 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 600 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
@@ -608,7 +604,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
608 .mode = SPI_MODE_3, 604 .mode = SPI_MODE_3,
609 }, 605 },
610#endif 606#endif
611#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 607#if IS_ENABLED(CONFIG_MMC_SPI)
612 { 608 {
613 .modalias = "mmc_spi", 609 .modalias = "mmc_spi",
614 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ 610 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
@@ -619,7 +615,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
619 }, 615 },
620#endif 616#endif
621 617
622#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 618#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877)
623 { 619 {
624 .modalias = "ad7877", 620 .modalias = "ad7877",
625 .platform_data = &bfin_ad7877_ts_info, 621 .platform_data = &bfin_ad7877_ts_info,
@@ -629,7 +625,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
629 .chip_select = 2, 625 .chip_select = 2,
630 }, 626 },
631#endif 627#endif
632#if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE) 628#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7879_SPI)
633 { 629 {
634 .modalias = "ad7879", 630 .modalias = "ad7879",
635 .platform_data = &bfin_ad7879_ts_info, 631 .platform_data = &bfin_ad7879_ts_info,
@@ -640,7 +636,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
640 .mode = SPI_CPHA | SPI_CPOL, 636 .mode = SPI_CPHA | SPI_CPOL,
641 }, 637 },
642#endif 638#endif
643#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 639#if IS_ENABLED(CONFIG_SPI_SPIDEV)
644 { 640 {
645 .modalias = "spidev", 641 .modalias = "spidev",
646 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 642 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
@@ -648,7 +644,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
648 .chip_select = 1, 644 .chip_select = 1,
649 }, 645 },
650#endif 646#endif
651#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) 647#if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1)
652 { 648 {
653 .modalias = "bfin-lq035q1-spi", 649 .modalias = "bfin-lq035q1-spi",
654 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ 650 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
@@ -659,7 +655,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
659#endif 655#endif
660}; 656};
661 657
662#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 658#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
663/* SPI controller data */ 659/* SPI controller data */
664static struct bfin5xx_spi_master bfin_spi0_info = { 660static struct bfin5xx_spi_master bfin_spi0_info = {
665 .num_chipselect = 8, 661 .num_chipselect = 8,
@@ -697,7 +693,7 @@ static struct platform_device bfin_spi0_device = {
697}; 693};
698#endif /* spi master and devices */ 694#endif /* spi master and devices */
699 695
700#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 696#if IS_ENABLED(CONFIG_SERIAL_BFIN)
701#ifdef CONFIG_SERIAL_BFIN_UART0 697#ifdef CONFIG_SERIAL_BFIN_UART0
702static struct resource bfin_uart0_resources[] = { 698static struct resource bfin_uart0_resources[] = {
703 { 699 {
@@ -808,7 +804,7 @@ static struct platform_device bfin_uart1_device = {
808#endif 804#endif
809#endif 805#endif
810 806
811#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 807#if IS_ENABLED(CONFIG_BFIN_SIR)
812#ifdef CONFIG_BFIN_SIR0 808#ifdef CONFIG_BFIN_SIR0
813static struct resource bfin_sir0_resources[] = { 809static struct resource bfin_sir0_resources[] = {
814 { 810 {
@@ -863,7 +859,7 @@ static struct platform_device bfin_sir1_device = {
863#endif 859#endif
864#endif 860#endif
865 861
866#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 862#if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
867static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; 863static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
868 864
869static struct resource bfin_twi0_resource[] = { 865static struct resource bfin_twi0_resource[] = {
@@ -890,7 +886,7 @@ static struct platform_device i2c_bfin_twi_device = {
890}; 886};
891#endif 887#endif
892 888
893#if defined(CONFIG_PMIC_ADP5520) || defined(CONFIG_PMIC_ADP5520_MODULE) 889#if IS_ENABLED(CONFIG_PMIC_ADP5520)
894#include <linux/mfd/adp5520.h> 890#include <linux/mfd/adp5520.h>
895 891
896 /* 892 /*
@@ -956,54 +952,54 @@ static struct adp5520_platform_data adp5520_pdev_data = {
956#endif 952#endif
957 953
958static struct i2c_board_info __initdata bfin_i2c_board_info[] = { 954static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
959#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) 955#if IS_ENABLED(CONFIG_BFIN_TWI_LCD)
960 { 956 {
961 I2C_BOARD_INFO("pcf8574_lcd", 0x22), 957 I2C_BOARD_INFO("pcf8574_lcd", 0x22),
962 }, 958 },
963#endif 959#endif
964#if defined(CONFIG_INPUT_PCF8574) || defined(CONFIG_INPUT_PCF8574_MODULE) 960#if IS_ENABLED(CONFIG_INPUT_PCF8574)
965 { 961 {
966 I2C_BOARD_INFO("pcf8574_keypad", 0x27), 962 I2C_BOARD_INFO("pcf8574_keypad", 0x27),
967 .irq = IRQ_PF8, 963 .irq = IRQ_PF8,
968 }, 964 },
969#endif 965#endif
970#if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE) 966#if IS_ENABLED(CONFIG_FB_BFIN_7393)
971 { 967 {
972 I2C_BOARD_INFO("bfin-adv7393", 0x2B), 968 I2C_BOARD_INFO("bfin-adv7393", 0x2B),
973 }, 969 },
974#endif 970#endif
975#if defined(CONFIG_TOUCHSCREEN_AD7879_I2C) || defined(CONFIG_TOUCHSCREEN_AD7879_I2C_MODULE) 971#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7879_I2C)
976 { 972 {
977 I2C_BOARD_INFO("ad7879", 0x2C), 973 I2C_BOARD_INFO("ad7879", 0x2C),
978 .irq = IRQ_PF8, 974 .irq = IRQ_PF8,
979 .platform_data = (void *)&bfin_ad7879_ts_info, 975 .platform_data = (void *)&bfin_ad7879_ts_info,
980 }, 976 },
981#endif 977#endif
982#if defined(CONFIG_PMIC_ADP5520) || defined(CONFIG_PMIC_ADP5520_MODULE) 978#if IS_ENABLED(CONFIG_PMIC_ADP5520)
983 { 979 {
984 I2C_BOARD_INFO("pmic-adp5520", 0x32), 980 I2C_BOARD_INFO("pmic-adp5520", 0x32),
985 .irq = IRQ_PF9, 981 .irq = IRQ_PF9,
986 .platform_data = (void *)&adp5520_pdev_data, 982 .platform_data = (void *)&adp5520_pdev_data,
987 }, 983 },
988#endif 984#endif
989#if defined(CONFIG_SND_SOC_SSM2602) || defined(CONFIG_SND_SOC_SSM2602_MODULE) 985#if IS_ENABLED(CONFIG_SND_SOC_SSM2602)
990 { 986 {
991 I2C_BOARD_INFO("ssm2602", 0x1b), 987 I2C_BOARD_INFO("ssm2602", 0x1b),
992 }, 988 },
993#endif 989#endif
994#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) 990#if IS_ENABLED(CONFIG_BFIN_TWI_LCD)
995 { 991 {
996 I2C_BOARD_INFO("ad5252", 0x2f), 992 I2C_BOARD_INFO("ad5252", 0x2f),
997 }, 993 },
998#endif 994#endif
999#if defined(CONFIG_SND_SOC_ADAU1373) || defined(CONFIG_SND_SOC_ADAU1373_MODULE) 995#if IS_ENABLED(CONFIG_SND_SOC_ADAU1373)
1000 { 996 {
1001 I2C_BOARD_INFO("adau1373", 0x1A), 997 I2C_BOARD_INFO("adau1373", 0x1A),
1002 }, 998 },
1003#endif 999#endif
1004}; 1000};
1005 1001
1006#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 1002#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
1007#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 1003#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
1008static struct resource bfin_sport0_uart_resources[] = { 1004static struct resource bfin_sport0_uart_resources[] = {
1009 { 1005 {
@@ -1074,7 +1070,7 @@ static struct platform_device bfin_sport1_uart_device = {
1074#endif 1070#endif
1075#endif 1071#endif
1076 1072
1077#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 1073#if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
1078#include <linux/gpio_keys.h> 1074#include <linux/gpio_keys.h>
1079 1075
1080static struct gpio_keys_button bfin_gpio_keys_table[] = { 1076static struct gpio_keys_button bfin_gpio_keys_table[] = {
@@ -1095,7 +1091,7 @@ static struct platform_device bfin_device_gpiokeys = {
1095}; 1091};
1096#endif 1092#endif
1097 1093
1098#if defined(CONFIG_INPUT_BFIN_ROTARY) || defined(CONFIG_INPUT_BFIN_ROTARY_MODULE) 1094#if IS_ENABLED(CONFIG_INPUT_BFIN_ROTARY)
1099#include <asm/bfin_rotary.h> 1095#include <asm/bfin_rotary.h>
1100 1096
1101static struct bfin_rotary_platform_data bfin_rotary_data = { 1097static struct bfin_rotary_platform_data bfin_rotary_data = {
@@ -1153,56 +1149,56 @@ static struct platform_device *stamp_devices[] __initdata = {
1153 1149
1154 &bfin_dpmc, 1150 &bfin_dpmc,
1155 1151
1156#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) 1152#if IS_ENABLED(CONFIG_MTD_NAND_BF5XX)
1157 &bf5xx_nand_device, 1153 &bf5xx_nand_device,
1158#endif 1154#endif
1159 1155
1160#if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) 1156#if IS_ENABLED(CONFIG_BFIN_CFPCMCIA)
1161 &bfin_pcmcia_cf_device, 1157 &bfin_pcmcia_cf_device,
1162#endif 1158#endif
1163 1159
1164#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 1160#if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
1165 &rtc_device, 1161 &rtc_device,
1166#endif 1162#endif
1167 1163
1168#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) 1164#if IS_ENABLED(CONFIG_USB_ISP1760_HCD)
1169 &bfin_isp1760_device, 1165 &bfin_isp1760_device,
1170#endif 1166#endif
1171 1167
1172#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) 1168#if IS_ENABLED(CONFIG_USB_MUSB_HDRC)
1173 &musb_device, 1169 &musb_device,
1174#endif 1170#endif
1175 1171
1176#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 1172#if IS_ENABLED(CONFIG_SMC91X)
1177 &smc91x_device, 1173 &smc91x_device,
1178#endif 1174#endif
1179 1175
1180#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE) 1176#if IS_ENABLED(CONFIG_DM9000)
1181 &dm9000_device, 1177 &dm9000_device,
1182#endif 1178#endif
1183 1179
1184#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 1180#if IS_ENABLED(CONFIG_BFIN_MAC)
1185 &bfin_mii_bus, 1181 &bfin_mii_bus,
1186 &bfin_mac_device, 1182 &bfin_mac_device,
1187#endif 1183#endif
1188 1184
1189#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 1185#if IS_ENABLED(CONFIG_USB_NET2272)
1190 &net2272_bfin_device, 1186 &net2272_bfin_device,
1191#endif 1187#endif
1192 1188
1193#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 1189#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
1194 &bfin_spi0_device, 1190 &bfin_spi0_device,
1195#endif 1191#endif
1196 1192
1197#if defined(CONFIG_FB_BFIN_T350MCQB) || defined(CONFIG_FB_BFIN_T350MCQB_MODULE) 1193#if IS_ENABLED(CONFIG_FB_BFIN_T350MCQB)
1198 &bf52x_t350mcqb_device, 1194 &bf52x_t350mcqb_device,
1199#endif 1195#endif
1200 1196
1201#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) 1197#if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1)
1202 &bfin_lq035q1_device, 1198 &bfin_lq035q1_device,
1203#endif 1199#endif
1204 1200
1205#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 1201#if IS_ENABLED(CONFIG_SERIAL_BFIN)
1206#ifdef CONFIG_SERIAL_BFIN_UART0 1202#ifdef CONFIG_SERIAL_BFIN_UART0
1207 &bfin_uart0_device, 1203 &bfin_uart0_device,
1208#endif 1204#endif
@@ -1211,7 +1207,7 @@ static struct platform_device *stamp_devices[] __initdata = {
1211#endif 1207#endif
1212#endif 1208#endif
1213 1209
1214#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 1210#if IS_ENABLED(CONFIG_BFIN_SIR)
1215#ifdef CONFIG_BFIN_SIR0 1211#ifdef CONFIG_BFIN_SIR0
1216 &bfin_sir0_device, 1212 &bfin_sir0_device,
1217#endif 1213#endif
@@ -1220,11 +1216,11 @@ static struct platform_device *stamp_devices[] __initdata = {
1220#endif 1216#endif
1221#endif 1217#endif
1222 1218
1223#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 1219#if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
1224 &i2c_bfin_twi_device, 1220 &i2c_bfin_twi_device,
1225#endif 1221#endif
1226 1222
1227#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 1223#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
1228#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 1224#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
1229 &bfin_sport0_uart_device, 1225 &bfin_sport0_uart_device,
1230#endif 1226#endif
@@ -1233,32 +1229,31 @@ static struct platform_device *stamp_devices[] __initdata = {
1233#endif 1229#endif
1234#endif 1230#endif
1235 1231
1236#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 1232#if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
1237 &bfin_device_gpiokeys, 1233 &bfin_device_gpiokeys,
1238#endif 1234#endif
1239 1235
1240#if defined(CONFIG_INPUT_BFIN_ROTARY) || defined(CONFIG_INPUT_BFIN_ROTARY_MODULE) 1236#if IS_ENABLED(CONFIG_INPUT_BFIN_ROTARY)
1241 &bfin_rotary_device, 1237 &bfin_rotary_device,
1242#endif 1238#endif
1243 1239
1244#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 1240#if IS_ENABLED(CONFIG_MTD_PHYSMAP)
1245 &ezkit_flash_device, 1241 &ezkit_flash_device,
1246#endif 1242#endif
1247 1243
1248#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 1244#if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
1249 &bfin_i2s_pcm, 1245 &bfin_i2s_pcm,
1250#endif 1246#endif
1251 1247
1252#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) 1248#if IS_ENABLED(CONFIG_SND_BF5XX_AC97)
1253 &bfin_ac97_pcm, 1249 &bfin_ac97_pcm,
1254#endif 1250#endif
1255 1251
1256#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 1252#if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
1257 &bfin_i2s, 1253 &bfin_i2s,
1258#endif 1254#endif
1259 1255
1260#if defined(CONFIG_SND_BF5XX_SOC_AD1836) || \ 1256#if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD1836)
1261 defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
1262 &bfin_ad1836_machine, 1257 &bfin_ad1836_machine,
1263#endif 1258#endif
1264}; 1259};
diff --git a/arch/blackfin/mach-bf527/boards/tll6527m.c b/arch/blackfin/mach-bf527/boards/tll6527m.c
index 1509c5a8a3ff..a0f5856a5ff8 100644
--- a/arch/blackfin/mach-bf527/boards/tll6527m.c
+++ b/arch/blackfin/mach-bf527/boards/tll6527m.c
@@ -28,8 +28,7 @@
28#include <asm/portmux.h> 28#include <asm/portmux.h>
29#include <asm/dpmc.h> 29#include <asm/dpmc.h>
30 30
31#if defined(CONFIG_TOUCHSCREEN_AD7879) \ 31#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7879)
32 || defined(CONFIG_TOUCHSCREEN_AD7879_MODULE)
33#include <linux/spi/ad7879.h> 32#include <linux/spi/ad7879.h>
34#define LCD_BACKLIGHT_GPIO 0x40 33#define LCD_BACKLIGHT_GPIO 0x40
35/* TLL6527M uses TLL7UIQ35 / ADI LCD EZ Extender. AD7879 AUX GPIO is used for 34/* TLL6527M uses TLL7UIQ35 / ADI LCD EZ Extender. AD7879 AUX GPIO is used for
@@ -45,7 +44,7 @@ const char bfin_board_name[] = "TLL6527M";
45 * Driver needs to know address, irq and flag pin. 44 * Driver needs to know address, irq and flag pin.
46 */ 45 */
47 46
48#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) 47#if IS_ENABLED(CONFIG_USB_MUSB_HDRC)
49static struct resource musb_resources[] = { 48static struct resource musb_resources[] = {
50 [0] = { 49 [0] = {
51 .start = 0xffc03800, 50 .start = 0xffc03800,
@@ -104,7 +103,7 @@ static struct platform_device musb_device = {
104}; 103};
105#endif 104#endif
106 105
107#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) 106#if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1)
108#include <asm/bfin-lq035q1.h> 107#include <asm/bfin-lq035q1.h>
109 108
110static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = { 109static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = {
@@ -133,7 +132,7 @@ static struct platform_device bfin_lq035q1_device = {
133}; 132};
134#endif 133#endif
135 134
136#if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE) 135#if IS_ENABLED(CONFIG_MTD_GPIO_ADDR)
137static struct mtd_partition tll6527m_partitions[] = { 136static struct mtd_partition tll6527m_partitions[] = {
138 { 137 {
139 .name = "bootloader(nor)", 138 .name = "bootloader(nor)",
@@ -182,7 +181,7 @@ static struct platform_device tll6527m_flash_device = {
182}; 181};
183#endif 182#endif
184 183
185#if defined(CONFIG_GPIO_DECODER) || defined(CONFIG_GPIO_DECODER_MODULE) 184#if IS_ENABLED(CONFIG_GPIO_DECODER)
186/* An SN74LVC138A 3:8 decoder chip has been used to generate 7 augmented 185/* An SN74LVC138A 3:8 decoder chip has been used to generate 7 augmented
187 * outputs used as SPI CS lines for all SPI SLAVE devices on TLL6527v1-0. 186 * outputs used as SPI CS lines for all SPI SLAVE devices on TLL6527v1-0.
188 * EXP_GPIO_SPISEL_BASE is the base number for the expanded outputs being 187 * EXP_GPIO_SPISEL_BASE is the base number for the expanded outputs being
@@ -215,7 +214,7 @@ static struct platform_device spi_decoded_gpio = {
215 214
216#endif 215#endif
217 216
218#if defined(CONFIG_INPUT_ADXL34X) || defined(CONFIG_INPUT_ADXL34X_MODULE) 217#if IS_ENABLED(CONFIG_INPUT_ADXL34X)
219#include <linux/input/adxl34x.h> 218#include <linux/input/adxl34x.h>
220static const struct adxl34x_platform_data adxl345_info = { 219static const struct adxl34x_platform_data adxl345_info = {
221 .x_axis_offset = 0, 220 .x_axis_offset = 0,
@@ -250,14 +249,14 @@ static const struct adxl34x_platform_data adxl345_info = {
250}; 249};
251#endif 250#endif
252 251
253#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 252#if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
254static struct platform_device rtc_device = { 253static struct platform_device rtc_device = {
255 .name = "rtc-bfin", 254 .name = "rtc-bfin",
256 .id = -1, 255 .id = -1,
257}; 256};
258#endif 257#endif
259 258
260#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 259#if IS_ENABLED(CONFIG_BFIN_MAC)
261#include <linux/bfin_mac.h> 260#include <linux/bfin_mac.h>
262static const unsigned short bfin_mac_peripherals[] = P_RMII0; 261static const unsigned short bfin_mac_peripherals[] = P_RMII0;
263 262
@@ -290,8 +289,7 @@ static struct platform_device bfin_mac_device = {
290}; 289};
291#endif 290#endif
292 291
293#if defined(CONFIG_MTD_M25P80) \ 292#if IS_ENABLED(CONFIG_MTD_M25P80)
294 || defined(CONFIG_MTD_M25P80_MODULE)
295static struct mtd_partition bfin_spi_flash_partitions[] = { 293static struct mtd_partition bfin_spi_flash_partitions[] = {
296 { 294 {
297 .name = "bootloader(spi)", 295 .name = "bootloader(spi)",
@@ -318,14 +316,13 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = {
318}; 316};
319#endif 317#endif
320 318
321#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 319#if IS_ENABLED(CONFIG_MMC_SPI)
322static struct bfin5xx_spi_chip mmc_spi_chip_info = { 320static struct bfin5xx_spi_chip mmc_spi_chip_info = {
323 .enable_dma = 0, 321 .enable_dma = 0,
324}; 322};
325#endif 323#endif
326 324
327#if defined(CONFIG_TOUCHSCREEN_AD7879) \ 325#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7879)
328 || defined(CONFIG_TOUCHSCREEN_AD7879_MODULE)
329static const struct ad7879_platform_data bfin_ad7879_ts_info = { 326static const struct ad7879_platform_data bfin_ad7879_ts_info = {
330 .model = 7879, /* Model = AD7879 */ 327 .model = 7879, /* Model = AD7879 */
331 .x_plate_ohms = 620, /* 620 Ohm from the touch datasheet */ 328 .x_plate_ohms = 620, /* 620 Ohm from the touch datasheet */
@@ -343,7 +340,7 @@ static const struct ad7879_platform_data bfin_ad7879_ts_info = {
343}; 340};
344#endif 341#endif
345 342
346#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 343#if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
347static struct platform_device bfin_i2s = { 344static struct platform_device bfin_i2s = {
348 .name = "bfin-i2s", 345 .name = "bfin-i2s",
349 .id = CONFIG_SND_BF5XX_SPORT_NUM, 346 .id = CONFIG_SND_BF5XX_SPORT_NUM,
@@ -351,7 +348,7 @@ static struct platform_device bfin_i2s = {
351}; 348};
352#endif 349#endif
353 350
354#if defined(CONFIG_GPIO_MCP23S08) || defined(CONFIG_GPIO_MCP23S08_MODULE) 351#if IS_ENABLED(CONFIG_GPIO_MCP23S08)
355#include <linux/spi/mcp23s08.h> 352#include <linux/spi/mcp23s08.h>
356static const struct mcp23s08_platform_data bfin_mcp23s08_sys_gpio_info = { 353static const struct mcp23s08_platform_data bfin_mcp23s08_sys_gpio_info = {
357 .chip[0].is_present = true, 354 .chip[0].is_present = true,
@@ -364,8 +361,7 @@ static const struct mcp23s08_platform_data bfin_mcp23s08_usr_gpio_info = {
364#endif 361#endif
365 362
366static struct spi_board_info bfin_spi_board_info[] __initdata = { 363static struct spi_board_info bfin_spi_board_info[] __initdata = {
367#if defined(CONFIG_MTD_M25P80) \ 364#if IS_ENABLED(CONFIG_MTD_M25P80)
368 || defined(CONFIG_MTD_M25P80_MODULE)
369 { 365 {
370 /* the modalias must be the same as spi device driver name */ 366 /* the modalias must be the same as spi device driver name */
371 .modalias = "m25p80", /* Name of spi_driver for this device */ 367 .modalias = "m25p80", /* Name of spi_driver for this device */
@@ -381,7 +377,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
381 }, 377 },
382#endif 378#endif
383 379
384#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 380#if IS_ENABLED(CONFIG_MMC_SPI)
385 { 381 {
386 .modalias = "mmc_spi", 382 .modalias = "mmc_spi",
387/* 383/*
@@ -396,8 +392,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
396 .mode = SPI_MODE_0, 392 .mode = SPI_MODE_0,
397 }, 393 },
398#endif 394#endif
399#if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) \ 395#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7879_SPI)
400 || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE)
401 { 396 {
402 .modalias = "ad7879", 397 .modalias = "ad7879",
403 .platform_data = &bfin_ad7879_ts_info, 398 .platform_data = &bfin_ad7879_ts_info,
@@ -409,7 +404,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
409 .mode = SPI_CPHA | SPI_CPOL, 404 .mode = SPI_CPHA | SPI_CPOL,
410 }, 405 },
411#endif 406#endif
412#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 407#if IS_ENABLED(CONFIG_SPI_SPIDEV)
413 { 408 {
414 .modalias = "spidev", 409 .modalias = "spidev",
415 .max_speed_hz = 10000000, 410 .max_speed_hz = 10000000,
@@ -419,7 +414,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
419 .mode = SPI_CPHA | SPI_CPOL, 414 .mode = SPI_CPHA | SPI_CPOL,
420 }, 415 },
421#endif 416#endif
422#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) 417#if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1)
423 { 418 {
424 .modalias = "bfin-lq035q1-spi", 419 .modalias = "bfin-lq035q1-spi",
425 .max_speed_hz = 20000000, 420 .max_speed_hz = 20000000,
@@ -428,7 +423,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
428 .mode = SPI_CPHA | SPI_CPOL, 423 .mode = SPI_CPHA | SPI_CPOL,
429 }, 424 },
430#endif 425#endif
431#if defined(CONFIG_GPIO_MCP23S08) || defined(CONFIG_GPIO_MCP23S08_MODULE) 426#if IS_ENABLED(CONFIG_GPIO_MCP23S08)
432 { 427 {
433 .modalias = "mcp23s08", 428 .modalias = "mcp23s08",
434 .platform_data = &bfin_mcp23s08_sys_gpio_info, 429 .platform_data = &bfin_mcp23s08_sys_gpio_info,
@@ -448,7 +443,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
448#endif 443#endif
449}; 444};
450 445
451#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 446#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
452/* SPI controller data */ 447/* SPI controller data */
453static struct bfin5xx_spi_master bfin_spi0_info = { 448static struct bfin5xx_spi_master bfin_spi0_info = {
454 .num_chipselect = EXP_GPIO_SPISEL_BASE + 8 + MAX_CTRL_CS, 449 .num_chipselect = EXP_GPIO_SPISEL_BASE + 8 + MAX_CTRL_CS,
@@ -487,7 +482,7 @@ static struct platform_device bfin_spi0_device = {
487}; 482};
488#endif /* spi master and devices */ 483#endif /* spi master and devices */
489 484
490#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 485#if IS_ENABLED(CONFIG_SERIAL_BFIN)
491#ifdef CONFIG_SERIAL_BFIN_UART0 486#ifdef CONFIG_SERIAL_BFIN_UART0
492static struct resource bfin_uart0_resources[] = { 487static struct resource bfin_uart0_resources[] = {
493 { 488 {
@@ -600,7 +595,7 @@ static struct platform_device bfin_uart1_device = {
600#endif 595#endif
601#endif 596#endif
602 597
603#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 598#if IS_ENABLED(CONFIG_BFIN_SIR)
604#ifdef CONFIG_BFIN_SIR0 599#ifdef CONFIG_BFIN_SIR0
605static struct resource bfin_sir0_resources[] = { 600static struct resource bfin_sir0_resources[] = {
606 { 601 {
@@ -655,7 +650,7 @@ static struct platform_device bfin_sir1_device = {
655#endif 650#endif
656#endif 651#endif
657 652
658#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 653#if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
659static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; 654static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
660 655
661static struct resource bfin_twi0_resource[] = { 656static struct resource bfin_twi0_resource[] = {
@@ -683,26 +678,25 @@ static struct platform_device i2c_bfin_twi_device = {
683#endif 678#endif
684 679
685static struct i2c_board_info __initdata bfin_i2c_board_info[] = { 680static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
686#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) 681#if IS_ENABLED(CONFIG_BFIN_TWI_LCD)
687 { 682 {
688 I2C_BOARD_INFO("pcf8574_lcd", 0x22), 683 I2C_BOARD_INFO("pcf8574_lcd", 0x22),
689 }, 684 },
690#endif 685#endif
691 686
692#if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE) 687#if IS_ENABLED(CONFIG_FB_BFIN_7393)
693 { 688 {
694 I2C_BOARD_INFO("bfin-adv7393", 0x2B), 689 I2C_BOARD_INFO("bfin-adv7393", 0x2B),
695 }, 690 },
696#endif 691#endif
697#if defined(CONFIG_TOUCHSCREEN_AD7879_I2C) \ 692#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7879_I2C)
698 || defined(CONFIG_TOUCHSCREEN_AD7879_I2C_MODULE)
699 { 693 {
700 I2C_BOARD_INFO("ad7879", 0x2C), 694 I2C_BOARD_INFO("ad7879", 0x2C),
701 .irq = IRQ_PH14, 695 .irq = IRQ_PH14,
702 .platform_data = (void *)&bfin_ad7879_ts_info, 696 .platform_data = (void *)&bfin_ad7879_ts_info,
703 }, 697 },
704#endif 698#endif
705#if defined(CONFIG_SND_SOC_SSM2602) || defined(CONFIG_SND_SOC_SSM2602_MODULE) 699#if IS_ENABLED(CONFIG_SND_SOC_SSM2602)
706 { 700 {
707 I2C_BOARD_INFO("ssm2602", 0x1b), 701 I2C_BOARD_INFO("ssm2602", 0x1b),
708 }, 702 },
@@ -714,8 +708,7 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
714 { 708 {
715 I2C_BOARD_INFO("ltc3576", 0x09), 709 I2C_BOARD_INFO("ltc3576", 0x09),
716 }, 710 },
717#if defined(CONFIG_INPUT_ADXL34X_I2C) \ 711#if IS_ENABLED(CONFIG_INPUT_ADXL34X_I2C)
718 || defined(CONFIG_INPUT_ADXL34X_I2C_MODULE)
719 { 712 {
720 I2C_BOARD_INFO("adxl34x", 0x53), 713 I2C_BOARD_INFO("adxl34x", 0x53),
721 .irq = IRQ_PH13, 714 .irq = IRQ_PH13,
@@ -724,8 +717,7 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
724#endif 717#endif
725}; 718};
726 719
727#if defined(CONFIG_SERIAL_BFIN_SPORT) \ 720#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
728 || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
729#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 721#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
730static struct resource bfin_sport0_uart_resources[] = { 722static struct resource bfin_sport0_uart_resources[] = {
731 { 723 {
@@ -823,28 +815,28 @@ static struct platform_device *tll6527m_devices[] __initdata = {
823 815
824 &bfin_dpmc, 816 &bfin_dpmc,
825 817
826#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 818#if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
827 &rtc_device, 819 &rtc_device,
828#endif 820#endif
829 821
830#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) 822#if IS_ENABLED(CONFIG_USB_MUSB_HDRC)
831 &musb_device, 823 &musb_device,
832#endif 824#endif
833 825
834#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 826#if IS_ENABLED(CONFIG_BFIN_MAC)
835 &bfin_mii_bus, 827 &bfin_mii_bus,
836 &bfin_mac_device, 828 &bfin_mac_device,
837#endif 829#endif
838 830
839#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 831#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
840 &bfin_spi0_device, 832 &bfin_spi0_device,
841#endif 833#endif
842 834
843#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) 835#if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1)
844 &bfin_lq035q1_device, 836 &bfin_lq035q1_device,
845#endif 837#endif
846 838
847#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 839#if IS_ENABLED(CONFIG_SERIAL_BFIN)
848#ifdef CONFIG_SERIAL_BFIN_UART0 840#ifdef CONFIG_SERIAL_BFIN_UART0
849 &bfin_uart0_device, 841 &bfin_uart0_device,
850#endif 842#endif
@@ -853,7 +845,7 @@ static struct platform_device *tll6527m_devices[] __initdata = {
853#endif 845#endif
854#endif 846#endif
855 847
856#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 848#if IS_ENABLED(CONFIG_BFIN_SIR)
857#ifdef CONFIG_BFIN_SIR0 849#ifdef CONFIG_BFIN_SIR0
858 &bfin_sir0_device, 850 &bfin_sir0_device,
859#endif 851#endif
@@ -862,12 +854,11 @@ static struct platform_device *tll6527m_devices[] __initdata = {
862#endif 854#endif
863#endif 855#endif
864 856
865#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 857#if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
866 &i2c_bfin_twi_device, 858 &i2c_bfin_twi_device,
867#endif 859#endif
868 860
869#if defined(CONFIG_SERIAL_BFIN_SPORT) \ 861#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
870 || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
871#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 862#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
872 &bfin_sport0_uart_device, 863 &bfin_sport0_uart_device,
873#endif 864#endif
@@ -876,15 +867,15 @@ static struct platform_device *tll6527m_devices[] __initdata = {
876#endif 867#endif
877#endif 868#endif
878 869
879#if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE) 870#if IS_ENABLED(CONFIG_MTD_GPIO_ADDR)
880 &tll6527m_flash_device, 871 &tll6527m_flash_device,
881#endif 872#endif
882 873
883#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 874#if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
884 &bfin_i2s, 875 &bfin_i2s,
885#endif 876#endif
886 877
887#if defined(CONFIG_GPIO_DECODER) || defined(CONFIG_GPIO_DECODER_MODULE) 878#if IS_ENABLED(CONFIG_GPIO_DECODER)
888 &spi_decoded_gpio, 879 &spi_decoded_gpio,
889#endif 880#endif
890}; 881};