diff options
| author | Steven Miao <realmz6@gmail.com> | 2014-04-11 14:07:27 -0400 |
|---|---|---|
| committer | Steven Miao <realmz6@gmail.com> | 2014-04-11 20:48:01 -0400 |
| commit | c4a2c58d20953ff1080f50f705cdd952f6d301b2 (patch) | |
| tree | 9e604fad91d728839cbbea1549248339729a1829 | |
| parent | f8ef77d9389f9b52fe80de4f1b236af3391420b8 (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>
28 files changed, 1089 insertions, 1209 deletions
diff --git a/arch/blackfin/mach-bf518/boards/ezbrd.c b/arch/blackfin/mach-bf518/boards/ezbrd.c index f8047ca3b339..d022112927c2 100644 --- a/arch/blackfin/mach-bf518/boards/ezbrd.c +++ b/arch/blackfin/mach-bf518/boards/ezbrd.c | |||
| @@ -36,7 +36,7 @@ const char bfin_board_name[] = "ADI BF518F-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_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) | 39 | #if IS_ENABLED(CONFIG_MTD_PHYSMAP) |
| 40 | static struct mtd_partition ezbrd_partitions[] = { | 40 | static struct mtd_partition ezbrd_partitions[] = { |
| 41 | { | 41 | { |
| 42 | .name = "bootloader(nor)", | 42 | .name = "bootloader(nor)", |
| @@ -61,7 +61,7 @@ static struct physmap_flash_data ezbrd_flash_data = { | |||
| 61 | 61 | ||
| 62 | static struct resource ezbrd_flash_resource = { | 62 | static struct resource ezbrd_flash_resource = { |
| 63 | .start = 0x20000000, | 63 | .start = 0x20000000, |
| 64 | #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) | 64 | #if IS_ENABLED(CONFIG_SPI_BFIN5XX) |
| 65 | .end = 0x202fffff, | 65 | .end = 0x202fffff, |
| 66 | #else | 66 | #else |
| 67 | .end = 0x203fffff, | 67 | .end = 0x203fffff, |
| @@ -80,14 +80,14 @@ static struct platform_device ezbrd_flash_device = { | |||
| 80 | }; | 80 | }; |
| 81 | #endif | 81 | #endif |
| 82 | 82 | ||
| 83 | #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) | 83 | #if IS_ENABLED(CONFIG_RTC_DRV_BFIN) |
| 84 | static struct platform_device rtc_device = { | 84 | static struct platform_device rtc_device = { |
| 85 | .name = "rtc-bfin", | 85 | .name = "rtc-bfin", |
| 86 | .id = -1, | 86 | .id = -1, |
| 87 | }; | 87 | }; |
| 88 | #endif | 88 | #endif |
| 89 | 89 | ||
| 90 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) | 90 | #if IS_ENABLED(CONFIG_BFIN_MAC) |
| 91 | #include <linux/bfin_mac.h> | 91 | #include <linux/bfin_mac.h> |
| 92 | static const unsigned short bfin_mac_peripherals[] = { | 92 | static const unsigned short bfin_mac_peripherals[] = { |
| 93 | P_MII0_ETxD0, | 93 | P_MII0_ETxD0, |
| @@ -105,7 +105,7 @@ static const unsigned short bfin_mac_peripherals[] = { | |||
| 105 | 105 | ||
| 106 | static struct bfin_phydev_platform_data bfin_phydev_data[] = { | 106 | static struct bfin_phydev_platform_data bfin_phydev_data[] = { |
| 107 | { | 107 | { |
| 108 | #if defined(CONFIG_NET_DSA_KSZ8893M) || defined(CONFIG_NET_DSA_KSZ8893M_MODULE) | 108 | #if IS_ENABLED(CONFIG_NET_DSA_KSZ8893M) |
| 109 | .addr = 3, | 109 | .addr = 3, |
| 110 | #else | 110 | #else |
| 111 | .addr = 1, | 111 | .addr = 1, |
| @@ -119,7 +119,7 @@ static struct bfin_mii_bus_platform_data bfin_mii_bus_data = { | |||
| 119 | .phydev_data = bfin_phydev_data, | 119 | .phydev_data = bfin_phydev_data, |
| 120 | .phy_mode = PHY_INTERFACE_MODE_MII, | 120 | .phy_mode = PHY_INTERFACE_MODE_MII, |
| 121 | .mac_peripherals = bfin_mac_peripherals, | 121 | .mac_peripherals = bfin_mac_peripherals, |
| 122 | #if defined(CONFIG_NET_DSA_KSZ8893M) || defined(CONFIG_NET_DSA_KSZ8893M_MODULE) | 122 | #if IS_ENABLED(CONFIG_NET_DSA_KSZ8893M) |
| 123 | .phy_mask = 0xfff7, /* Only probe the port phy connect to the on chip MAC */ | 123 | .phy_mask = 0xfff7, /* Only probe the port phy connect to the on chip MAC */ |
| 124 | #endif | 124 | #endif |
| 125 | .vlan1_mask = 1, | 125 | .vlan1_mask = 1, |
| @@ -140,7 +140,7 @@ static struct platform_device bfin_mac_device = { | |||
| 140 | } | 140 | } |
| 141 | }; | 141 | }; |
| 142 | 142 | ||
| 143 | #if defined(CONFIG_NET_DSA_KSZ8893M) || defined(CONFIG_NET_DSA_KSZ8893M_MODULE) | 143 | #if IS_ENABLED(CONFIG_NET_DSA_KSZ8893M) |
| 144 | static struct dsa_chip_data ksz8893m_switch_chip_data = { | 144 | static struct dsa_chip_data ksz8893m_switch_chip_data = { |
| 145 | .mii_bus = &bfin_mii_bus.dev, | 145 | .mii_bus = &bfin_mii_bus.dev, |
| 146 | .port_names = { | 146 | .port_names = { |
| @@ -165,8 +165,7 @@ static struct platform_device ksz8893m_switch_device = { | |||
| 165 | #endif | 165 | #endif |
| 166 | #endif | 166 | #endif |
| 167 | 167 | ||
| 168 | #if defined(CONFIG_MTD_M25P80) \ | 168 | #if IS_ENABLED(CONFIG_MTD_M25P80) |
| 169 | || defined(CONFIG_MTD_M25P80_MODULE) | ||
| 170 | static struct mtd_partition bfin_spi_flash_partitions[] = { | 169 | static struct mtd_partition bfin_spi_flash_partitions[] = { |
| 171 | { | 170 | { |
| 172 | .name = "bootloader(spi)", | 171 | .name = "bootloader(spi)", |
| @@ -193,13 +192,13 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = { | |||
| 193 | }; | 192 | }; |
| 194 | #endif | 193 | #endif |
| 195 | 194 | ||
| 196 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) | 195 | #if IS_ENABLED(CONFIG_MMC_SPI) |
| 197 | static struct bfin5xx_spi_chip mmc_spi_chip_info = { | 196 | static struct bfin5xx_spi_chip mmc_spi_chip_info = { |
| 198 | .enable_dma = 0, | 197 | .enable_dma = 0, |
| 199 | }; | 198 | }; |
| 200 | #endif | 199 | #endif |
| 201 | 200 | ||
| 202 | #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) | 201 | #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877) |
| 203 | static const struct ad7877_platform_data bfin_ad7877_ts_info = { | 202 | static const struct ad7877_platform_data bfin_ad7877_ts_info = { |
| 204 | .model = 7877, | 203 | .model = 7877, |
| 205 | .vref_delay_usecs = 50, /* internal, no capacitor */ | 204 | .vref_delay_usecs = 50, /* internal, no capacitor */ |
| @@ -216,8 +215,7 @@ static const struct ad7877_platform_data bfin_ad7877_ts_info = { | |||
| 216 | #endif | 215 | #endif |
| 217 | 216 | ||
| 218 | static struct spi_board_info bfin_spi_board_info[] __initdata = { | 217 | static struct spi_board_info bfin_spi_board_info[] __initdata = { |
| 219 | #if defined(CONFIG_MTD_M25P80) \ | 218 | #if IS_ENABLED(CONFIG_MTD_M25P80) |
| 220 | || defined(CONFIG_MTD_M25P80_MODULE) | ||
| 221 | { | 219 | { |
| 222 | /* the modalias must be the same as spi device driver name */ | 220 | /* the modalias must be the same as spi device driver name */ |
| 223 | .modalias = "m25p80", /* Name of spi_driver for this device */ | 221 | .modalias = "m25p80", /* Name of spi_driver for this device */ |
| @@ -230,9 +228,8 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
| 230 | }, | 228 | }, |
| 231 | #endif | 229 | #endif |
| 232 | 230 | ||
| 233 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) | 231 | #if IS_ENABLED(CONFIG_BFIN_MAC) |
| 234 | #if defined(CONFIG_NET_DSA_KSZ8893M) \ | 232 | #if IS_ENABLED(CONFIG_NET_DSA_KSZ8893M) |
| 235 | || defined(CONFIG_NET_DSA_KSZ8893M_MODULE) | ||
| 236 | { | 233 | { |
| 237 | .modalias = "ksz8893m", | 234 | |
