Merge tag 'blackfin-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/realmz6/blackfin-linux

Pull blackfin updates from Steven Miao:
"Code cleanup, some previously ignored patches, and bug fixes"

* tag 'blackfin-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/realmz6/blackfin-linux:
blackfin: cleanup board files
bf609: clock: drop unused clock bit set/clear functions
Blackfin: bf537: rename "CONFIG_ADT75"
Blackfin: bf537: rename "CONFIG_AD7314"
Blackfin: bf537: rename ad2s120x ->ad2s1200
blackfin: bf537: fix typo "CONFIG_SND_SOC_ADV80X_MODULE"
blackfin: dma: current count mmr is read only
bfin_crc: Move architecture independant crc header file out of the blackfin folder.
bf54x: drop unuesd HOST status,control,timeout registers bit define macros
blackfin: portmux: cleanup head file
Blackfin: remove "config IP_CHECKSUM_L1"
blackfin: Remove GENERIC_GPIO config option again
blackfin:Use generic /proc/interrupts implementation
blackfin: bf60x: fix typo "CONFIG_PM_BFIN_WAKE_PA15_POL"

+1114 -1472
+1 -11
arch/blackfin/Kconfig
··· 34 select ARCH_WANT_IPC_PARSE_VERSION 35 select GENERIC_ATOMIC64 36 select GENERIC_IRQ_PROBE 37 select HAVE_NMI_WATCHDOG if NMI_WATCHDOG 38 select GENERIC_SMP_IDLE_THREAD 39 select ARCH_USES_GETTIMEOFFSET if !GENERIC_CLOCKEVENTS ··· 50 depends on BUG 51 52 config ZONE_DMA 53 - def_bool y 54 - 55 - config GENERIC_GPIO 56 def_bool y 57 58 config FORCE_MAX_ZONEORDER ··· 866 depends on !SMP 867 help 868 If enabled, sys_bfin_spinlock function is linked 869 - into L1 instruction memory. (less latency) 870 - 871 - config IP_CHECKSUM_L1 872 - bool "Locate IP Checksum function in L1 Memory" 873 - default n 874 - depends on !SMP 875 - help 876 - If enabled, the IP Checksum function is linked 877 into L1 instruction memory. (less latency) 878 879 config CACHELINE_ALIGNED_L1
··· 34 select ARCH_WANT_IPC_PARSE_VERSION 35 select GENERIC_ATOMIC64 36 select GENERIC_IRQ_PROBE 37 + select GENERIC_IRQ_SHOW 38 select HAVE_NMI_WATCHDOG if NMI_WATCHDOG 39 select GENERIC_SMP_IDLE_THREAD 40 select ARCH_USES_GETTIMEOFFSET if !GENERIC_CLOCKEVENTS ··· 49 depends on BUG 50 51 config ZONE_DMA 52 def_bool y 53 54 config FORCE_MAX_ZONEORDER ··· 868 depends on !SMP 869 help 870 If enabled, sys_bfin_spinlock function is linked 871 into L1 instruction memory. (less latency) 872 873 config CACHELINE_ALIGNED_L1
-125
arch/blackfin/include/asm/bfin_crc.h
··· 1 - /* 2 - * bfin_crc.h - interface to Blackfin CRC controllers 3 - * 4 - * Copyright 2012 Analog Devices Inc. 5 - * 6 - * Licensed under the GPL-2 or later. 7 - */ 8 - 9 - #ifndef __BFIN_CRC_H__ 10 - #define __BFIN_CRC_H__ 11 - 12 - /* Function driver which use hardware crc must initialize the structure */ 13 - struct crc_info { 14 - /* Input data address */ 15 - unsigned char *in_addr; 16 - /* Output data address */ 17 - unsigned char *out_addr; 18 - /* Input or output bytes */ 19 - unsigned long datasize; 20 - union { 21 - /* CRC to compare with that of input buffer */ 22 - unsigned long crc_compare; 23 - /* Value to compare with input data */ 24 - unsigned long val_verify; 25 - /* Value to fill */ 26 - unsigned long val_fill; 27 - }; 28 - /* Value to program the 32b CRC Polynomial */ 29 - unsigned long crc_poly; 30 - union { 31 - /* CRC calculated from the input data */ 32 - unsigned long crc_result; 33 - /* First failed position to verify input data */ 34 - unsigned long pos_verify; 35 - }; 36 - /* CRC mirror flags */ 37 - unsigned int bitmirr:1; 38 - unsigned int bytmirr:1; 39 - unsigned int w16swp:1; 40 - unsigned int fdsel:1; 41 - unsigned int rsltmirr:1; 42 - unsigned int polymirr:1; 43 - unsigned int cmpmirr:1; 44 - }; 45 - 46 - /* Userspace interface */ 47 - #define CRC_IOC_MAGIC 'C' 48 - #define CRC_IOC_CALC_CRC _IOWR('C', 0x01, unsigned int) 49 - #define CRC_IOC_MEMCPY_CRC _IOWR('C', 0x02, unsigned int) 50 - #define CRC_IOC_VERIFY_VAL _IOWR('C', 0x03, unsigned int) 51 - #define CRC_IOC_FILL_VAL _IOWR('C', 0x04, unsigned int) 52 - 53 - 54 - #ifdef __KERNEL__ 55 - 56 - #include <linux/types.h> 57 - #include <linux/spinlock.h> 58 - #include <linux/miscdevice.h> 59 - 60 - struct crc_register { 61 - u32 control; 62 - u32 datacnt; 63 - u32 datacntrld; 64 - u32 __pad_1[2]; 65 - u32 compare; 66 - u32 fillval; 67 - u32 datafifo; 68 - u32 intren; 69 - u32 intrenset; 70 - u32 intrenclr; 71 - u32 poly; 72 - u32 __pad_2[4]; 73 - u32 status; 74 - u32 datacntcap; 75 - u32 __pad_3; 76 - u32 result; 77 - u32 curresult; 78 - u32 __pad_4[3]; 79 - u32 revid; 80 - }; 81 - 82 - /* CRC_STATUS Masks */ 83 - #define CMPERR 0x00000002 /* Compare error */ 84 - #define DCNTEXP 0x00000010 /* datacnt register expired */ 85 - #define IBR 0x00010000 /* Input buffer ready */ 86 - #define OBR 0x00020000 /* Output buffer ready */ 87 - #define IRR 0x00040000 /* Immediate result readt */ 88 - #define LUTDONE 0x00080000 /* Look-up table generation done */ 89 - #define FSTAT 0x00700000 /* FIFO status */ 90 - #define MAX_FIFO 4 /* Max fifo size */ 91 - 92 - /* CRC_CONTROL Masks */ 93 - #define BLKEN 0x00000001 /* Block enable */ 94 - #define OPMODE 0x000000F0 /* Operation mode */ 95 - #define OPMODE_OFFSET 4 /* Operation mode mask offset*/ 96 - #define MODE_DMACPY_CRC 1 /* MTM CRC compute and compare */ 97 - #define MODE_DATA_FILL 2 /* MTM data fill */ 98 - #define MODE_CALC_CRC 3 /* MSM CRC compute and compare */ 99 - #define MODE_DATA_VERIFY 4 /* MSM data verify */ 100 - #define AUTOCLRZ 0x00000100 /* Auto clear to zero */ 101 - #define AUTOCLRF 0x00000200 /* Auto clear to one */ 102 - #define OBRSTALL 0x00001000 /* Stall on output buffer ready */ 103 - #define IRRSTALL 0x00002000 /* Stall on immediate result ready */ 104 - #define BITMIRR 0x00010000 /* Mirror bits within each byte of 32-bit input data */ 105 - #define BITMIRR_OFFSET 16 /* Mirror bits offset */ 106 - #define BYTMIRR 0x00020000 /* Mirror bytes of 32-bit input data */ 107 - #define BYTMIRR_OFFSET 17 /* Mirror bytes offset */ 108 - #define W16SWP 0x00040000 /* Mirror uppper and lower 16-bit word of 32-bit input data */ 109 - #define W16SWP_OFFSET 18 /* Mirror 16-bit word offset */ 110 - #define FDSEL 0x00080000 /* FIFO is written after input data is mirrored */ 111 - #define FDSEL_OFFSET 19 /* Mirror FIFO offset */ 112 - #define RSLTMIRR 0x00100000 /* CRC result registers are mirrored. */ 113 - #define RSLTMIRR_OFFSET 20 /* Mirror CRC result offset. */ 114 - #define POLYMIRR 0x00200000 /* CRC poly register is mirrored. */ 115 - #define POLYMIRR_OFFSET 21 /* Mirror CRC poly offset. */ 116 - #define CMPMIRR 0x00400000 /* CRC compare register is mirrored. */ 117 - #define CMPMIRR_OFFSET 22 /* Mirror CRC compare offset. */ 118 - 119 - /* CRC_INTREN Masks */ 120 - #define CMPERRI 0x02 /* CRC_ERROR_INTR */ 121 - #define DCNTEXPI 0x10 /* CRC_STATUS_INTR */ 122 - 123 - #endif 124 - 125 - #endif
···
-2
arch/blackfin/include/asm/dma.h
··· 316 } 317 static inline void enable_dma(unsigned int channel) 318 { 319 - dma_ch[channel].regs->curr_x_count = 0; 320 - dma_ch[channel].regs->curr_y_count = 0; 321 dma_ch[channel].regs->cfg |= DMAEN; 322 } 323 int set_dma_callback(unsigned int channel, irq_handler_t callback, void *data);
··· 316 } 317 static inline void enable_dma(unsigned int channel) 318 { 319 dma_ch[channel].regs->cfg |= DMAEN; 320 } 321 int set_dma_callback(unsigned int channel, irq_handler_t callback, void *data);
+4 -6
arch/blackfin/include/asm/portmux.h
··· 18 #define P_DONTCARE 0x1000 19 20 #ifdef CONFIG_PINCTRL 21 - #include <asm/irq_handler.h> 22 23 #define gpio_pint_regs bfin_pint_regs 24 #define adi_internal_set_wake bfin_internal_set_wake 25 26 - #define peripheral_request(per, label) 0 27 #define peripheral_free(per) 28 - #define peripheral_request_list(per, label) \ 29 - (pdev ? (IS_ERR(devm_pinctrl_get_select_default(&pdev->dev)) \ 30 - ? -EINVAL : 0) : 0) 31 #define peripheral_free_list(per) 32 #else 33 int peripheral_request(unsigned short per, const char *label); ··· 37 #include <linux/err.h> 38 #include <linux/pinctrl/pinctrl.h> 39 #include <mach/portmux.h> 40 - #include <linux/gpio.h> 41 42 #ifndef P_SPORT2_TFS 43 #define P_SPORT2_TFS P_UNDEF
··· 18 #define P_DONTCARE 0x1000 19 20 #ifdef CONFIG_PINCTRL 21 + int bfin_internal_set_wake(unsigned int irq, unsigned int state); 22 23 #define gpio_pint_regs bfin_pint_regs 24 #define adi_internal_set_wake bfin_internal_set_wake 25 26 + #define peripheral_request(per, label) (0) 27 #define peripheral_free(per) 28 + #define peripheral_request_list(per, label) (0) 29 #define peripheral_free_list(per) 30 #else 31 int peripheral_request(unsigned short per, const char *label); ··· 39 #include <linux/err.h> 40 #include <linux/pinctrl/pinctrl.h> 41 #include <mach/portmux.h> 42 + #include <mach/gpio.h> 43 44 #ifndef P_SPORT2_TFS 45 #define P_SPORT2_TFS P_UNDEF
+8 -29
arch/blackfin/kernel/irqchip.c
··· 11 #include <linux/kallsyms.h> 12 #include <linux/interrupt.h> 13 #include <linux/irq.h> 14 #include <asm/irq_handler.h> 15 #include <asm/trace.h> 16 #include <asm/pda.h> ··· 34 #endif 35 36 #ifdef CONFIG_PROC_FS 37 - int show_interrupts(struct seq_file *p, void *v) 38 { 39 - int i = *(loff_t *) v, j; 40 - struct irqaction *action; 41 - unsigned long flags; 42 43 - if (i < NR_IRQS) { 44 - struct irq_desc *desc = irq_to_desc(i); 45 - 46 - raw_spin_lock_irqsave(&desc->lock, flags); 47 - action = desc->action; 48 - if (!action) 49 - goto skip; 50 - seq_printf(p, "%3d: ", i); 51 - for_each_online_cpu(j) 52 - seq_printf(p, "%10u ", kstat_irqs_cpu(i, j)); 53 - seq_printf(p, " %8s", irq_desc_get_chip(desc)->name); 54 - seq_printf(p, " %s", action->name); 55 - for (action = action->next; action; action = action->next) 56 - seq_printf(p, " %s", action->name); 57 - 58 - seq_putc(p, '\n'); 59 - skip: 60 - raw_spin_unlock_irqrestore(&desc->lock, flags); 61 - } else if (i == NR_IRQS) { 62 - seq_printf(p, "NMI: "); 63 - for_each_online_cpu(j) 64 - seq_printf(p, "%10u ", cpu_pda[j].__nmi_count); 65 - seq_printf(p, " CORE Non Maskable Interrupt\n"); 66 - seq_printf(p, "Err: %10u\n", atomic_read(&irq_err_count)); 67 - } 68 return 0; 69 } 70 #endif
··· 11 #include <linux/kallsyms.h> 12 #include <linux/interrupt.h> 13 #include <linux/irq.h> 14 + #include <linux/seq_file.h> 15 #include <asm/irq_handler.h> 16 #include <asm/trace.h> 17 #include <asm/pda.h> ··· 33 #endif 34 35 #ifdef CONFIG_PROC_FS 36 + int arch_show_interrupts(struct seq_file *p, int prec) 37 { 38 + int j; 39 40 + seq_printf(p, "%*s: ", prec, "NMI"); 41 + for_each_online_cpu(j) 42 + seq_printf(p, "%10u ", cpu_pda[j].__nmi_count); 43 + seq_printf(p, " CORE Non Maskable Interrupt\n"); 44 + seq_printf(p, "%*s: %10u\n", prec, "ERR", atomic_read(&irq_err_count)); 45 return 0; 46 } 47 #endif
+42 -45
arch/blackfin/mach-bf518/boards/ezbrd.c
··· 36 * Driver needs to know address, irq and flag pin. 37 */ 38 39 - #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 40 static struct mtd_partition ezbrd_partitions[] = { 41 { 42 .name = "bootloader(nor)", ··· 61 62 static struct resource ezbrd_flash_resource = { 63 .start = 0x20000000, 64 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 65 .end = 0x202fffff, 66 #else 67 .end = 0x203fffff, ··· 80 }; 81 #endif 82 83 - #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 84 static struct platform_device rtc_device = { 85 .name = "rtc-bfin", 86 .id = -1, 87 }; 88 #endif 89 90 - #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 91 #include <linux/bfin_mac.h> 92 static const unsigned short bfin_mac_peripherals[] = { 93 P_MII0_ETxD0, ··· 105 106 static struct bfin_phydev_platform_data bfin_phydev_data[] = { 107 { 108 - #if defined(CONFIG_NET_DSA_KSZ8893M) || defined(CONFIG_NET_DSA_KSZ8893M_MODULE) 109 .addr = 3, 110 #else 111 .addr = 1, ··· 119 .phydev_data = bfin_phydev_data, 120 .phy_mode = PHY_INTERFACE_MODE_MII, 121 .mac_peripherals = bfin_mac_peripherals, 122 - #if defined(CONFIG_NET_DSA_KSZ8893M) || defined(CONFIG_NET_DSA_KSZ8893M_MODULE) 123 .phy_mask = 0xfff7, /* Only probe the port phy connect to the on chip MAC */ 124 #endif 125 .vlan1_mask = 1, ··· 140 } 141 }; 142 143 - #if defined(CONFIG_NET_DSA_KSZ8893M) || defined(CONFIG_NET_DSA_KSZ8893M_MODULE) 144 static struct dsa_chip_data ksz8893m_switch_chip_data = { 145 .mii_bus = &bfin_mii_bus.dev, 146 .port_names = { ··· 165 #endif 166 #endif 167 168 - #if defined(CONFIG_MTD_M25P80) \ 169 - || defined(CONFIG_MTD_M25P80_MODULE) 170 static struct mtd_partition bfin_spi_flash_partitions[] = { 171 { 172 .name = "bootloader(spi)", ··· 192 }; 193 #endif 194 195 - #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 196 static struct bfin5xx_spi_chip mmc_spi_chip_info = { 197 .enable_dma = 0, 198 }; 199 #endif 200 201 - #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 202 static const struct ad7877_platform_data bfin_ad7877_ts_info = { 203 .model = 7877, 204 .vref_delay_usecs = 50, /* internal, no capacitor */ ··· 215 #endif 216 217 static struct spi_board_info bfin_spi_board_info[] __initdata = { 218 - #if defined(CONFIG_MTD_M25P80) \ 219 - || defined(CONFIG_MTD_M25P80_MODULE) 220 { 221 /* the modalias must be the same as spi device driver name */ 222 .modalias = "m25p80", /* Name of spi_driver for this device */ ··· 228 }, 229 #endif 230 231 - #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 232 - #if defined(CONFIG_NET_DSA_KSZ8893M) \ 233 - || defined(CONFIG_NET_DSA_KSZ8893M_MODULE) 234 { 235 .modalias = "ksz8893m", 236 .max_speed_hz = 5000000, ··· 241 #endif 242 #endif 243 244 - #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 245 { 246 .modalias = "mmc_spi", 247 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ ··· 251 .mode = SPI_MODE_3, 252 }, 253 #endif 254 - #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 255 { 256 .modalias = "ad7877", 257 .platform_data = &bfin_ad7877_ts_info, ··· 261 .chip_select = 2, 262 }, 263 #endif 264 - #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ 265 && defined(CONFIG_SND_SOC_WM8731_SPI) 266 { 267 .modalias = "wm8731", ··· 271 .mode = SPI_MODE_0, 272 }, 273 #endif 274 - #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 275 { 276 .modalias = "spidev", 277 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 279 .chip_select = 1, 280 }, 281 #endif 282 - #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) 283 { 284 .modalias = "bfin-lq035q1-spi", 285 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ ··· 291 }; 292 293 /* SPI controller data */ 294 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 295 /* SPI (0) */ 296 static struct bfin5xx_spi_master bfin_spi0_info = { 297 .num_chipselect = 6, ··· 363 }; 364 #endif /* spi master and devices */ 365 366 - #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 367 #ifdef CONFIG_SERIAL_BFIN_UART0 368 static struct resource bfin_uart0_resources[] = { 369 { ··· 462 #endif 463 #endif 464 465 - #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 466 #ifdef CONFIG_BFIN_SIR0 467 static struct resource bfin_sir0_resources[] = { 468 { ··· 517 #endif 518 #endif 519 520 - #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 521 static struct platform_device bfin_i2s = { 522 .name = "bfin-i2s", 523 .id = CONFIG_SND_BF5XX_SPORT_NUM, ··· 525 }; 526 #endif 527 528 - #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 529 static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; 530 531 static struct resource bfin_twi0_resource[] = { ··· 553 #endif 554 555 static struct i2c_board_info __initdata bfin_i2c_board_info[] = { 556 - #if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) 557 { 558 I2C_BOARD_INFO("pcf8574_lcd", 0x22), 559 }, 560 #endif 561 - #if defined(CONFIG_INPUT_PCF8574) || defined(CONFIG_INPUT_PCF8574_MODULE) 562 { 563 I2C_BOARD_INFO("pcf8574_keypad", 0x27), 564 .irq = IRQ_PF8, 565 }, 566 #endif 567 - #if defined(CONFIG_SND_SOC_SSM2602) || defined(CONFIG_SND_SOC_SSM2602_MODULE) 568 { 569 I2C_BOARD_INFO("ssm2602", 0x1b), 570 }, 571 #endif 572 }; 573 574 - #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 575 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 576 static struct resource bfin_sport0_uart_resources[] = { 577 { ··· 642 #endif 643 #endif 644 645 - #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 646 #include <linux/input.h> 647 #include <linux/gpio_keys.h> 648 ··· 664 }; 665 #endif 666 667 - #if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE) 668 669 static struct bfin_sd_host bfin_sdh_data = { 670 .dma_chan = CH_RSI, ··· 707 708 &bfin_dpmc, 709 710 - #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 711 &rtc_device, 712 #endif 713 714 - #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 715 &bfin_mii_bus, 716 &bfin_mac_device, 717 - #if defined(CONFIG_NET_DSA_KSZ8893M) || defined(CONFIG_NET_DSA_KSZ8893M_MODULE) 718 &ksz8893m_switch_device, 719 #endif 720 #endif 721 722 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 723 &bfin_spi0_device, 724 &bfin_spi1_device, 725 #endif 726 727 - #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 728 #ifdef CONFIG_SERIAL_BFIN_UART0 729 &bfin_uart0_device, 730 #endif ··· 733 #endif 734 #endif 735 736 - #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 737 #ifdef CONFIG_BFIN_SIR0 738 &bfin_sir0_device, 739 #endif ··· 742 #endif 743 #endif 744 745 - #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 746 &i2c_bfin_twi_device, 747 #endif 748 749 - #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 750 &bfin_i2s, 751 #endif 752 753 - #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 754 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 755 &bfin_sport0_uart_device, 756 #endif ··· 759 #endif 760 #endif 761 762 - #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 763 &bfin_device_gpiokeys, 764 #endif 765 766 - #if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE) 767 &bf51x_sdh_device, 768 #endif 769 770 - #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 771 &ezbrd_flash_device, 772 #endif 773 }; ··· 781 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 782 /* setup BF518-EZBRD GPIO pin PG11 to AMS2, PG15 to AMS3. */ 783 peripheral_request(P_AMS2, "ParaFlash"); 784 - #if !defined(CONFIG_SPI_BFIN5XX) && !defined(CONFIG_SPI_BFIN5XX_MODULE) 785 peripheral_request(P_AMS3, "ParaFlash"); 786 #endif 787 return 0;
··· 36 * Driver needs to know address, irq and flag pin. 37 */ 38 39 + #if IS_ENABLED(CONFIG_MTD_PHYSMAP) 40 static struct mtd_partition ezbrd_partitions[] = { 41 { 42 .name = "bootloader(nor)", ··· 61 62 static struct resource ezbrd_flash_resource = { 63 .start = 0x20000000, 64 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 65 .end = 0x202fffff, 66 #else 67 .end = 0x203fffff, ··· 80 }; 81 #endif 82 83 + #if IS_ENABLED(CONFIG_RTC_DRV_BFIN) 84 static struct platform_device rtc_device = { 85 .name = "rtc-bfin", 86 .id = -1, 87 }; 88 #endif 89 90 + #if IS_ENABLED(CONFIG_BFIN_MAC) 91 #include <linux/bfin_mac.h> 92 static const unsigned short bfin_mac_peripherals[] = { 93 P_MII0_ETxD0, ··· 105 106 static struct bfin_phydev_platform_data bfin_phydev_data[] = { 107 { 108 + #if IS_ENABLED(CONFIG_NET_DSA_KSZ8893M) 109 .addr = 3, 110 #else 111 .addr = 1, ··· 119 .phydev_data = bfin_phydev_data, 120 .phy_mode = PHY_INTERFACE_MODE_MII, 121 .mac_peripherals = bfin_mac_peripherals, 122 + #if IS_ENABLED(CONFIG_NET_DSA_KSZ8893M) 123 .phy_mask = 0xfff7, /* Only probe the port phy connect to the on chip MAC */ 124 #endif 125 .vlan1_mask = 1, ··· 140 } 141 }; 142 143 + #if IS_ENABLED(CONFIG_NET_DSA_KSZ8893M) 144 static struct dsa_chip_data ksz8893m_switch_chip_data = { 145 .mii_bus = &bfin_mii_bus.dev, 146 .port_names = { ··· 165 #endif 166 #endif 167 168 + #if IS_ENABLED(CONFIG_MTD_M25P80) 169 static struct mtd_partition bfin_spi_flash_partitions[] = { 170 { 171 .name = "bootloader(spi)", ··· 193 }; 194 #endif 195 196 + #if IS_ENABLED(CONFIG_MMC_SPI) 197 static struct bfin5xx_spi_chip mmc_spi_chip_info = { 198 .enable_dma = 0, 199 }; 200 #endif 201 202 + #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877) 203 static const struct ad7877_platform_data bfin_ad7877_ts_info = { 204 .model = 7877, 205 .vref_delay_usecs = 50, /* internal, no capacitor */ ··· 216 #endif 217 218 static struct spi_board_info bfin_spi_board_info[] __initdata = { 219 + #if IS_ENABLED(CONFIG_MTD_M25P80) 220 { 221 /* the modalias must be the same as spi device driver name */ 222 .modalias = "m25p80", /* Name of spi_driver for this device */ ··· 230 }, 231 #endif 232 233 + #if IS_ENABLED(CONFIG_BFIN_MAC) 234 + #if IS_ENABLED(CONFIG_NET_DSA_KSZ8893M) 235 { 236 .modalias = "ksz8893m", 237 .max_speed_hz = 5000000, ··· 244 #endif 245 #endif 246 247 + #if IS_ENABLED(CONFIG_MMC_SPI) 248 { 249 .modalias = "mmc_spi", 250 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ ··· 254 .mode = SPI_MODE_3, 255 }, 256 #endif 257 + #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877) 258 { 259 .modalias = "ad7877", 260 .platform_data = &bfin_ad7877_ts_info, ··· 264 .chip_select = 2, 265 }, 266 #endif 267 + #if IS_ENABLED(CONFIG_SND_SOC_WM8731) \ 268 && defined(CONFIG_SND_SOC_WM8731_SPI) 269 { 270 .modalias = "wm8731", ··· 274 .mode = SPI_MODE_0, 275 }, 276 #endif 277 + #if IS_ENABLED(CONFIG_SPI_SPIDEV) 278 { 279 .modalias = "spidev", 280 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 282 .chip_select = 1, 283 }, 284 #endif 285 + #if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1) 286 { 287 .modalias = "bfin-lq035q1-spi", 288 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ ··· 294 }; 295 296 /* SPI controller data */ 297 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 298 /* SPI (0) */ 299 static struct bfin5xx_spi_master bfin_spi0_info = { 300 .num_chipselect = 6, ··· 366 }; 367 #endif /* spi master and devices */ 368 369 + #if IS_ENABLED(CONFIG_SERIAL_BFIN) 370 #ifdef CONFIG_SERIAL_BFIN_UART0 371 static struct resource bfin_uart0_resources[] = { 372 { ··· 465 #endif 466 #endif 467 468 + #if IS_ENABLED(CONFIG_BFIN_SIR) 469 #ifdef CONFIG_BFIN_SIR0 470 static struct resource bfin_sir0_resources[] = { 471 { ··· 520 #endif 521 #endif 522 523 + #if IS_ENABLED(CONFIG_SND_BF5XX_I2S) 524 static struct platform_device bfin_i2s = { 525 .name = "bfin-i2s", 526 .id = CONFIG_SND_BF5XX_SPORT_NUM, ··· 528 }; 529 #endif 530 531 + #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI) 532 static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; 533 534 static struct resource bfin_twi0_resource[] = { ··· 556 #endif 557 558 static struct i2c_board_info __initdata bfin_i2c_board_info[] = { 559 + #if IS_ENABLED(CONFIG_BFIN_TWI_LCD) 560 { 561 I2C_BOARD_INFO("pcf8574_lcd", 0x22), 562 }, 563 #endif 564 + #if IS_ENABLED(CONFIG_INPUT_PCF8574) 565 { 566 I2C_BOARD_INFO("pcf8574_keypad", 0x27), 567 .irq = IRQ_PF8, 568 }, 569 #endif 570 + #if IS_ENABLED(CONFIG_SND_SOC_SSM2602) 571 { 572 I2C_BOARD_INFO("ssm2602", 0x1b), 573 }, 574 #endif 575 }; 576 577 + #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT) 578 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 579 static struct resource bfin_sport0_uart_resources[] = { 580 { ··· 645 #endif 646 #endif 647 648 + #if IS_ENABLED(CONFIG_KEYBOARD_GPIO) 649 #include <linux/input.h> 650 #include <linux/gpio_keys.h> 651 ··· 667 }; 668 #endif 669 670 + #if IS_ENABLED(CONFIG_SDH_BFIN) 671 672 static struct bfin_sd_host bfin_sdh_data = { 673 .dma_chan = CH_RSI, ··· 710 711 &bfin_dpmc, 712 713 + #if IS_ENABLED(CONFIG_RTC_DRV_BFIN) 714 &rtc_device, 715 #endif 716 717 + #if IS_ENABLED(CONFIG_BFIN_MAC) 718 &bfin_mii_bus, 719 &bfin_mac_device, 720 + #if IS_ENABLED(CONFIG_NET_DSA_KSZ8893M) 721 &ksz8893m_switch_device, 722 #endif 723 #endif 724 725 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 726 &bfin_spi0_device, 727 &bfin_spi1_device, 728 #endif 729 730 + #if IS_ENABLED(CONFIG_SERIAL_BFIN) 731 #ifdef CONFIG_SERIAL_BFIN_UART0 732 &bfin_uart0_device, 733 #endif ··· 736 #endif 737 #endif 738 739 + #if IS_ENABLED(CONFIG_BFIN_SIR) 740 #ifdef CONFIG_BFIN_SIR0 741 &bfin_sir0_device, 742 #endif ··· 745 #endif 746 #endif 747 748 + #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI) 749 &i2c_bfin_twi_device, 750 #endif 751 752 + #if IS_ENABLED(CONFIG_SND_BF5XX_I2S) 753 &bfin_i2s, 754 #endif 755 756 + #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT) 757 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 758 &bfin_sport0_uart_device, 759 #endif ··· 762 #endif 763 #endif 764 765 + #if IS_ENABLED(CONFIG_KEYBOARD_GPIO) 766 &bfin_device_gpiokeys, 767 #endif 768 769 + #if IS_ENABLED(CONFIG_SDH_BFIN) 770 &bf51x_sdh_device, 771 #endif 772 773 + #if IS_ENABLED(CONFIG_MTD_PHYSMAP) 774 &ezbrd_flash_device, 775 #endif 776 }; ··· 784 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 785 /* setup BF518-EZBRD GPIO pin PG11 to AMS2, PG15 to AMS3. */ 786 peripheral_request(P_AMS2, "ParaFlash"); 787 + #if !IS_ENABLED(CONFIG_SPI_BFIN5XX) 788 peripheral_request(P_AMS3, "ParaFlash"); 789 #endif 790 return 0;
+31 -33
arch/blackfin/mach-bf518/boards/tcm-bf518.c
··· 36 * Driver needs to know address, irq and flag pin. 37 */ 38 39 - #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 40 static struct mtd_partition tcm_partitions[] = { 41 { 42 .name = "bootloader(nor)", ··· 73 }; 74 #endif 75 76 - #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 77 static struct platform_device rtc_device = { 78 .name = "rtc-bfin", 79 .id = -1, 80 }; 81 #endif 82 83 - #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 84 #include <linux/bfin_mac.h> 85 static const unsigned short bfin_mac_peripherals[] = P_MII0; 86 ··· 113 }; 114 #endif 115 116 - #if defined(CONFIG_MTD_M25P80) \ 117 - || defined(CONFIG_MTD_M25P80_MODULE) 118 static struct mtd_partition bfin_spi_flash_partitions[] = { 119 { 120 .name = "bootloader(spi)", ··· 140 }; 141 #endif 142 143 - #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 144 static struct bfin5xx_spi_chip mmc_spi_chip_info = { 145 .enable_dma = 0, 146 }; 147 #endif 148 149 - #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 150 static const struct ad7877_platform_data bfin_ad7877_ts_info = { 151 .model = 7877, 152 .vref_delay_usecs = 50, /* internal, no capacitor */ ··· 163 #endif 164 165 static struct spi_board_info bfin_spi_board_info[] __initdata = { 166 - #if defined(CONFIG_MTD_M25P80) \ 167 - || defined(CONFIG_MTD_M25P80_MODULE) 168 { 169 /* the modalias must be the same as spi device driver name */ 170 .modalias = "m25p80", /* Name of spi_driver for this device */ ··· 176 }, 177 #endif 178 179 - #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 180 { 181 .modalias = "mmc_spi", 182 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ ··· 186 .mode = SPI_MODE_3, 187 }, 188 #endif 189 - #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 190 { 191 .modalias = "ad7877", 192 .platform_data = &bfin_ad7877_ts_info, ··· 196 .chip_select = 2, 197 }, 198 #endif 199 - #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ 200 && defined(CONFIG_SND_SOC_WM8731_SPI) 201 { 202 .modalias = "wm8731", ··· 206 .mode = SPI_MODE_0, 207 }, 208 #endif 209 - #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 210 { 211 .modalias = "spidev", 212 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 214 .chip_select = 1, 215 }, 216 #endif 217 - #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) 218 { 219 .modalias = "bfin-lq035q1-spi", 220 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ ··· 226 }; 227 228 /* SPI controller data */ 229 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 230 /* SPI (0) */ 231 static struct bfin5xx_spi_master bfin_spi0_info = { 232 .num_chipselect = 6, ··· 298 }; 299 #endif /* spi master and devices */ 300 301 - #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 302 #ifdef CONFIG_SERIAL_BFIN_UART0 303 static struct resource bfin_uart0_resources[] = { 304 { ··· 397 #endif 398 #endif 399 400 - #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 401 #ifdef CONFIG_BFIN_SIR0 402 static struct resource bfin_sir0_resources[] = { 403 { ··· 452 #endif 453 #endif 454 455 - #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 456 static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; 457 458 static struct resource bfin_twi0_resource[] = { ··· 480 #endif 481 482 static struct i2c_board_info __initdata bfin_i2c_board_info[] = { 483 - #if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) 484 { 485 I2C_BOARD_INFO("pcf8574_lcd", 0x22), 486 }, 487 #endif 488 - #if defined(CONFIG_INPUT_PCF8574) || defined(CONFIG_INPUT_PCF8574_MODULE) 489 { 490 I2C_BOARD_INFO("pcf8574_keypad", 0x27), 491 .irq = IRQ_PF8, ··· 493 #endif 494 }; 495 496 - #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 497 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 498 static struct resource bfin_sport0_uart_resources[] = { 499 { ··· 564 #endif 565 #endif 566 567 - #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 568 #include <linux/input.h> 569 #include <linux/gpio_keys.h> 570 ··· 586 }; 587 #endif 588 589 - #if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE) 590 591 static struct bfin_sd_host bfin_sdh_data = { 592 .dma_chan = CH_RSI, ··· 629 630 &bfin_dpmc, 631 632 - #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 633 &rtc_device, 634 #endif 635 636 - #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 637 &bfin_mii_bus, 638 &bfin_mac_device, 639 #endif 640 641 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 642 &bfin_spi0_device, 643 &bfin_spi1_device, 644 #endif 645 646 - #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 647 #ifdef CONFIG_SERIAL_BFIN_UART0 648 &bfin_uart0_device, 649 #endif ··· 652 #endif 653 #endif 654 655 - #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 656 #ifdef CONFIG_BFIN_SIR0 657 &bfin_sir0_device, 658 #endif ··· 661 #endif 662 #endif 663 664 - #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 665 &i2c_bfin_twi_device, 666 #endif 667 668 - #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 669 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 670 &bfin_sport0_uart_device, 671 #endif ··· 674 #endif 675 #endif 676 677 - #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 678 &bfin_device_gpiokeys, 679 #endif 680 681 - #if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE) 682 &bf51x_sdh_device, 683 #endif 684 685 - #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 686 &tcm_flash_device, 687 #endif 688 };
··· 36 * Driver needs to know address, irq and flag pin. 37 */ 38 39 + #if IS_ENABLED(CONFIG_MTD_PHYSMAP) 40 static struct mtd_partition tcm_partitions[] = { 41 { 42 .name = "bootloader(nor)", ··· 73 }; 74 #endif 75 76 + #if IS_ENABLED(CONFIG_RTC_DRV_BFIN) 77 static struct platform_device rtc_device = { 78 .name = "rtc-bfin", 79 .id = -1, 80 }; 81 #endif 82 83 + #if IS_ENABLED(CONFIG_BFIN_MAC) 84 #include <linux/bfin_mac.h> 85 static const unsigned short bfin_mac_peripherals[] = P_MII0; 86 ··· 113 }; 114 #endif 115 116 + #if IS_ENABLED(CONFIG_MTD_M25P80) 117 static struct mtd_partition bfin_spi_flash_partitions[] = { 118 { 119 .name = "bootloader(spi)", ··· 141 }; 142 #endif 143 144 + #if IS_ENABLED(CONFIG_MMC_SPI) 145 static struct bfin5xx_spi_chip mmc_spi_chip_info = { 146 .enable_dma = 0, 147 }; 148 #endif 149 150 + #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877) 151 static const struct ad7877_platform_data bfin_ad7877_ts_info = { 152 .model = 7877, 153 .vref_delay_usecs = 50, /* internal, no capacitor */ ··· 164 #endif 165 166 static struct spi_board_info bfin_spi_board_info[] __initdata = { 167 + #if IS_ENABLED(CONFIG_MTD_M25P80) 168 { 169 /* the modalias must be the same as spi device driver name */ 170 .modalias = "m25p80", /* Name of spi_driver for this device */ ··· 178 }, 179 #endif 180 181 + #if IS_ENABLED(CONFIG_MMC_SPI) 182 { 183 .modalias = "mmc_spi", 184 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ ··· 188 .mode = SPI_MODE_3, 189 }, 190 #endif 191 + #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877) 192 { 193 .modalias = "ad7877", 194 .platform_data = &bfin_ad7877_ts_info, ··· 198 .chip_select = 2, 199 }, 200 #endif 201 + #if IS_ENABLED(CONFIG_SND_SOC_WM8731) \ 202 && defined(CONFIG_SND_SOC_WM8731_SPI) 203 { 204 .modalias = "wm8731", ··· 208 .mode = SPI_MODE_0, 209 }, 210 #endif 211 + #if IS_ENABLED(CONFIG_SPI_SPIDEV) 212 { 213 .modalias = "spidev", 214 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 216 .chip_select = 1, 217 }, 218 #endif 219 + #if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1) 220 { 221 .modalias = "bfin-lq035q1-spi", 222 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ ··· 228 }; 229 230 /* SPI controller data */ 231 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 232 /* SPI (0) */ 233 static struct bfin5xx_spi_master bfin_spi0_info = { 234 .num_chipselect = 6, ··· 300 }; 301 #endif /* spi master and devices */ 302 303 + #if IS_ENABLED(CONFIG_SERIAL_BFIN) 304 #ifdef CONFIG_SERIAL_BFIN_UART0 305 static struct resource bfin_uart0_resources[] = { 306 { ··· 399 #endif 400 #endif 401 402 + #if IS_ENABLED(CONFIG_BFIN_SIR) 403 #ifdef CONFIG_BFIN_SIR0 404 static struct resource bfin_sir0_resources[] = { 405 { ··· 454 #endif 455 #endif 456 457 + #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI) 458 static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; 459 460 static struct resource bfin_twi0_resource[] = { ··· 482 #endif 483 484 static struct i2c_board_info __initdata bfin_i2c_board_info[] = { 485 + #if IS_ENABLED(CONFIG_BFIN_TWI_LCD) 486 { 487 I2C_BOARD_INFO("pcf8574_lcd", 0x22), 488 }, 489 #endif 490 + #if IS_ENABLED(CONFIG_INPUT_PCF8574) 491 { 492 I2C_BOARD_INFO("pcf8574_keypad", 0x27), 493 .irq = IRQ_PF8, ··· 495 #endif 496 }; 497 498 + #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT) 499 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 500 static struct resource bfin_sport0_uart_resources[] = { 501 { ··· 566 #endif 567 #endif 568 569 + #if IS_ENABLED(CONFIG_KEYBOARD_GPIO) 570 #include <linux/input.h> 571 #include <linux/gpio_keys.h> 572 ··· 588 }; 589 #endif 590 591 + #if IS_ENABLED(CONFIG_SDH_BFIN) 592 593 static struct bfin_sd_host bfin_sdh_data = { 594 .dma_chan = CH_RSI, ··· 631 632 &bfin_dpmc, 633 634 + #if IS_ENABLED(CONFIG_RTC_DRV_BFIN) 635 &rtc_device, 636 #endif 637 638 + #if IS_ENABLED(CONFIG_BFIN_MAC) 639 &bfin_mii_bus, 640 &bfin_mac_device, 641 #endif 642 643 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 644 &bfin_spi0_device, 645 &bfin_spi1_device, 646 #endif 647 648 + #if IS_ENABLED(CONFIG_SERIAL_BFIN) 649 #ifdef CONFIG_SERIAL_BFIN_UART0 650 &bfin_uart0_device, 651 #endif ··· 654 #endif 655 #endif 656 657 + #if IS_ENABLED(CONFIG_BFIN_SIR) 658 #ifdef CONFIG_BFIN_SIR0 659 &bfin_sir0_device, 660 #endif ··· 663 #endif 664 #endif 665 666 + #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI) 667 &i2c_bfin_twi_device, 668 #endif 669 670 + #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT) 671 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 672 &bfin_sport0_uart_device, 673 #endif ··· 676 #endif 677 #endif 678 679 + #if IS_ENABLED(CONFIG_KEYBOARD_GPIO) 680 &bfin_device_gpiokeys, 681 #endif 682 683 + #if IS_ENABLED(CONFIG_SDH_BFIN) 684 &bf51x_sdh_device, 685 #endif 686 687 + #if IS_ENABLED(CONFIG_MTD_PHYSMAP) 688 &tcm_flash_device, 689 #endif 690 };
+34 -37
arch/blackfin/mach-bf527/boards/ad7160eval.c
··· 37 * Driver needs to know address, irq and flag pin. 38 */ 39 40 - #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) 41 static struct resource musb_resources[] = { 42 [0] = { 43 .start = 0xffc03800, ··· 97 }; 98 #endif 99 100 - #if defined(CONFIG_FB_BFIN_RA158Z) || defined(CONFIG_FB_BFIN_RA158Z_MODULE) 101 static struct resource bf52x_ra158z_resources[] = { 102 { 103 .start = IRQ_PPI_ERROR, ··· 114 }; 115 #endif 116 117 - #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 118 static struct mtd_partition ad7160eval_partitions[] = { 119 { 120 .name = "bootloader(nor)", ··· 154 }; 155 #endif 156 157 - #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) 158 static struct mtd_partition partition_info[] = { 159 { 160 .name = "linux kernel(nand)", ··· 200 }; 201 #endif 202 203 - #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 204 static struct platform_device rtc_device = { 205 .name = "rtc-bfin", 206 .id = -1, 207 }; 208 #endif 209 210 - #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 211 #include <linux/bfin_mac.h> 212 static const unsigned short bfin_mac_peripherals[] = P_RMII0; 213 ··· 241 #endif 242 243 244 - #if defined(CONFIG_MTD_M25P80) \ 245 - || defined(CONFIG_MTD_M25P80_MODULE) 246 static struct mtd_partition bfin_spi_flash_partitions[] = { 247 { 248 .name = "bootloader(spi)", ··· 268 }; 269 #endif 270 271 - #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 272 static struct bfin5xx_spi_chip mmc_spi_chip_info = { 273 .enable_dma = 0, 274 }; 275 #endif 276 277 - #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 278 static struct platform_device bfin_i2s = { 279 .name = "bfin-i2s", 280 .id = CONFIG_SND_BF5XX_SPORT_NUM, ··· 283 #endif 284 285 static struct spi_board_info bfin_spi_board_info[] __initdata = { 286 - #if defined(CONFIG_MTD_M25P80) \ 287 - || defined(CONFIG_MTD_M25P80_MODULE) 288 { 289 /* the modalias must be the same as spi device driver name */ 290 .modalias = "m25p80", /* Name of spi_driver for this device */ ··· 295 .mode = SPI_MODE_3, 296 }, 297 #endif 298 - #if defined(CONFIG_SND_BF5XX_SOC_AD183X) \ 299 - || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) 300 { 301 .modalias = "ad183x", 302 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 303 .chip_select = 4, 304 }, 305 #endif 306 - #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 307 { 308 .modalias = "mmc_spi", 309 .max_speed_hz = 30000000, /* max spi clock (SCK) speed in HZ */ ··· 313 .mode = SPI_MODE_3, 314 }, 315 #endif 316 - #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 317 { 318 .modalias = "spidev", 319 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 323 #endif 324 }; 325 326 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 327 /* SPI controller data */ 328 static struct bfin5xx_spi_master bfin_spi0_info = { 329 .num_chipselect = MAX_CTRL_CS + MAX_BLACKFIN_GPIOS, ··· 361 }; 362 #endif /* spi master and devices */ 363 364 - #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 365 #ifdef CONFIG_SERIAL_BFIN_UART0 366 static struct resource bfin_uart0_resources[] = { 367 { ··· 472 #endif 473 #endif 474 475 - #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 476 #ifdef CONFIG_BFIN_SIR0 477 static struct resource bfin_sir0_resources[] = { 478 { ··· 527 #endif 528 #endif 529 530 - #if defined(CONFIG_TOUCHSCREEN_AD7160) || defined(CONFIG_TOUCHSCREEN_AD7160_MODULE) 531 #include <linux/input/ad7160.h> 532 static const struct ad7160_platform_data bfin_ad7160_ts_info = { 533 .sensor_x_res = 854, ··· 557 }; 558 #endif 559 560 - #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 561 static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; 562 563 static struct resource bfin_twi0_resource[] = { ··· 585 #endif 586 587 static struct i2c_board_info __initdata bfin_i2c_board_info[] = { 588 - #if defined(CONFIG_TOUCHSCREEN_AD7160) || defined(CONFIG_TOUCHSCREEN_AD7160_MODULE) 589 { 590 I2C_BOARD_INFO("ad7160", 0x33), 591 .irq = IRQ_PH1, ··· 594 #endif 595 }; 596 597 - #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 598 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 599 static struct resource bfin_sport0_uart_resources[] = { 600 { ··· 665 #endif 666 #endif 667 668 - #if defined(CONFIG_INPUT_BFIN_ROTARY) || defined(CONFIG_INPUT_BFIN_ROTARY_MODULE) 669 #include <asm/bfin_rotary.h> 670 671 static struct bfin_rotary_platform_data bfin_rotary_data = { ··· 722 723 &bfin_dpmc, 724 725 - #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) 726 &bf5xx_nand_device, 727 #endif 728 729 - #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 730 &rtc_device, 731 #endif 732 733 - #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) 734 &musb_device, 735 #endif 736 737 - #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 738 &bfin_mii_bus, 739 &bfin_mac_device, 740 #endif 741 742 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 743 &bfin_spi0_device, 744 #endif 745 746 - #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 747 #ifdef CONFIG_SERIAL_BFIN_UART0 748 &bfin_uart0_device, 749 #endif ··· 752 #endif 753 #endif 754 755 - #if defined(CONFIG_FB_BFIN_RA158Z) || defined(CONFIG_FB_BFIN_RA158Z_MODULE) 756 &bf52x_ra158z_device, 757 #endif 758 759 - #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 760 #ifdef CONFIG_BFIN_SIR0 761 &bfin_sir0_device, 762 #endif ··· 765 #endif 766 #endif 767 768 - #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 769 &i2c_bfin_twi_device, 770 #endif 771 772 - #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 773 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 774 &bfin_sport0_uart_device, 775 #endif ··· 778 #endif 779 #endif 780 781 - #if defined(CONFIG_INPUT_BFIN_ROTARY) || defined(CONFIG_INPUT_BFIN_ROTARY_MODULE) 782 &bfin_rotary_device, 783 #endif 784 785 - #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 786 &ad7160eval_flash_device, 787 #endif 788 789 - #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 790 &bfin_i2s, 791 #endif 792 };
··· 37 * Driver needs to know address, irq and flag pin. 38 */ 39 40 + #if IS_ENABLED(CONFIG_USB_MUSB_HDRC) 41 static struct resource musb_resources[] = { 42 [0] = { 43 .start = 0xffc03800, ··· 97 }; 98 #endif 99 100 + #if IS_ENABLED(CONFIG_FB_BFIN_RA158Z) 101 static struct resource bf52x_ra158z_resources[] = { 102 { 103 .start = IRQ_PPI_ERROR, ··· 114 }; 115 #endif 116 117 + #if IS_ENABLED(CONFIG_MTD_PHYSMAP) 118 static struct mtd_partition ad7160eval_partitions[] = { 119 { 120 .name = "bootloader(nor)", ··· 154 }; 155 #endif 156 157 + #if IS_ENABLED(CONFIG_MTD_NAND_BF5XX) 158 static struct mtd_partition partition_info[] = { 159 { 160 .name = "linux kernel(nand)", ··· 200 }; 201 #endif 202 203 + #if IS_ENABLED(CONFIG_RTC_DRV_BFIN) 204 static struct platform_device rtc_device = { 205 .name = "rtc-bfin", 206 .id = -1, 207 }; 208 #endif 209 210 + #if IS_ENABLED(CONFIG_BFIN_MAC) 211 #include <linux/bfin_mac.h> 212 static const unsigned short bfin_mac_peripherals[] = P_RMII0; 213 ··· 241 #endif 242 243 244 + #if IS_ENABLED(CONFIG_MTD_M25P80) 245 static struct mtd_partition bfin_spi_flash_partitions[] = { 246 { 247 .name = "bootloader(spi)", ··· 269 }; 270 #endif 271 272 + #if IS_ENABLED(CONFIG_MMC_SPI) 273 static struct bfin5xx_spi_chip mmc_spi_chip_info = { 274 .enable_dma = 0, 275 }; 276 #endif 277 278 + #if IS_ENABLED(CONFIG_SND_BF5XX_I2S) 279 static struct platform_device bfin_i2s = { 280 .name = "bfin-i2s", 281 .id = CONFIG_SND_BF5XX_SPORT_NUM, ··· 284 #endif 285 286 static struct spi_board_info bfin_spi_board_info[] __initdata = { 287 + #if IS_ENABLED(CONFIG_MTD_M25P80) 288 { 289 /* the modalias must be the same as spi device driver name */ 290 .modalias = "m25p80", /* Name of spi_driver for this device */ ··· 297 .mode = SPI_MODE_3, 298 }, 299 #endif 300 + #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD183X) 301 { 302 .modalias = "ad183x", 303 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 306 .chip_select = 4, 307 }, 308 #endif 309 + #if IS_ENABLED(CONFIG_MMC_SPI) 310 { 311 .modalias = "mmc_spi", 312 .max_speed_hz = 30000000, /* max spi clock (SCK) speed in HZ */ ··· 316 .mode = SPI_MODE_3, 317 }, 318 #endif 319 + #if IS_ENABLED(CONFIG_SPI_SPIDEV) 320 { 321 .modalias = "spidev", 322 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 326 #endif 327 }; 328 329 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 330 /* SPI controller data */ 331 static struct bfin5xx_spi_master bfin_spi0_info = { 332 .num_chipselect = MAX_CTRL_CS + MAX_BLACKFIN_GPIOS, ··· 364 }; 365 #endif /* spi master and devices */ 366 367 + #if IS_ENABLED(CONFIG_SERIAL_BFIN) 368 #ifdef CONFIG_SERIAL_BFIN_UART0 369 static struct resource bfin_uart0_resources[] = { 370 { ··· 475 #endif 476 #endif 477 478 + #if IS_ENABLED(CONFIG_BFIN_SIR) 479 #ifdef CONFIG_BFIN_SIR0 480 static struct resource bfin_sir0_resources[] = { 481 { ··· 530 #endif 531 #endif 532 533 + #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7160) 534 #include <linux/input/ad7160.h> 535 static const struct ad7160_platform_data bfin_ad7160_ts_info = { 536 .sensor_x_res = 854, ··· 560 }; 561 #endif 562 563 + #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI) 564 static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; 565 566 static struct resource bfin_twi0_resource[] = { ··· 588 #endif 589 590 static struct i2c_board_info __initdata bfin_i2c_board_info[] = { 591 + #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7160) 592 { 593 I2C_BOARD_INFO("ad7160", 0x33), 594 .irq = IRQ_PH1, ··· 597 #endif 598 }; 599 600 + #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT) 601 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 602 static struct resource bfin_sport0_uart_resources[] = { 603 { ··· 668 #endif 669 #endif 670 671 + #if IS_ENABLED(CONFIG_INPUT_BFIN_ROTARY) 672 #include <asm/bfin_rotary.h> 673 674 static struct bfin_rotary_platform_data bfin_rotary_data = { ··· 725 726 &bfin_dpmc, 727 728 + #if IS_ENABLED(CONFIG_MTD_NAND_BF5XX) 729 &bf5xx_nand_device, 730 #endif 731 732 + #if IS_ENABLED(CONFIG_RTC_DRV_BFIN) 733 &rtc_device, 734 #endif 735 736 + #if IS_ENABLED(CONFIG_USB_MUSB_HDRC) 737 &musb_device, 738 #endif 739 740 + #if IS_ENABLED(CONFIG_BFIN_MAC) 741 &bfin_mii_bus, 742 &bfin_mac_device, 743 #endif 744 745 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 746 &bfin_spi0_device, 747 #endif 748 749 + #if IS_ENABLED(CONFIG_SERIAL_BFIN) 750 #ifdef CONFIG_SERIAL_BFIN_UART0 751 &bfin_uart0_device, 752 #endif ··· 755 #endif 756 #endif 757 758 + #if IS_ENABLED(CONFIG_FB_BFIN_RA158Z) 759 &bf52x_ra158z_device, 760 #endif 761 762 + #if IS_ENABLED(CONFIG_BFIN_SIR) 763 #ifdef CONFIG_BFIN_SIR0 764 &bfin_sir0_device, 765 #endif ··· 768 #endif 769 #endif 770 771 + #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI) 772 &i2c_bfin_twi_device, 773 #endif 774 775 + #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT) 776 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 777 &bfin_sport0_uart_device, 778 #endif ··· 781 #endif 782 #endif 783 784 + #if IS_ENABLED(CONFIG_INPUT_BFIN_ROTARY) 785 &bfin_rotary_device, 786 #endif 787 788 + #if IS_ENABLED(CONFIG_MTD_PHYSMAP) 789 &ad7160eval_flash_device, 790 #endif 791 792 + #if IS_ENABLED(CONFIG_SND_BF5XX_I2S) 793 &bfin_i2s, 794 #endif 795 };
+44 -47
arch/blackfin/mach-bf527/boards/cm_bf527.c
··· 37 * Driver needs to know address, irq and flag pin. 38 */ 39 40 - #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) 41 #include <linux/usb/isp1760.h> 42 static struct resource bfin_isp1760_resources[] = { 43 [0] = { ··· 72 }; 73 #endif 74 75 - #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) 76 static struct resource musb_resources[] = { 77 [0] = { 78 .start = 0xffc03800, ··· 134 }; 135 #endif 136 137 - #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) 138 static struct mtd_partition partition_info[] = { 139 { 140 .name = "linux kernel(nand)", ··· 180 }; 181 #endif 182 183 - #if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) 184 static struct resource bfin_pcmcia_cf_resources[] = { 185 { 186 .start = 0x20310000, /* IO PORT */ ··· 209 }; 210 #endif 211 212 - #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 213 static struct platform_device rtc_device = { 214 .name = "rtc-bfin", 215 .id = -1, 216 }; 217 #endif 218 219 - #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 220 #include <linux/smc91x.h> 221 222 static struct smc91x_platdata smc91x_info = { ··· 249 }; 250 #endif 251 252 - #if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE) 253 static struct resource dm9000_resources[] = { 254 [0] = { 255 .start = 0x203FB800, ··· 276 }; 277 #endif 278 279 - #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 280 #include <linux/bfin_mac.h> 281 static const unsigned short bfin_mac_peripherals[] = P_RMII0; 282 ··· 309 }; 310 #endif 311 312 - #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 313 static struct resource net2272_bfin_resources[] = { 314 { 315 .start = 0x20300000, ··· 330 }; 331 #endif 332 333 - #if defined(CONFIG_MTD_M25P80) \ 334 - || defined(CONFIG_MTD_M25P80_MODULE) 335 static struct mtd_partition bfin_spi_flash_partitions[] = { 336 { 337 .name = "bootloader(spi)", ··· 357 }; 358 #endif 359 360 - #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 361 static struct bfin5xx_spi_chip mmc_spi_chip_info = { 362 .enable_dma = 0, 363 }; 364 #endif 365 366 - #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 367 static const struct ad7877_platform_data bfin_ad7877_ts_info = { 368 .model = 7877, 369 .vref_delay_usecs = 50, /* internal, no capacitor */ ··· 380 #endif 381 382 static struct spi_board_info bfin_spi_board_info[] __initdata = { 383 - #if defined(CONFIG_MTD_M25P80) \ 384 - || defined(CONFIG_MTD_M25P80_MODULE) 385 { 386 /* the modalias must be the same as spi device driver name */ 387 .modalias = "m25p80", /* Name of spi_driver for this device */ ··· 393 }, 394 #endif 395 396 - #if defined(CONFIG_SND_BF5XX_SOC_AD183X) \ 397 - || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) 398 { 399 .modalias = "ad183x", 400 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 401 .chip_select = 4, 402 }, 403 #endif 404 - #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 405 { 406 .modalias = "mmc_spi", 407 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ ··· 411 .mode = SPI_MODE_3, 412 }, 413 #endif 414 - #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 415 { 416 .modalias = "ad7877", 417 .platform_data = &bfin_ad7877_ts_info, ··· 421 .chip_select = 2, 422 }, 423 #endif 424 - #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ 425 && defined(CONFIG_SND_SOC_WM8731_SPI) 426 { 427 .modalias = "wm8731", ··· 431 .mode = SPI_MODE_0, 432 }, 433 #endif 434 - #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 435 { 436 .modalias = "spidev", 437 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 441 #endif 442 }; 443 444 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 445 /* SPI controller data */ 446 static struct bfin5xx_spi_master bfin_spi0_info = { 447 .num_chipselect = 8, ··· 479 }; 480 #endif /* spi master and devices */ 481 482 - #if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE) 483 static struct mtd_partition cm_partitions[] = { 484 { 485 .name = "bootloader(nor)", ··· 528 }; 529 #endif 530 531 - #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 532 #ifdef CONFIG_SERIAL_BFIN_UART0 533 static struct resource bfin_uart0_resources[] = { 534 { ··· 639 #endif 640 #endif 641 642 - #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 643 #ifdef CONFIG_BFIN_SIR0 644 static struct resource bfin_sir0_resources[] = { 645 { ··· 694 #endif 695 #endif 696 697 - #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 698 static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; 699 700 static struct resource bfin_twi0_resource[] = { ··· 722 #endif 723 724 static struct i2c_board_info __initdata bfin_i2c_board_info[] = { 725 - #if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) 726 { 727 I2C_BOARD_INFO("pcf8574_lcd", 0x22), 728 }, 729 #endif 730 - #if defined(CONFIG_INPUT_PCF8574) || defined(CONFIG_INPUT_PCF8574_MODULE) 731 { 732 I2C_BOARD_INFO("pcf8574_keypad", 0x27), 733 .irq = IRQ_PF8, 734 }, 735 #endif 736 - #if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE) 737 { 738 I2C_BOARD_INFO("bfin-adv7393", 0x2B), 739 }, 740 #endif 741 }; 742 743 - #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 744 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 745 static struct resource bfin_sport0_uart_resources[] = { 746 { ··· 811 #endif 812 #endif 813 814 - #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 815 #include <linux/input.h> 816 #include <linux/gpio_keys.h> 817 ··· 858 859 &bfin_dpmc, 860 861 - #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) 862 &bf5xx_nand_device, 863 #endif 864 865 - #if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) 866 &bfin_pcmcia_cf_device, 867 #endif 868 869 - #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 870 &rtc_device, 871 #endif 872 873 - #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) 874 &bfin_isp1760_device, 875 #endif 876 877 - #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) 878 &musb_device, 879 #endif 880 881 - #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 882 &smc91x_device, 883 #endif 884 885 - #if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE) 886 &dm9000_device, 887 #endif 888 889 - #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 890 &bfin_mii_bus, 891 &bfin_mac_device, 892 #endif 893 894 - #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 895 &net2272_bfin_device, 896 #endif 897 898 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 899 &bfin_spi0_device, 900 #endif 901 902 - #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 903 #ifdef CONFIG_SERIAL_BFIN_UART0 904 &bfin_uart0_device, 905 #endif ··· 908 #endif 909 #endif 910 911 - #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 912 #ifdef CONFIG_BFIN_SIR0 913 &bfin_sir0_device, 914 #endif ··· 917 #endif 918 #endif 919 920 - #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 921 &i2c_bfin_twi_device, 922 #endif 923 924 - #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 925 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 926 &bfin_sport0_uart_device, 927 #endif ··· 930 #endif 931 #endif 932 933 - #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 934 &bfin_device_gpiokeys, 935 #endif 936 937 - #if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE) 938 &cm_flash_device, 939 #endif 940 };
··· 37 * Driver needs to know address, irq and flag pin. 38 */ 39 40 + #if IS_ENABLED(CONFIG_USB_ISP1760_HCD) 41 #include <linux/usb/isp1760.h> 42 static struct resource bfin_isp1760_resources[] = { 43 [0] = { ··· 72 }; 73 #endif 74 75 + #if IS_ENABLED(CONFIG_USB_MUSB_HDRC) 76 static struct resource musb_resources[] = { 77 [0] = { 78 .start = 0xffc03800, ··· 134 }; 135 #endif 136 137 + #if IS_ENABLED(CONFIG_MTD_NAND_BF5XX) 138 static struct mtd_partition partition_info[] = { 139 { 140 .name = "linux kernel(nand)", ··· 180 }; 181 #endif 182 183 + #if IS_ENABLED(CONFIG_BFIN_CFPCMCIA) 184 static struct resource bfin_pcmcia_cf_resources[] = { 185 { 186 .start = 0x20310000, /* IO PORT */ ··· 209 }; 210 #endif 211 212 + #if IS_ENABLED(CONFIG_RTC_DRV_BFIN) 213 static struct platform_device rtc_device = { 214 .name = "rtc-bfin", 215 .id = -1, 216 }; 217 #endif 218 219 + #if IS_ENABLED(CONFIG_SMC91X) 220 #include <linux/smc91x.h> 221 222 static struct smc91x_platdata smc91x_info = { ··· 249 }; 250 #endif 251 252 + #if IS_ENABLED(CONFIG_DM9000) 253 static struct resource dm9000_resources[] = { 254 [0] = { 255 .start = 0x203FB800, ··· 276 }; 277 #endif 278 279 + #if IS_ENABLED(CONFIG_BFIN_MAC) 280 #include <linux/bfin_mac.h> 281 static const unsigned short bfin_mac_peripherals[] = P_RMII0; 282 ··· 309 }; 310 #endif 311 312 + #if IS_ENABLED(CONFIG_USB_NET2272) 313 static struct resource net2272_bfin_resources[] = { 314 { 315 .start = 0x20300000, ··· 330 }; 331 #endif 332 333 + #if IS_ENABLED(CONFIG_MTD_M25P80) 334 static struct mtd_partition bfin_spi_flash_partitions[] = { 335 { 336 .name = "bootloader(spi)", ··· 358 }; 359 #endif 360 361 + #if IS_ENABLED(CONFIG_MMC_SPI) 362 static struct bfin5xx_spi_chip mmc_spi_chip_info = { 363 .enable_dma = 0, 364 }; 365 #endif 366 367 + #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877) 368 static const struct ad7877_platform_data bfin_ad7877_ts_info = { 369 .model = 7877, 370 .vref_delay_usecs = 50, /* internal, no capacitor */ ··· 381 #endif 382 383 static struct spi_board_info bfin_spi_board_info[] __initdata = { 384 + #if IS_ENABLED(CONFIG_MTD_M25P80) 385 { 386 /* the modalias must be the same as spi device driver name */ 387 .modalias = "m25p80", /* Name of spi_driver for this device */ ··· 395 }, 396 #endif 397 398 + #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD183X) 399 { 400 .modalias = "ad183x", 401 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 404 .chip_select = 4, 405 }, 406 #endif 407 + #if IS_ENABLED(CONFIG_MMC_SPI) 408 { 409 .modalias = "mmc_spi", 410 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ ··· 414 .mode = SPI_MODE_3, 415 }, 416 #endif 417 + #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877) 418 { 419 .modalias = "ad7877", 420 .platform_data = &bfin_ad7877_ts_info, ··· 424 .chip_select = 2, 425 }, 426 #endif 427 + #if IS_ENABLED(CONFIG_SND_SOC_WM8731) \ 428 && defined(CONFIG_SND_SOC_WM8731_SPI) 429 { 430 .modalias = "wm8731", ··· 434 .mode = SPI_MODE_0, 435 }, 436 #endif 437 + #if IS_ENABLED(CONFIG_SPI_SPIDEV) 438 { 439 .modalias = "spidev", 440 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 444 #endif 445 }; 446 447 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 448 /* SPI controller data */ 449 static struct bfin5xx_spi_master bfin_spi0_info = { 450 .num_chipselect = 8, ··· 482 }; 483 #endif /* spi master and devices */ 484 485 + #if IS_ENABLED(CONFIG_MTD_GPIO_ADDR) 486 static struct mtd_partition cm_partitions[] = { 487 { 488 .name = "bootloader(nor)", ··· 531 }; 532 #endif 533 534 + #if IS_ENABLED(CONFIG_SERIAL_BFIN) 535 #ifdef CONFIG_SERIAL_BFIN_UART0 536 static struct resource bfin_uart0_resources[] = { 537 { ··· 642 #endif 643 #endif 644 645 + #if IS_ENABLED(CONFIG_BFIN_SIR) 646 #ifdef CONFIG_BFIN_SIR0 647 static struct resource bfin_sir0_resources[] = { 648 { ··· 697 #endif 698 #endif 699 700 + #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI) 701 static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; 702 703 static struct resource bfin_twi0_resource[] = { ··· 725 #endif 726 727 static struct i2c_board_info __initdata bfin_i2c_board_info[] = { 728 + #if IS_ENABLED(CONFIG_BFIN_TWI_LCD) 729 { 730 I2C_BOARD_INFO("pcf8574_lcd", 0x22), 731 }, 732 #endif 733 + #if IS_ENABLED(CONFIG_INPUT_PCF8574) 734 { 735 I2C_BOARD_INFO("pcf8574_keypad", 0x27), 736 .irq = IRQ_PF8, 737 }, 738 #endif 739 + #if IS_ENABLED(CONFIG_FB_BFIN_7393) 740 { 741 I2C_BOARD_INFO("bfin-adv7393", 0x2B), 742 }, 743 #endif 744 }; 745 746 + #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT) 747 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 748 static struct resource bfin_sport0_uart_resources[] = { 749 { ··· 814 #endif 815 #endif 816 817 + #if IS_ENABLED(CONFIG_KEYBOARD_GPIO) 818 #include <linux/input.h> 819 #include <linux/gpio_keys.h> 820 ··· 861 862 &bfin_dpmc, 863 864 + #if IS_ENABLED(CONFIG_MTD_NAND_BF5XX) 865 &bf5xx_nand_device, 866 #endif 867 868 + #if IS_ENABLED(CONFIG_BFIN_CFPCMCIA) 869 &bfin_pcmcia_cf_device, 870 #endif 871 872 + #if IS_ENABLED(CONFIG_RTC_DRV_BFIN) 873 &rtc_device, 874 #endif 875 876 + #if IS_ENABLED(CONFIG_USB_ISP1760_HCD) 877 &bfin_isp1760_device, 878 #endif 879 880 + #if IS_ENABLED(CONFIG_USB_MUSB_HDRC) 881 &musb_device, 882 #endif 883 884 + #if IS_ENABLED(CONFIG_SMC91X) 885 &smc91x_device, 886 #endif 887 888 + #if IS_ENABLED(CONFIG_DM9000) 889 &dm9000_device, 890 #endif 891 892 + #if IS_ENABLED(CONFIG_BFIN_MAC) 893 &bfin_mii_bus, 894 &bfin_mac_device, 895 #endif 896 897 + #if IS_ENABLED(CONFIG_USB_NET2272) 898 &net2272_bfin_device, 899 #endif 900 901 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 902 &bfin_spi0_device, 903 #endif 904 905 + #if IS_ENABLED(CONFIG_SERIAL_BFIN) 906 #ifdef CONFIG_SERIAL_BFIN_UART0 907 &bfin_uart0_device, 908 #endif ··· 911 #endif 912 #endif 913 914 + #if IS_ENABLED(CONFIG_BFIN_SIR) 915 #ifdef CONFIG_BFIN_SIR0 916 &bfin_sir0_device, 917 #endif ··· 920 #endif 921 #endif 922 923 + #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI) 924 &i2c_bfin_twi_device, 925 #endif 926 927 + #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT) 928 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 929 &bfin_sport0_uart_device, 930 #endif ··· 933 #endif 934 #endif 935 936 + #if IS_ENABLED(CONFIG_KEYBOARD_GPIO) 937 &bfin_device_gpiokeys, 938 #endif 939 940 + #if IS_ENABLED(CONFIG_MTD_GPIO_ADDR) 941 &cm_flash_device, 942 #endif 943 };
+37 -39
arch/blackfin/mach-bf527/boards/ezbrd.c
··· 36 * Driver needs to know address, irq and flag pin. 37 */ 38 39 - #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) 40 static struct resource musb_resources[] = { 41 [0] = { 42 .start = 0xffc03800, ··· 98 }; 99 #endif 100 101 - #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 102 static struct mtd_partition ezbrd_partitions[] = { 103 { 104 .name = "bootloader(nor)", ··· 138 }; 139 #endif 140 141 - #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) 142 static struct mtd_partition partition_info[] = { 143 { 144 .name = "bootloader(nand)", ··· 188 }; 189 #endif 190 191 - #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 192 static struct platform_device rtc_device = { 193 .name = "rtc-bfin", 194 .id = -1, ··· 196 #endif 197 198 199 - #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 200 #include <linux/bfin_mac.h> 201 static const unsigned short bfin_mac_peripherals[] = P_RMII0; 202 ··· 229 }; 230 #endif 231 232 - #if defined(CONFIG_MTD_M25P80) \ 233 - || defined(CONFIG_MTD_M25P80_MODULE) 234 static struct mtd_partition bfin_spi_flash_partitions[] = { 235 { 236 .name = "bootloader(spi)", ··· 256 }; 257 #endif 258 259 - #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 260 static struct bfin5xx_spi_chip mmc_spi_chip_info = { 261 .enable_dma = 0, 262 }; 263 #endif 264 265 - #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 266 static const struct ad7877_platform_data bfin_ad7877_ts_info = { 267 .model = 7877, 268 .vref_delay_usecs = 50, /* internal, no capacitor */ ··· 278 }; 279 #endif 280 281 - #if defined(CONFIG_TOUCHSCREEN_AD7879) || defined(CONFIG_TOUCHSCREEN_AD7879_MODULE) 282 #include <linux/spi/ad7879.h> 283 static const struct ad7879_platform_data bfin_ad7879_ts_info = { 284 .model = 7879, /* Model = AD7879 */ ··· 296 #endif 297 298 static struct spi_board_info bfin_spi_board_info[] __initdata = { 299 - #if defined(CONFIG_MTD_M25P80) \ 300 - || defined(CONFIG_MTD_M25P80_MODULE) 301 { 302 /* the modalias must be the same as spi device driver name */ 303 .modalias = "m25p80", /* Name of spi_driver for this device */ ··· 309 }, 310 #endif 311 312 - #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 313 { 314 .modalias = "mmc_spi", 315 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ ··· 319 .mode = SPI_MODE_3, 320 }, 321 #endif 322 - #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 323 { 324 .modalias = "ad7877", 325 .platform_data = &bfin_ad7877_ts_info, ··· 329 .chip_select = 2, 330 }, 331 #endif 332 - #if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE) 333 { 334 .modalias = "ad7879", 335 .platform_data = &bfin_ad7879_ts_info, ··· 340 .mode = SPI_CPHA | SPI_CPOL, 341 }, 342 #endif 343 - #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ 344 && defined(CONFIG_SND_SOC_WM8731_SPI) 345 { 346 .modalias = "wm8731", ··· 350 .mode = SPI_MODE_0, 351 }, 352 #endif 353 - #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 354 { 355 .modalias = "spidev", 356 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 358 .chip_select = 1, 359 }, 360 #endif 361 - #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) 362 { 363 .modalias = "bfin-lq035q1-spi", 364 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ ··· 369 #endif 370 }; 371 372 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 373 /* SPI controller data */ 374 static struct bfin5xx_spi_master bfin_spi0_info = { 375 .num_chipselect = 8, ··· 407 }; 408 #endif /* spi master and devices */ 409 410 - #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 411 #ifdef CONFIG_SERIAL_BFIN_UART0 412 static struct resource bfin_uart0_resources[] = { 413 { ··· 518 #endif 519 #endif 520 521 - #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 522 #ifdef CONFIG_BFIN_SIR0 523 static struct resource bfin_sir0_resources[] = { 524 { ··· 573 #endif 574 #endif 575 576 - #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 577 static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; 578 579 static struct resource bfin_twi0_resource[] = { ··· 601 #endif 602 603 static struct i2c_board_info __initdata bfin_i2c_board_info[] = { 604 - #if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) 605 { 606 I2C_BOARD_INFO("pcf8574_lcd", 0x22), 607 }, 608 #endif 609 - #if defined(CONFIG_INPUT_PCF8574) || defined(CONFIG_INPUT_PCF8574_MODULE) 610 { 611 I2C_BOARD_INFO("pcf8574_keypad", 0x27), 612 .irq = IRQ_PF8, ··· 614 #endif 615 }; 616 617 - #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 618 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 619 static struct resource bfin_sport0_uart_resources[] = { 620 { ··· 685 #endif 686 #endif 687 688 - #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 689 #include <linux/input.h> 690 #include <linux/gpio_keys.h> 691 ··· 729 }, 730 }; 731 732 - #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) 733 #include <asm/bfin-lq035q1.h> 734 735 static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = { ··· 762 763 &bfin_dpmc, 764 765 - #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) 766 &bf5xx_nand_device, 767 #endif 768 769 - #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 770 &rtc_device, 771 #endif 772 773 - #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) 774 &musb_device, 775 #endif 776 777 - #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 778 &bfin_mii_bus, 779 &bfin_mac_device, 780 #endif 781 782 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 783 &bfin_spi0_device, 784 #endif 785 786 - #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 787 #ifdef CONFIG_SERIAL_BFIN_UART0 788 &bfin_uart0_device, 789 #endif ··· 792 #endif 793 #endif 794 795 - #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) 796 &bfin_lq035q1_device, 797 #endif 798 799 - #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 800 #ifdef CONFIG_BFIN_SIR0 801 &bfin_sir0_device, 802 #endif ··· 805 #endif 806 #endif 807 808 - #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 809 &i2c_bfin_twi_device, 810 #endif 811 812 - #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 813 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 814 &bfin_sport0_uart_device, 815 #endif ··· 818 #endif 819 #endif 820 821 - #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 822 &bfin_device_gpiokeys, 823 #endif 824 825 - #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 826 &ezbrd_flash_device, 827 #endif 828 };
··· 36 * Driver needs to know address, irq and flag pin. 37 */ 38 39 + #if IS_ENABLED(CONFIG_USB_MUSB_HDRC) 40 static struct resource musb_resources[] = { 41 [0] = { 42 .start = 0xffc03800, ··· 98 }; 99 #endif 100 101 + #if IS_ENABLED(CONFIG_MTD_PHYSMAP) 102 static struct mtd_partition ezbrd_partitions[] = { 103 { 104 .name = "bootloader(nor)", ··· 138 }; 139 #endif 140 141 + #if IS_ENABLED(CONFIG_MTD_NAND_BF5XX) 142 static struct mtd_partition partition_info[] = { 143 { 144 .name = "bootloader(nand)", ··· 188 }; 189 #endif 190 191 + #if IS_ENABLED(CONFIG_RTC_DRV_BFIN) 192 static struct platform_device rtc_device = { 193 .name = "rtc-bfin", 194 .id = -1, ··· 196 #endif 197 198 199 + #if IS_ENABLED(CONFIG_BFIN_MAC) 200 #include <linux/bfin_mac.h> 201 static const unsigned short bfin_mac_peripherals[] = P_RMII0; 202 ··· 229 }; 230 #endif 231 232 + #if IS_ENABLED(CONFIG_MTD_M25P80) 233 static struct mtd_partition bfin_spi_flash_partitions[] = { 234 { 235 .name = "bootloader(spi)", ··· 257 }; 258 #endif 259 260 + #if IS_ENABLED(CONFIG_MMC_SPI) 261 static struct bfin5xx_spi_chip mmc_spi_chip_info = { 262 .enable_dma = 0, 263 }; 264 #endif 265 266 + #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877) 267 static const struct ad7877_platform_data bfin_ad7877_ts_info = { 268 .model = 7877, 269 .vref_delay_usecs = 50, /* internal, no capacitor */ ··· 279 }; 280 #endif 281 282 + #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7879) 283 #include <linux/spi/ad7879.h> 284 static const struct ad7879_platform_data bfin_ad7879_ts_info = { 285 .model = 7879, /* Model = AD7879 */ ··· 297 #endif 298 299 static struct spi_board_info bfin_spi_board_info[] __initdata = { 300 + #if IS_ENABLED(CONFIG_MTD_M25P80) 301 { 302 /* the modalias must be the same as spi device driver name */ 303 .modalias = "m25p80", /* Name of spi_driver for this device */ ··· 311 }, 312 #endif 313 314 + #if IS_ENABLED(CONFIG_MMC_SPI) 315 { 316 .modalias = "mmc_spi", 317 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ ··· 321 .mode = SPI_MODE_3, 322 }, 323 #endif 324 + #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877) 325 { 326 .modalias = "ad7877", 327 .platform_data = &bfin_ad7877_ts_info, ··· 331 .chip_select = 2, 332 }, 333 #endif 334 + #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7879_SPI) 335 { 336 .modalias = "ad7879", 337 .platform_data = &bfin_ad7879_ts_info, ··· 342 .mode = SPI_CPHA | SPI_CPOL, 343 }, 344 #endif 345 + #if IS_ENABLED(CONFIG_SND_SOC_WM8731) \ 346 && defined(CONFIG_SND_SOC_WM8731_SPI) 347 { 348 .modalias = "wm8731", ··· 352 .mode = SPI_MODE_0, 353 }, 354 #endif 355 + #if IS_ENABLED(CONFIG_SPI_SPIDEV) 356 { 357 .modalias = "spidev", 358 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 360 .chip_select = 1, 361 }, 362 #endif 363 + #if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1) 364 { 365 .modalias = "bfin-lq035q1-spi", 366 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ ··· 371 #endif 372 }; 373 374 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 375 /* SPI controller data */ 376 static struct bfin5xx_spi_master bfin_spi0_info = { 377 .num_chipselect = 8, ··· 409 }; 410 #endif /* spi master and devices */ 411 412 + #if IS_ENABLED(CONFIG_SERIAL_BFIN) 413 #ifdef CONFIG_SERIAL_BFIN_UART0 414 static struct resource bfin_uart0_resources[] = { 415 { ··· 520 #endif 521 #endif 522 523 + #if IS_ENABLED(CONFIG_BFIN_SIR) 524 #ifdef CONFIG_BFIN_SIR0 525 static struct resource bfin_sir0_resources[] = { 526 { ··· 575 #endif 576 #endif 577 578 + #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI) 579 static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; 580 581 static struct resource bfin_twi0_resource[] = { ··· 603 #endif 604 605 static struct i2c_board_info __initdata bfin_i2c_board_info[] = { 606 + #if IS_ENABLED(CONFIG_BFIN_TWI_LCD) 607 { 608 I2C_BOARD_INFO("pcf8574_lcd", 0x22), 609 }, 610 #endif 611 + #if IS_ENABLED(CONFIG_INPUT_PCF8574) 612 { 613 I2C_BOARD_INFO("pcf8574_keypad", 0x27), 614 .irq = IRQ_PF8, ··· 616 #endif 617 }; 618 619 + #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT) 620 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 621 static struct resource bfin_sport0_uart_resources[] = { 622 { ··· 687 #endif 688 #endif 689 690 + #if IS_ENABLED(CONFIG_KEYBOARD_GPIO) 691 #include <linux/input.h> 692 #include <linux/gpio_keys.h> 693 ··· 731 }, 732 }; 733 734 + #if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1) 735 #include <asm/bfin-lq035q1.h> 736 737 static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = { ··· 764 765 &bfin_dpmc, 766 767 + #if IS_ENABLED(CONFIG_MTD_NAND_BF5XX) 768 &bf5xx_nand_device, 769 #endif 770 771 + #if IS_ENABLED(CONFIG_RTC_DRV_BFIN) 772 &rtc_device, 773 #endif 774 775 + #if IS_ENABLED(CONFIG_USB_MUSB_HDRC) 776 &musb_device, 777 #endif 778 779 + #if IS_ENABLED(CONFIG_BFIN_MAC) 780 &bfin_mii_bus, 781 &bfin_mac_device, 782 #endif 783 784 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 785 &bfin_spi0_device, 786 #endif 787 788 + #if IS_ENABLED(CONFIG_SERIAL_BFIN) 789 #ifdef CONFIG_SERIAL_BFIN_UART0 790 &bfin_uart0_device, 791 #endif ··· 794 #endif 795 #endif 796 797 + #if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1) 798 &bfin_lq035q1_device, 799 #endif 800 801 + #if IS_ENABLED(CONFIG_BFIN_SIR) 802 #ifdef CONFIG_BFIN_SIR0 803 &bfin_sir0_device, 804 #endif ··· 807 #endif 808 #endif 809 810 + #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI) 811 &i2c_bfin_twi_device, 812 #endif 813 814 + #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT) 815 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 816 &bfin_sport0_uart_device, 817 #endif ··· 820 #endif 821 #endif 822 823 + #if IS_ENABLED(CONFIG_KEYBOARD_GPIO) 824 &bfin_device_gpiokeys, 825 #endif 826 827 + #if IS_ENABLED(CONFIG_MTD_PHYSMAP) 828 &ezbrd_flash_device, 829 #endif 830 };
+67 -72
arch/blackfin/mach-bf527/boards/ezkit.c
··· 42 * Driver needs to know address, irq and flag pin. 43 */ 44 45 - #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) 46 #include <linux/usb/isp1760.h> 47 static struct resource bfin_isp1760_resources[] = { 48 [0] = { ··· 77 }; 78 #endif 79 80 - #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) 81 static struct resource musb_resources[] = { 82 [0] = { 83 .start = 0xffc03800, ··· 139 }; 140 #endif 141 142 - #if defined(CONFIG_FB_BFIN_T350MCQB) || defined(CONFIG_FB_BFIN_T350MCQB_MODULE) 143 144 static struct resource bf52x_t350mcqb_resources[] = { 145 { ··· 157 }; 158 #endif 159 160 - #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) 161 #include <asm/bfin-lq035q1.h> 162 163 static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = { ··· 184 }; 185 #endif 186 187 - #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 188 static struct mtd_partition ezkit_partitions[] = { 189 { 190 .name = "bootloader(nor)", ··· 224 }; 225 #endif 226 227 - #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) 228 static struct mtd_partition partition_info[] = { 229 { 230 .name = "bootloader(nand)", ··· 274 }; 275 #endif 276 277 - #if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) 278 static struct resource bfin_pcmcia_cf_resources[] = { 279 { 280 .start = 0x20310000, /* IO PORT */ ··· 303 }; 304 #endif 305 306 - #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 307 static struct platform_device rtc_device = { 308 .name = "rtc-bfin", 309 .id = -1, 310 }; 311 #endif 312 313 - #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 314 #include <linux/smc91x.h> 315 316 static struct smc91x_platdata smc91x_info = { ··· 343 }; 344 #endif 345 346 - #if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE) 347 static struct resource dm9000_resources[] = { 348 [0] = { 349 .start = 0x203FB800, ··· 370 }; 371 #endif 372 373 - #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 374 #include <linux/bfin_mac.h> 375 static const unsigned short bfin_mac_peripherals[] = P_RMII0; 376 ··· 403 }; 404 #endif 405 406 - #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 407 static struct resource net2272_bfin_resources[] = { 408 { 409 .start = 0x20300000, ··· 427 }; 428 #endif 429 430 - #if defined(CONFIG_MTD_M25P80) \ 431 - || defined(CONFIG_MTD_M25P80_MODULE) 432 static struct mtd_partition bfin_spi_flash_partitions[] = { 433 { 434 .name = "bootloader(spi)", ··· 454 }; 455 #endif 456 457 - #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 458 static struct bfin5xx_spi_chip mmc_spi_chip_info = { 459 .enable_dma = 0, 460 }; 461 #endif 462 463 - #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 464 static const struct ad7877_platform_data bfin_ad7877_ts_info = { 465 .model = 7877, 466 .vref_delay_usecs = 50, /* internal, no capacitor */ ··· 476 }; 477 #endif 478 479 - #if defined(CONFIG_TOUCHSCREEN_AD7879) || defined(CONFIG_TOUCHSCREEN_AD7879_MODULE) 480 #include <linux/spi/ad7879.h> 481 static const struct ad7879_platform_data bfin_ad7879_ts_info = { 482 .model = 7879, /* Model = AD7879 */ ··· 492 }; 493 #endif 494 495 - #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 496 497 static const u16 bfin_snd_pin[][7] = { 498 {P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS, ··· 540 }; 541 #endif 542 543 - #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 544 static struct platform_device bfin_i2s_pcm = { 545 .name = "bfin-i2s-pcm-audio", 546 .id = -1, 547 }; 548 #endif 549 550 - #if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) 551 static struct platform_device bfin_ac97_pcm = { 552 .name = "bfin-ac97-pcm-audio", 553 .id = -1, 554 }; 555 #endif 556 557 - #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 558 static struct platform_device bfin_i2s = { 559 .name = "bfin-i2s", 560 .id = CONFIG_SND_BF5XX_SPORT_NUM, ··· 566 }; 567 #endif 568 569 - #if defined(CONFIG_SND_BF5XX_SOC_AD1836) \ 570 - || defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE) 571 static const char * const ad1836_link[] = { 572 "bfin-i2s.0", 573 "spi0.4", ··· 581 #endif 582 583 static struct spi_board_info bfin_spi_board_info[] __initdata = { 584 - #if defined(CONFIG_MTD_M25P80) \ 585 - || defined(CONFIG_MTD_M25P80_MODULE) 586 { 587 /* the modalias must be the same as spi device driver name */ 588 .modalias = "m25p80", /* Name of spi_driver for this device */ ··· 594 }, 595 #endif 596 597 - #if defined(CONFIG_SND_BF5XX_SOC_AD183X) \ 598 - || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) 599 { 600 .modalias = "ad183x", 601 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 604 .mode = SPI_MODE_3, 605 }, 606 #endif 607 - #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 608 { 609 .modalias = "mmc_spi", 610 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ ··· 615 }, 616 #endif 617 618 - #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 619 { 620 .modalias = "ad7877", 621 .platform_data = &bfin_ad7877_ts_info, ··· 625 .chip_select = 2, 626 }, 627 #endif 628 - #if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE) 629 { 630 .modalias = "ad7879", 631 .platform_data = &bfin_ad7879_ts_info, ··· 636 .mode = SPI_CPHA | SPI_CPOL, 637 }, 638 #endif 639 - #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 640 { 641 .modalias = "spidev", 642 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 644 .chip_select = 1, 645 }, 646 #endif 647 - #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) 648 { 649 .modalias = "bfin-lq035q1-spi", 650 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ ··· 655 #endif 656 }; 657 658 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 659 /* SPI controller data */ 660 static struct bfin5xx_spi_master bfin_spi0_info = { 661 .num_chipselect = 8, ··· 693 }; 694 #endif /* spi master and devices */ 695 696 - #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 697 #ifdef CONFIG_SERIAL_BFIN_UART0 698 static struct resource bfin_uart0_resources[] = { 699 { ··· 804 #endif 805 #endif 806 807 - #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 808 #ifdef CONFIG_BFIN_SIR0 809 static struct resource bfin_sir0_resources[] = { 810 { ··· 859 #endif 860 #endif 861 862 - #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 863 static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; 864 865 static struct resource bfin_twi0_resource[] = { ··· 886 }; 887 #endif 888 889 - #if defined(CONFIG_PMIC_ADP5520) || defined(CONFIG_PMIC_ADP5520_MODULE) 890 #include <linux/mfd/adp5520.h> 891 892 /* ··· 952 #endif 953 954 static struct i2c_board_info __initdata bfin_i2c_board_info[] = { 955 - #if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) 956 { 957 I2C_BOARD_INFO("pcf8574_lcd", 0x22), 958 }, 959 #endif 960 - #if defined(CONFIG_INPUT_PCF8574) || defined(CONFIG_INPUT_PCF8574_MODULE) 961 { 962 I2C_BOARD_INFO("pcf8574_keypad", 0x27), 963 .irq = IRQ_PF8, 964 }, 965 #endif 966 - #if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE) 967 { 968 I2C_BOARD_INFO("bfin-adv7393", 0x2B), 969 }, 970 #endif 971 - #if defined(CONFIG_TOUCHSCREEN_AD7879_I2C) || defined(CONFIG_TOUCHSCREEN_AD7879_I2C_MODULE) 972 { 973 I2C_BOARD_INFO("ad7879", 0x2C), 974 .irq = IRQ_PF8, 975 .platform_data = (void *)&bfin_ad7879_ts_info, 976 }, 977 #endif 978 - #if defined(CONFIG_PMIC_ADP5520) || defined(CONFIG_PMIC_ADP5520_MODULE) 979 { 980 I2C_BOARD_INFO("pmic-adp5520", 0x32), 981 .irq = IRQ_PF9, 982 .platform_data = (void *)&adp5520_pdev_data, 983 }, 984 #endif 985 - #if defined(CONFIG_SND_SOC_SSM2602) || defined(CONFIG_SND_SOC_SSM2602_MODULE) 986 { 987 I2C_BOARD_INFO("ssm2602", 0x1b), 988 }, 989 #endif 990 - #if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) 991 { 992 I2C_BOARD_INFO("ad5252", 0x2f), 993 }, 994 #endif 995 - #if defined(CONFIG_SND_SOC_ADAU1373) || defined(CONFIG_SND_SOC_ADAU1373_MODULE) 996 { 997 I2C_BOARD_INFO("adau1373", 0x1A), 998 }, 999 #endif 1000 }; 1001 1002 - #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 1003 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 1004 static struct resource bfin_sport0_uart_resources[] = { 1005 { ··· 1070 #endif 1071 #endif 1072 1073 - #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 1074 #include <linux/gpio_keys.h> 1075 1076 static struct gpio_keys_button bfin_gpio_keys_table[] = { ··· 1091 }; 1092 #endif 1093 1094 - #if defined(CONFIG_INPUT_BFIN_ROTARY) || defined(CONFIG_INPUT_BFIN_ROTARY_MODULE) 1095 #include <asm/bfin_rotary.h> 1096 1097 static struct bfin_rotary_platform_data bfin_rotary_data = { ··· 1149 1150 &bfin_dpmc, 1151 1152 - #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) 1153 &bf5xx_nand_device, 1154 #endif 1155 1156 - #if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) 1157 &bfin_pcmcia_cf_device, 1158 #endif 1159 1160 - #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 1161 &rtc_device, 1162 #endif 1163 1164 - #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) 1165 &bfin_isp1760_device, 1166 #endif 1167 1168 - #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) 1169 &musb_device, 1170 #endif 1171 1172 - #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 1173 &smc91x_device, 1174 #endif 1175 1176 - #if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE) 1177 &dm9000_device, 1178 #endif 1179 1180 - #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 1181 &bfin_mii_bus, 1182 &bfin_mac_device, 1183 #endif 1184 1185 - #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 1186 &net2272_bfin_device, 1187 #endif 1188 1189 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 1190 &bfin_spi0_device, 1191 #endif 1192 1193 - #if defined(CONFIG_FB_BFIN_T350MCQB) || defined(CONFIG_FB_BFIN_T350MCQB_MODULE) 1194 &bf52x_t350mcqb_device, 1195 #endif 1196 1197 - #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) 1198 &bfin_lq035q1_device, 1199 #endif 1200 1201 - #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 1202 #ifdef CONFIG_SERIAL_BFIN_UART0 1203 &bfin_uart0_device, 1204 #endif ··· 1207 #endif 1208 #endif 1209 1210 - #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 1211 #ifdef CONFIG_BFIN_SIR0 1212 &bfin_sir0_device, 1213 #endif ··· 1216 #endif 1217 #endif 1218 1219 - #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 1220 &i2c_bfin_twi_device, 1221 #endif 1222 1223 - #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 1224 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 1225 &bfin_sport0_uart_device, 1226 #endif ··· 1229 #endif 1230 #endif 1231 1232 - #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 1233 &bfin_device_gpiokeys, 1234 #endif 1235 1236 - #if defined(CONFIG_INPUT_BFIN_ROTARY) || defined(CONFIG_INPUT_BFIN_ROTARY_MODULE) 1237 &bfin_rotary_device, 1238 #endif 1239 1240 - #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 1241 &ezkit_flash_device, 1242 #endif 1243 1244 - #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 1245 &bfin_i2s_pcm, 1246 #endif 1247 1248 - #if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) 1249 &bfin_ac97_pcm, 1250 #endif 1251 1252 - #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 1253 &bfin_i2s, 1254 #endif 1255 1256 - #if defined(CONFIG_SND_BF5XX_SOC_AD1836) || \ 1257 - defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE) 1258 &bfin_ad1836_machine, 1259 #endif 1260 };
··· 42 * Driver needs to know address, irq and flag pin. 43 */ 44 45 + #if IS_ENABLED(CONFIG_USB_ISP1760_HCD) 46 #include <linux/usb/isp1760.h> 47 static struct resource bfin_isp1760_resources[] = { 48 [0] = { ··· 77 }; 78 #endif 79 80 + #if IS_ENABLED(CONFIG_USB_MUSB_HDRC) 81 static struct resource musb_resources[] = { 82 [0] = { 83 .start = 0xffc03800, ··· 139 }; 140 #endif 141 142 + #if IS_ENABLED(CONFIG_FB_BFIN_T350MCQB) 143 144 static struct resource bf52x_t350mcqb_resources[] = { 145 { ··· 157 }; 158 #endif 159 160 + #if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1) 161 #include <asm/bfin-lq035q1.h> 162 163 static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = { ··· 184 }; 185 #endif 186 187 + #if IS_ENABLED(CONFIG_MTD_PHYSMAP) 188 static struct mtd_partition ezkit_partitions[] = { 189 { 190 .name = "bootloader(nor)", ··· 224 }; 225 #endif 226 227 + #if IS_ENABLED(CONFIG_MTD_NAND_BF5XX) 228 static struct mtd_partition partition_info[] = { 229 { 230 .name = "bootloader(nand)", ··· 274 }; 275 #endif 276 277 + #if IS_ENABLED(CONFIG_BFIN_CFPCMCIA) 278 static struct resource bfin_pcmcia_cf_resources[] = { 279 { 280 .start = 0x20310000, /* IO PORT */ ··· 303 }; 304 #endif 305 306 + #if IS_ENABLED(CONFIG_RTC_DRV_BFIN) 307 static struct platform_device rtc_device = { 308 .name = "rtc-bfin", 309 .id = -1, 310 }; 311 #endif 312 313 + #if IS_ENABLED(CONFIG_SMC91X) 314 #include <linux/smc91x.h> 315 316 static struct smc91x_platdata smc91x_info = { ··· 343 }; 344 #endif 345 346 + #if IS_ENABLED(CONFIG_DM9000) 347 static struct resource dm9000_resources[] = { 348 [0] = { 349 .start = 0x203FB800, ··· 370 }; 371 #endif 372 373 + #if IS_ENABLED(CONFIG_BFIN_MAC) 374 #include <linux/bfin_mac.h> 375 static const unsigned short bfin_mac_peripherals[] = P_RMII0; 376 ··· 403 }; 404 #endif 405 406 + #if IS_ENABLED(CONFIG_USB_NET2272) 407 static struct resource net2272_bfin_resources[] = { 408 { 409 .start = 0x20300000, ··· 427 }; 428 #endif 429 430 + #if IS_ENABLED(CONFIG_MTD_M25P80) 431 static struct mtd_partition bfin_spi_flash_partitions[] = { 432 { 433 .name = "bootloader(spi)", ··· 455 }; 456 #endif 457 458 + #if IS_ENABLED(CONFIG_MMC_SPI) 459 static struct bfin5xx_spi_chip mmc_spi_chip_info = { 460 .enable_dma = 0, 461 }; 462 #endif 463 464 + #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877) 465 static const struct ad7877_platform_data bfin_ad7877_ts_info = { 466 .model = 7877, 467 .vref_delay_usecs = 50, /* internal, no capacitor */ ··· 477 }; 478 #endif 479 480 + #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7879) 481 #include <linux/spi/ad7879.h> 482 static const struct ad7879_platform_data bfin_ad7879_ts_info = { 483 .model = 7879, /* Model = AD7879 */ ··· 493 }; 494 #endif 495 496 + #if IS_ENABLED(CONFIG_SND_BF5XX_I2S) 497 498 static const u16 bfin_snd_pin[][7] = { 499 {P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS, ··· 541 }; 542 #endif 543 544 + #if IS_ENABLED(CONFIG_SND_BF5XX_I2S) 545 static struct platform_device bfin_i2s_pcm = { 546 .name = "bfin-i2s-pcm-audio", 547 .id = -1, 548 }; 549 #endif 550 551 + #if IS_ENABLED(CONFIG_SND_BF5XX_AC97) 552 static struct platform_device bfin_ac97_pcm = { 553 .name = "bfin-ac97-pcm-audio", 554 .id = -1, 555 }; 556 #endif 557 558 + #if IS_ENABLED(CONFIG_SND_BF5XX_I2S) 559 static struct platform_device bfin_i2s = { 560 .name = "bfin-i2s", 561 .id = CONFIG_SND_BF5XX_SPORT_NUM, ··· 567 }; 568 #endif 569 570 + #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD1836) 571 static const char * const ad1836_link[] = { 572 "bfin-i2s.0", 573 "spi0.4", ··· 583 #endif 584 585 static struct spi_board_info bfin_spi_board_info[] __initdata = { 586 + #if IS_ENABLED(CONFIG_MTD_M25P80) 587 { 588 /* the modalias must be the same as spi device driver name */ 589 .modalias = "m25p80", /* Name of spi_driver for this device */ ··· 597 }, 598 #endif 599 600 + #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD183X) 601 { 602 .modalias = "ad183x", 603 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 608 .mode = SPI_MODE_3, 609 }, 610 #endif 611 + #if IS_ENABLED(CONFIG_MMC_SPI) 612 { 613 .modalias = "mmc_spi", 614 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ ··· 619 }, 620 #endif 621 622 + #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877) 623 { 624 .modalias = "ad7877", 625 .platform_data = &bfin_ad7877_ts_info, ··· 629 .chip_select = 2, 630 }, 631 #endif 632 + #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7879_SPI) 633 { 634 .modalias = "ad7879", 635 .platform_data = &bfin_ad7879_ts_info, ··· 640 .mode = SPI_CPHA | SPI_CPOL, 641 }, 642 #endif 643 + #if IS_ENABLED(CONFIG_SPI_SPIDEV) 644 { 645 .modalias = "spidev", 646 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 648 .chip_select = 1, 649 }, 650 #endif 651 + #if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1) 652 { 653 .modalias = "bfin-lq035q1-spi", 654 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ ··· 659 #endif 660 }; 661 662 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 663 /* SPI controller data */ 664 static struct bfin5xx_spi_master bfin_spi0_info = { 665 .num_chipselect = 8, ··· 697 }; 698 #endif /* spi master and devices */ 699 700 + #if IS_ENABLED(CONFIG_SERIAL_BFIN) 701 #ifdef CONFIG_SERIAL_BFIN_UART0 702 static struct resource bfin_uart0_resources[] = { 703 { ··· 808 #endif 809 #endif 810 811 + #if IS_ENABLED(CONFIG_BFIN_SIR) 812 #ifdef CONFIG_BFIN_SIR0 813 static struct resource bfin_sir0_resources[] = { 814 { ··· 863 #endif 864 #endif 865 866 + #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI) 867 static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; 868 869 static struct resource bfin_twi0_resource[] = { ··· 890 }; 891 #endif 892 893 + #if IS_ENABLED(CONFIG_PMIC_ADP5520) 894 #include <linux/mfd/adp5520.h> 895 896 /* ··· 956 #endif 957 958 static struct i2c_board_info __initdata bfin_i2c_board_info[] = { 959 + #if IS_ENABLED(CONFIG_BFIN_TWI_LCD) 960 { 961 I2C_BOARD_INFO("pcf8574_lcd", 0x22), 962 }, 963 #endif 964 + #if IS_ENABLED(CONFIG_INPUT_PCF8574) 965 { 966 I2C_BOARD_INFO("pcf8574_keypad", 0x27), 967 .irq = IRQ_PF8, 968 }, 969 #endif 970 + #if IS_ENABLED(CONFIG_FB_BFIN_7393) 971 { 972 I2C_BOARD_INFO("bfin-adv7393", 0x2B), 973 }, 974 #endif 975 + #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7879_I2C) 976 { 977 I2C_BOARD_INFO("ad7879", 0x2C), 978 .irq = IRQ_PF8, 979 .platform_data = (void *)&bfin_ad7879_ts_info, 980 }, 981 #endif 982 + #if IS_ENABLED(CONFIG_PMIC_ADP5520) 983 { 984 I2C_BOARD_INFO("pmic-adp5520", 0x32), 985 .irq = IRQ_PF9, 986 .platform_data = (void *)&adp5520_pdev_data, 987 }, 988 #endif 989 + #if IS_ENABLED(CONFIG_SND_SOC_SSM2602) 990 { 991 I2C_BOARD_INFO("ssm2602", 0x1b), 992 }, 993 #endif 994 + #if IS_ENABLED(CONFIG_BFIN_TWI_LCD) 995 { 996 I2C_BOARD_INFO("ad5252", 0x2f), 997 }, 998 #endif 999 + #if IS_ENABLED(CONFIG_SND_SOC_ADAU1373) 1000 { 1001 I2C_BOARD_INFO("adau1373", 0x1A), 1002 }, 1003 #endif 1004 }; 1005 1006 + #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT) 1007 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 1008 static struct resource bfin_sport0_uart_resources[] = { 1009 { ··· 1074 #endif 1075 #endif 1076 1077 + #if IS_ENABLED(CONFIG_KEYBOARD_GPIO) 1078 #include <linux/gpio_keys.h> 1079 1080 static struct gpio_keys_button bfin_gpio_keys_table[] = { ··· 1095 }; 1096 #endif 1097 1098 + #if IS_ENABLED(CONFIG_INPUT_BFIN_ROTARY) 1099 #include <asm/bfin_rotary.h> 1100 1101 static struct bfin_rotary_platform_data bfin_rotary_data = { ··· 1153 1154 &bfin_dpmc, 1155 1156 + #if IS_ENABLED(CONFIG_MTD_NAND_BF5XX) 1157 &bf5xx_nand_device, 1158 #endif 1159 1160 + #if IS_ENABLED(CONFIG_BFIN_CFPCMCIA) 1161 &bfin_pcmcia_cf_device, 1162 #endif 1163 1164 + #if IS_ENABLED(CONFIG_RTC_DRV_BFIN) 1165 &rtc_device, 1166 #endif 1167 1168 + #if IS_ENABLED(CONFIG_USB_ISP1760_HCD) 1169 &bfin_isp1760_device, 1170 #endif 1171 1172 + #if IS_ENABLED(CONFIG_USB_MUSB_HDRC) 1173 &musb_device, 1174 #endif 1175 1176 + #if IS_ENABLED(CONFIG_SMC91X) 1177 &smc91x_device, 1178 #endif 1179 1180 + #if IS_ENABLED(CONFIG_DM9000) 1181 &dm9000_device, 1182 #endif 1183 1184 + #if IS_ENABLED(CONFIG_BFIN_MAC) 1185 &bfin_mii_bus, 1186 &bfin_mac_device, 1187 #endif 1188 1189 + #if IS_ENABLED(CONFIG_USB_NET2272) 1190 &net2272_bfin_device, 1191 #endif 1192 1193 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 1194 &bfin_spi0_device, 1195 #endif 1196 1197 + #if IS_ENABLED(CONFIG_FB_BFIN_T350MCQB) 1198 &bf52x_t350mcqb_device, 1199 #endif 1200 1201 + #if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1) 1202 &bfin_lq035q1_device, 1203 #endif 1204 1205 + #if IS_ENABLED(CONFIG_SERIAL_BFIN) 1206 #ifdef CONFIG_SERIAL_BFIN_UART0 1207 &bfin_uart0_device, 1208 #endif ··· 1211 #endif 1212 #endif 1213 1214 + #if IS_ENABLED(CONFIG_BFIN_SIR) 1215 #ifdef CONFIG_BFIN_SIR0 1216 &bfin_sir0_device, 1217 #endif ··· 1220 #endif 1221 #endif 1222 1223 + #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI) 1224 &i2c_bfin_twi_device, 1225 #endif 1226 1227 + #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT) 1228 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 1229 &bfin_sport0_uart_device, 1230 #endif ··· 1233 #endif 1234 #endif 1235 1236 + #if IS_ENABLED(CONFIG_KEYBOARD_GPIO) 1237 &bfin_device_gpiokeys, 1238 #endif 1239 1240 + #if IS_ENABLED(CONFIG_INPUT_BFIN_ROTARY) 1241 &bfin_rotary_device, 1242 #endif 1243 1244 + #if IS_ENABLED(CONFIG_MTD_PHYSMAP) 1245 &ezkit_flash_device, 1246 #endif 1247 1248 + #if IS_ENABLED(CONFIG_SND_BF5XX_I2S) 1249 &bfin_i2s_pcm, 1250 #endif 1251 1252 + #if IS_ENABLED(CONFIG_SND_BF5XX_AC97) 1253 &bfin_ac97_pcm, 1254 #endif 1255 1256 + #if IS_ENABLED(CONFIG_SND_BF5XX_I2S) 1257 &bfin_i2s, 1258 #endif 1259 1260 + #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD1836) 1261 &bfin_ad1836_machine, 1262 #endif 1263 };
+41 -50
arch/blackfin/mach-bf527/boards/tll6527m.c
··· 28 #include <asm/portmux.h> 29 #include <asm/dpmc.h> 30 31 - #if defined(CONFIG_TOUCHSCREEN_AD7879) \ 32 - || defined(CONFIG_TOUCHSCREEN_AD7879_MODULE) 33 #include <linux/spi/ad7879.h> 34 #define LCD_BACKLIGHT_GPIO 0x40 35 /* TLL6527M uses TLL7UIQ35 / ADI LCD EZ Extender. AD7879 AUX GPIO is used for ··· 44 * Driver needs to know address, irq and flag pin. 45 */ 46 47 - #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) 48 static struct resource musb_resources[] = { 49 [0] = { 50 .start = 0xffc03800, ··· 103 }; 104 #endif 105 106 - #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) 107 #include <asm/bfin-lq035q1.h> 108 109 static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = { ··· 132 }; 133 #endif 134 135 - #if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE) 136 static struct mtd_partition tll6527m_partitions[] = { 137 { 138 .name = "bootloader(nor)", ··· 181 }; 182 #endif 183 184 - #if defined(CONFIG_GPIO_DECODER) || defined(CONFIG_GPIO_DECODER_MODULE) 185 /* An SN74LVC138A 3:8 decoder chip has been used to generate 7 augmented 186 * outputs used as SPI CS lines for all SPI SLAVE devices on TLL6527v1-0. 187 * EXP_GPIO_SPISEL_BASE is the base number for the expanded outputs being ··· 214 215 #endif 216 217 - #if defined(CONFIG_INPUT_ADXL34X) || defined(CONFIG_INPUT_ADXL34X_MODULE) 218 #include <linux/input/adxl34x.h> 219 static const struct adxl34x_platform_data adxl345_info = { 220 .x_axis_offset = 0, ··· 249 }; 250 #endif 251 252 - #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 253 static struct platform_device rtc_device = { 254 .name = "rtc-bfin", 255 .id = -1, 256 }; 257 #endif 258 259 - #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 260 #include <linux/bfin_mac.h> 261 static const unsigned short bfin_mac_peripherals[] = P_RMII0; 262 ··· 289 }; 290 #endif 291 292 - #if defined(CONFIG_MTD_M25P80) \ 293 - || defined(CONFIG_MTD_M25P80_MODULE) 294 static struct mtd_partition bfin_spi_flash_partitions[] = { 295 { 296 .name = "bootloader(spi)", ··· 316 }; 317 #endif 318 319 - #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 320 static struct bfin5xx_spi_chip mmc_spi_chip_info = { 321 .enable_dma = 0, 322 }; 323 #endif 324 325 - #if defined(CONFIG_TOUCHSCREEN_AD7879) \ 326 - || defined(CONFIG_TOUCHSCREEN_AD7879_MODULE) 327 static const struct ad7879_platform_data bfin_ad7879_ts_info = { 328 .model = 7879, /* Model = AD7879 */ 329 .x_plate_ohms = 620, /* 620 Ohm from the touch datasheet */ ··· 340 }; 341 #endif 342 343 - #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 344 static struct platform_device bfin_i2s = { 345 .name = "bfin-i2s", 346 .id = CONFIG_SND_BF5XX_SPORT_NUM, ··· 348 }; 349 #endif 350 351 - #if defined(CONFIG_GPIO_MCP23S08) || defined(CONFIG_GPIO_MCP23S08_MODULE) 352 #include <linux/spi/mcp23s08.h> 353 static const struct mcp23s08_platform_data bfin_mcp23s08_sys_gpio_info = { 354 .chip[0].is_present = true, ··· 361 #endif 362 363 static struct spi_board_info bfin_spi_board_info[] __initdata = { 364 - #if defined(CONFIG_MTD_M25P80) \ 365 - || defined(CONFIG_MTD_M25P80_MODULE) 366 { 367 /* the modalias must be the same as spi device driver name */ 368 .modalias = "m25p80", /* Name of spi_driver for this device */ ··· 377 }, 378 #endif 379 380 - #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 381 { 382 .modalias = "mmc_spi", 383 /* ··· 392 .mode = SPI_MODE_0, 393 }, 394 #endif 395 - #if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) \ 396 - || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE) 397 { 398 .modalias = "ad7879", 399 .platform_data = &bfin_ad7879_ts_info, ··· 404 .mode = SPI_CPHA | SPI_CPOL, 405 }, 406 #endif 407 - #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 408 { 409 .modalias = "spidev", 410 .max_speed_hz = 10000000, ··· 414 .mode = SPI_CPHA | SPI_CPOL, 415 }, 416 #endif 417 - #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) 418 { 419 .modalias = "bfin-lq035q1-spi", 420 .max_speed_hz = 20000000, ··· 423 .mode = SPI_CPHA | SPI_CPOL, 424 }, 425 #endif 426 - #if defined(CONFIG_GPIO_MCP23S08) || defined(CONFIG_GPIO_MCP23S08_MODULE) 427 { 428 .modalias = "mcp23s08", 429 .platform_data = &bfin_mcp23s08_sys_gpio_info, ··· 443 #endif 444 }; 445 446 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 447 /* SPI controller data */ 448 static struct bfin5xx_spi_master bfin_spi0_info = { 449 .num_chipselect = EXP_GPIO_SPISEL_BASE + 8 + MAX_CTRL_CS, ··· 482 }; 483 #endif /* spi master and devices */ 484 485 - #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 486 #ifdef CONFIG_SERIAL_BFIN_UART0 487 static struct resource bfin_uart0_resources[] = { 488 { ··· 595 #endif 596 #endif 597 598 - #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 599 #ifdef CONFIG_BFIN_SIR0 600 static struct resource bfin_sir0_resources[] = { 601 { ··· 650 #endif 651 #endif 652 653 - #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 654 static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; 655 656 static struct resource bfin_twi0_resource[] = { ··· 678 #endif 679 680 static struct i2c_board_info __initdata bfin_i2c_board_info[] = { 681 - #if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) 682 { 683 I2C_BOARD_INFO("pcf8574_lcd", 0x22), 684 }, 685 #endif 686 687 - #if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE) 688 { 689 I2C_BOARD_INFO("bfin-adv7393", 0x2B), 690 }, 691 #endif 692 - #if defined(CONFIG_TOUCHSCREEN_AD7879_I2C) \ 693 - || defined(CONFIG_TOUCHSCREEN_AD7879_I2C_MODULE) 694 { 695 I2C_BOARD_INFO("ad7879", 0x2C), 696 .irq = IRQ_PH14, 697 .platform_data = (void *)&bfin_ad7879_ts_info, 698 }, 699 #endif 700 - #if defined(CONFIG_SND_SOC_SSM2602) || defined(CONFIG_SND_SOC_SSM2602_MODULE) 701 { 702 I2C_BOARD_INFO("ssm2602", 0x1b), 703 }, ··· 708 { 709 I2C_BOARD_INFO("ltc3576", 0x09), 710 }, 711 - #if defined(CONFIG_INPUT_ADXL34X_I2C) \ 712 - || defined(CONFIG_INPUT_ADXL34X_I2C_MODULE) 713 { 714 I2C_BOARD_INFO("adxl34x", 0x53), 715 .irq = IRQ_PH13, ··· 717 #endif 718 }; 719 720 - #if defined(CONFIG_SERIAL_BFIN_SPORT) \ 721 - || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 722 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 723 static struct resource bfin_sport0_uart_resources[] = { 724 { ··· 815 816 &bfin_dpmc, 817 818 - #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 819 &rtc_device, 820 #endif 821 822 - #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) 823 &musb_device, 824 #endif 825 826 - #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 827 &bfin_mii_bus, 828 &bfin_mac_device, 829 #endif 830 831 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 832 &bfin_spi0_device, 833 #endif 834 835 - #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) 836 &bfin_lq035q1_device, 837 #endif 838 839 - #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 840 #ifdef CONFIG_SERIAL_BFIN_UART0 841 &bfin_uart0_device, 842 #endif ··· 845 #endif 846 #endif 847 848 - #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 849 #ifdef CONFIG_BFIN_SIR0 850 &bfin_sir0_device, 851 #endif ··· 854 #endif 855 #endif 856 857 - #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 858 &i2c_bfin_twi_device, 859 #endif 860 861 - #if defined(CONFIG_SERIAL_BFIN_SPORT) \ 862 - || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 863 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 864 &bfin_sport0_uart_device, 865 #endif ··· 867 #endif 868 #endif 869 870 - #if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE) 871 &tll6527m_flash_device, 872 #endif 873 874 - #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 875 &bfin_i2s, 876 #endif 877 878 - #if defined(CONFIG_GPIO_DECODER) || defined(CONFIG_GPIO_DECODER_MODULE) 879 &spi_decoded_gpio, 880 #endif 881 };
··· 28 #include <asm/portmux.h> 29 #include <asm/dpmc.h> 30 31 + #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7879) 32 #include <linux/spi/ad7879.h> 33 #define LCD_BACKLIGHT_GPIO 0x40 34 /* TLL6527M uses TLL7UIQ35 / ADI LCD EZ Extender. AD7879 AUX GPIO is used for ··· 45 * Driver needs to know address, irq and flag pin. 46 */ 47 48 + #if IS_ENABLED(CONFIG_USB_MUSB_HDRC) 49 static struct resource musb_resources[] = { 50 [0] = { 51 .start = 0xffc03800, ··· 104 }; 105 #endif 106 107 + #if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1) 108 #include <asm/bfin-lq035q1.h> 109 110 static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = { ··· 133 }; 134 #endif 135 136 + #if IS_ENABLED(CONFIG_MTD_GPIO_ADDR) 137 static struct mtd_partition tll6527m_partitions[] = { 138 { 139 .name = "bootloader(nor)", ··· 182 }; 183 #endif 184 185 + #if IS_ENABLED(CONFIG_GPIO_DECODER) 186 /* 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. 188 * EXP_GPIO_SPISEL_BASE is the base number for the expanded outputs being ··· 215 216 #endif 217 218 + #if IS_ENABLED(CONFIG_INPUT_ADXL34X) 219 #include <linux/input/adxl34x.h> 220 static const struct adxl34x_platform_data adxl345_info = { 221 .x_axis_offset = 0, ··· 250 }; 251 #endif 252 253 + #if IS_ENABLED(CONFIG_RTC_DRV_BFIN) 254 static struct platform_device rtc_device = { 255 .name = "rtc-bfin", 256 .id = -1, 257 }; 258 #endif 259 260 + #if IS_ENABLED(CONFIG_BFIN_MAC) 261 #include <linux/bfin_mac.h> 262 static const unsigned short bfin_mac_peripherals[] = P_RMII0; 263 ··· 290 }; 291 #endif 292 293 + #if IS_ENABLED(CONFIG_MTD_M25P80) 294 static struct mtd_partition bfin_spi_flash_partitions[] = { 295 { 296 .name = "bootloader(spi)", ··· 318 }; 319 #endif 320 321 + #if IS_ENABLED(CONFIG_MMC_SPI) 322 static struct bfin5xx_spi_chip mmc_spi_chip_info = { 323 .enable_dma = 0, 324 }; 325 #endif 326 327 + #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7879) 328 static const struct ad7879_platform_data bfin_ad7879_ts_info = { 329 .model = 7879, /* Model = AD7879 */ 330 .x_plate_ohms = 620, /* 620 Ohm from the touch datasheet */ ··· 343 }; 344 #endif 345 346 + #if IS_ENABLED(CONFIG_SND_BF5XX_I2S) 347 static struct platform_device bfin_i2s = { 348 .name = "bfin-i2s", 349 .id = CONFIG_SND_BF5XX_SPORT_NUM, ··· 351 }; 352 #endif 353 354 + #if IS_ENABLED(CONFIG_GPIO_MCP23S08) 355 #include <linux/spi/mcp23s08.h> 356 static const struct mcp23s08_platform_data bfin_mcp23s08_sys_gpio_info = { 357 .chip[0].is_present = true, ··· 364 #endif 365 366 static struct spi_board_info bfin_spi_board_info[] __initdata = { 367 + #if IS_ENABLED(CONFIG_MTD_M25P80) 368 { 369 /* the modalias must be the same as spi device driver name */ 370 .modalias = "m25p80", /* Name of spi_driver for this device */ ··· 381 }, 382 #endif 383 384 + #if IS_ENABLED(CONFIG_MMC_SPI) 385 { 386 .modalias = "mmc_spi", 387 /* ··· 396 .mode = SPI_MODE_0, 397 }, 398 #endif 399 + #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7879_SPI) 400 { 401 .modalias = "ad7879", 402 .platform_data = &bfin_ad7879_ts_info, ··· 409 .mode = SPI_CPHA | SPI_CPOL, 410 }, 411 #endif 412 + #if IS_ENABLED(CONFIG_SPI_SPIDEV) 413 { 414 .modalias = "spidev", 415 .max_speed_hz = 10000000, ··· 419 .mode = SPI_CPHA | SPI_CPOL, 420 }, 421 #endif 422 + #if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1) 423 { 424 .modalias = "bfin-lq035q1-spi", 425 .max_speed_hz = 20000000, ··· 428 .mode = SPI_CPHA | SPI_CPOL, 429 }, 430 #endif 431 + #if IS_ENABLED(CONFIG_GPIO_MCP23S08) 432 { 433 .modalias = "mcp23s08", 434 .platform_data = &bfin_mcp23s08_sys_gpio_info, ··· 448 #endif 449 }; 450 451 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 452 /* SPI controller data */ 453 static struct bfin5xx_spi_master bfin_spi0_info = { 454 .num_chipselect = EXP_GPIO_SPISEL_BASE + 8 + MAX_CTRL_CS, ··· 487 }; 488 #endif /* spi master and devices */ 489 490 + #if IS_ENABLED(CONFIG_SERIAL_BFIN) 491 #ifdef CONFIG_SERIAL_BFIN_UART0 492 static struct resource bfin_uart0_resources[] = { 493 { ··· 600 #endif 601 #endif 602 603 + #if IS_ENABLED(CONFIG_BFIN_SIR) 604 #ifdef CONFIG_BFIN_SIR0 605 static struct resource bfin_sir0_resources[] = { 606 { ··· 655 #endif 656 #endif 657 658 + #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI) 659 static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; 660 661 static struct resource bfin_twi0_resource[] = { ··· 683 #endif 684 685 static struct i2c_board_info __initdata bfin_i2c_board_info[] = { 686 + #if IS_ENABLED(CONFIG_BFIN_TWI_LCD) 687 { 688 I2C_BOARD_INFO("pcf8574_lcd", 0x22), 689 }, 690 #endif 691 692 + #if IS_ENABLED(CONFIG_FB_BFIN_7393) 693 { 694 I2C_BOARD_INFO("bfin-adv7393", 0x2B), 695 }, 696 #endif 697 + #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7879_I2C) 698 { 699 I2C_BOARD_INFO("ad7879", 0x2C), 700 .irq = IRQ_PH14, 701 .platform_data = (void *)&bfin_ad7879_ts_info, 702 }, 703 #endif 704 + #if IS_ENABLED(CONFIG_SND_SOC_SSM2602) 705 { 706 I2C_BOARD_INFO("ssm2602", 0x1b), 707 }, ··· 714 { 715 I2C_BOARD_INFO("ltc3576", 0x09), 716 }, 717 + #if IS_ENABLED(CONFIG_INPUT_ADXL34X_I2C) 718 { 719 I2C_BOARD_INFO("adxl34x", 0x53), 720 .irq = IRQ_PH13, ··· 724 #endif 725 }; 726 727 + #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT) 728 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 729 static struct resource bfin_sport0_uart_resources[] = { 730 { ··· 823 824 &bfin_dpmc, 825 826 + #if IS_ENABLED(CONFIG_RTC_DRV_BFIN) 827 &rtc_device, 828 #endif 829 830 + #if IS_ENABLED(CONFIG_USB_MUSB_HDRC) 831 &musb_device, 832 #endif 833 834 + #if IS_ENABLED(CONFIG_BFIN_MAC) 835 &bfin_mii_bus, 836 &bfin_mac_device, 837 #endif 838 839 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 840 &bfin_spi0_device, 841 #endif 842 843 + #if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1) 844 &bfin_lq035q1_device, 845 #endif 846 847 + #if IS_ENABLED(CONFIG_SERIAL_BFIN) 848 #ifdef CONFIG_SERIAL_BFIN_UART0 849 &bfin_uart0_device, 850 #endif ··· 853 #endif 854 #endif 855 856 + #if IS_ENABLED(CONFIG_BFIN_SIR) 857 #ifdef CONFIG_BFIN_SIR0 858 &bfin_sir0_device, 859 #endif ··· 862 #endif 863 #endif 864 865 + #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI) 866 &i2c_bfin_twi_device, 867 #endif 868 869 + #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT) 870 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 871 &bfin_sport0_uart_device, 872 #endif ··· 876 #endif 877 #endif 878 879 + #if IS_ENABLED(CONFIG_MTD_GPIO_ADDR) 880 &tll6527m_flash_device, 881 #endif 882 883 + #if IS_ENABLED(CONFIG_SND_BF5XX_I2S) 884 &bfin_i2s, 885 #endif 886 887 + #if IS_ENABLED(CONFIG_GPIO_DECODER) 888 &spi_decoded_gpio, 889 #endif 890 };
+23 -23
arch/blackfin/mach-bf533/boards/H8606.c
··· 14 #include <linux/mtd/partitions.h> 15 #include <linux/spi/spi.h> 16 #include <linux/spi/flash.h> 17 - #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 18 #include <linux/usb/isp1362.h> 19 #endif 20 #include <linux/irq.h> ··· 29 */ 30 const char bfin_board_name[] = "HV Sistemas H8606"; 31 32 - #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 33 static struct platform_device rtc_device = { 34 .name = "rtc-bfin", 35 .id = -1, ··· 39 /* 40 * Driver needs to know address, irq and flag pin. 41 */ 42 - #if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE) 43 static struct resource dm9000_resources[] = { 44 [0] = { 45 .start = 0x20300000, ··· 67 }; 68 #endif 69 70 - #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 71 #include <linux/smc91x.h> 72 73 static struct smc91x_platdata smc91x_info = { ··· 104 }; 105 #endif 106 107 - #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 108 static struct resource net2272_bfin_resources[] = { 109 { 110 .start = 0x20300000, ··· 125 }; 126 #endif 127 128 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 129 /* all SPI peripherals info goes here */ 130 131 - #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) 132 static struct mtd_partition bfin_spi_flash_partitions[] = { 133 { 134 .name = "bootloader (spi)", ··· 166 /* Notice: for blackfin, the speed_hz is the value of register 167 * SPI_BAUD, not the real baudrate */ 168 static struct spi_board_info bfin_spi_board_info[] __initdata = { 169 - #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) 170 { 171 /* the modalias must be the same as spi device driver name */ 172 .modalias = "m25p80", /* Name of spi_driver for this device */ ··· 180 }, 181 #endif 182 183 - #if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) 184 { 185 .modalias = "ad183x", 186 .max_speed_hz = 16, ··· 229 }; 230 #endif /* spi master and devices */ 231 232 - #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 233 #ifdef CONFIG_SERIAL_BFIN_UART0 234 static struct resource bfin_uart0_resources[] = { 235 { ··· 280 #endif 281 #endif 282 283 - #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 284 #ifdef CONFIG_BFIN_SIR0 285 static struct resource bfin_sir0_resources[] = { 286 { ··· 309 #endif 310 #endif 311 312 - #if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) 313 314 #include <linux/serial_8250.h> 315 #include <linux/serial.h> ··· 353 354 #endif 355 356 - #if defined(CONFIG_KEYBOARD_OPENCORES) || defined(CONFIG_KEYBOARD_OPENCORES_MODULE) 357 358 /* 359 * Configuration for one OpenCores keyboard controller in FPGA at address 0x20200030, ··· 382 #endif 383 384 static struct platform_device *h8606_devices[] __initdata = { 385 - #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 386 &rtc_device, 387 #endif 388 389 - #if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE) 390 &dm9000_device, 391 #endif 392 393 - #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 394 &smc91x_device, 395 #endif 396 397 - #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 398 &net2272_bfin_device, 399 #endif 400 401 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 402 &bfin_spi0_device, 403 #endif 404 405 - #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 406 #ifdef CONFIG_SERIAL_BFIN_UART0 407 &bfin_uart0_device, 408 #endif 409 #endif 410 411 - #if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) 412 &serial8250_device, 413 #endif 414 415 - #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 416 #ifdef CONFIG_BFIN_SIR0 417 &bfin_sir0_device, 418 #endif 419 #endif 420 421 - #if defined(CONFIG_KEYBOARD_OPENCORES) || defined(CONFIG_KEYBOARD_OPENCORES_MODULE) 422 &opencores_kbd_device, 423 #endif 424 }; ··· 428 printk(KERN_INFO "HV Sistemas H8606 board support by http://www.hvsistemas.com\n"); 429 printk(KERN_INFO "%s(): registering device resources\n", __func__); 430 platform_add_devices(h8606_devices, ARRAY_SIZE(h8606_devices)); 431 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 432 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 433 #endif 434 return 0;
··· 14 #include <linux/mtd/partitions.h> 15 #include <linux/spi/spi.h> 16 #include <linux/spi/flash.h> 17 + #if IS_ENABLED(CONFIG_USB_ISP1362_HCD) 18 #include <linux/usb/isp1362.h> 19 #endif 20 #include <linux/irq.h> ··· 29 */ 30 const char bfin_board_name[] = "HV Sistemas H8606"; 31 32 + #if IS_ENABLED(CONFIG_RTC_DRV_BFIN) 33 static struct platform_device rtc_device = { 34 .name = "rtc-bfin", 35 .id = -1, ··· 39 /* 40 * Driver needs to know address, irq and flag pin. 41 */ 42 + #if IS_ENABLED(CONFIG_DM9000) 43 static struct resource dm9000_resources[] = { 44 [0] = { 45 .start = 0x20300000, ··· 67 }; 68 #endif 69 70 + #if IS_ENABLED(CONFIG_SMC91X) 71 #include <linux/smc91x.h> 72 73 static struct smc91x_platdata smc91x_info = { ··· 104 }; 105 #endif 106 107 + #if IS_ENABLED(CONFIG_USB_NET2272) 108 static struct resource net2272_bfin_resources[] = { 109 { 110 .start = 0x20300000, ··· 125 }; 126 #endif 127 128 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 129 /* all SPI peripherals info goes here */ 130 131 + #if IS_ENABLED(CONFIG_MTD_M25P80) 132 static struct mtd_partition bfin_spi_flash_partitions[] = { 133 { 134 .name = "bootloader (spi)", ··· 166 /* Notice: for blackfin, the speed_hz is the value of register 167 * SPI_BAUD, not the real baudrate */ 168 static struct spi_board_info bfin_spi_board_info[] __initdata = { 169 + #if IS_ENABLED(CONFIG_MTD_M25P80) 170 { 171 /* the modalias must be the same as spi device driver name */ 172 .modalias = "m25p80", /* Name of spi_driver for this device */ ··· 180 }, 181 #endif 182 183 + #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD183X) 184 { 185 .modalias = "ad183x", 186 .max_speed_hz = 16, ··· 229 }; 230 #endif /* spi master and devices */ 231 232 + #if IS_ENABLED(CONFIG_SERIAL_BFIN) 233 #ifdef CONFIG_SERIAL_BFIN_UART0 234 static struct resource bfin_uart0_resources[] = { 235 { ··· 280 #endif 281 #endif 282 283 + #if IS_ENABLED(CONFIG_BFIN_SIR) 284 #ifdef CONFIG_BFIN_SIR0 285 static struct resource bfin_sir0_resources[] = { 286 { ··· 309 #endif 310 #endif 311 312 + #if IS_ENABLED(CONFIG_SERIAL_8250) 313 314 #include <linux/serial_8250.h> 315 #include <linux/serial.h> ··· 353 354 #endif 355 356 + #if IS_ENABLED(CONFIG_KEYBOARD_OPENCORES) 357 358 /* 359 * Configuration for one OpenCores keyboard controller in FPGA at address 0x20200030, ··· 382 #endif 383 384 static struct platform_device *h8606_devices[] __initdata = { 385 + #if IS_ENABLED(CONFIG_RTC_DRV_BFIN) 386 &rtc_device, 387 #endif 388 389 + #if IS_ENABLED(CONFIG_DM9000) 390 &dm9000_device, 391 #endif 392 393 + #if IS_ENABLED(CONFIG_SMC91X) 394 &smc91x_device, 395 #endif 396 397 + #if IS_ENABLED(CONFIG_USB_NET2272) 398 &net2272_bfin_device, 399 #endif 400 401 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 402 &bfin_spi0_device, 403 #endif 404 405 + #if IS_ENABLED(CONFIG_SERIAL_BFIN) 406 #ifdef CONFIG_SERIAL_BFIN_UART0 407 &bfin_uart0_device, 408 #endif 409 #endif 410 411 + #if IS_ENABLED(CONFIG_SERIAL_8250) 412 &serial8250_device, 413 #endif 414 415 + #if IS_ENABLED(CONFIG_BFIN_SIR) 416 #ifdef CONFIG_BFIN_SIR0 417 &bfin_sir0_device, 418 #endif 419 #endif 420 421 + #if IS_ENABLED(CONFIG_KEYBOARD_OPENCORES) 422 &opencores_kbd_device, 423 #endif 424 }; ··· 428 printk(KERN_INFO "HV Sistemas H8606 board support by http://www.hvsistemas.com\n"); 429 printk(KERN_INFO "%s(): registering device resources\n", __func__); 430 platform_add_devices(h8606_devices, ARRAY_SIZE(h8606_devices)); 431 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 432 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 433 #endif 434 return 0;
+22 -22
arch/blackfin/mach-bf533/boards/blackstamp.c
··· 31 */ 32 const char bfin_board_name[] = "BlackStamp"; 33 34 - #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 35 static struct platform_device rtc_device = { 36 .name = "rtc-bfin", 37 .id = -1, ··· 41 /* 42 * Driver needs to know address, irq and flag pin. 43 */ 44 - #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 45 #include <linux/smc91x.h> 46 47 static struct smc91x_platdata smc91x_info = { ··· 74 }; 75 #endif 76 77 - #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) 78 static struct mtd_partition bfin_spi_flash_partitions[] = { 79 { 80 .name = "bootloader(spi)", ··· 105 }; 106 #endif 107 108 - #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 109 static struct bfin5xx_spi_chip mmc_spi_chip_info = { 110 .enable_dma = 0, 111 }; 112 #endif 113 114 static struct spi_board_info bfin_spi_board_info[] __initdata = { 115 - #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) 116 { 117 /* the modalias must be the same as spi device driver name */ 118 .modalias = "m25p80", /* Name of spi_driver for this device */ ··· 125 }, 126 #endif 127 128 - #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 129 { 130 .modalias = "mmc_spi", 131 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ ··· 136 }, 137 #endif 138 139 - #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 140 { 141 .modalias = "spidev", 142 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 146 #endif 147 }; 148 149 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 150 /* SPI (0) */ 151 static struct resource bfin_spi0_resource[] = { 152 [0] = { ··· 184 }; 185 #endif /* spi master and devices */ 186 187 - #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 188 #ifdef CONFIG_SERIAL_BFIN_UART0 189 static struct resource bfin_uart0_resources[] = { 190 { ··· 235 #endif 236 #endif 237 238 - #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 239 #ifdef CONFIG_BFIN_SIR0 240 static struct resource bfin_sir0_resources[] = { 241 { ··· 264 #endif 265 #endif 266 267 - #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 268 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 269 static struct resource bfin_sport0_uart_resources[] = { 270 { ··· 335 #endif 336 #endif 337 338 - #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 339 #include <linux/input.h> 340 #include <linux/gpio_keys.h> 341 ··· 358 }; 359 #endif 360 361 - #if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE) 362 #include <linux/i2c-gpio.h> 363 364 static struct i2c_gpio_platform_data i2c_gpio_data = { ··· 413 414 &bfin_dpmc, 415 416 - #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 417 &rtc_device, 418 #endif 419 420 - #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 421 &smc91x_device, 422 #endif 423 424 425 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 426 &bfin_spi0_device, 427 #endif 428 429 - #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 430 #ifdef CONFIG_SERIAL_BFIN_UART0 431 &bfin_uart0_device, 432 #endif 433 #endif 434 435 - #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 436 #ifdef CONFIG_BFIN_SIR0 437 &bfin_sir0_device, 438 #endif 439 #endif 440 441 - #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 442 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 443 &bfin_sport0_uart_device, 444 #endif ··· 447 #endif 448 #endif 449 450 - #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 451 &bfin_device_gpiokeys, 452 #endif 453 454 - #if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE) 455 &i2c_gpio_device, 456 #endif 457 }; ··· 469 if (ret < 0) 470 return ret; 471 472 - #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 473 /* 474 * setup BF533_STAMP CPLD to route AMS3 to Ethernet MAC. 475 * the bfin-async-map driver takes care of flipping between
··· 31 */ 32 const char bfin_board_name[] = "BlackStamp"; 33 34 + #if IS_ENABLED(CONFIG_RTC_DRV_BFIN) 35 static struct platform_device rtc_device = { 36 .name = "rtc-bfin", 37 .id = -1, ··· 41 /* 42 * Driver needs to know address, irq and flag pin. 43 */ 44 + #if IS_ENABLED(CONFIG_SMC91X) 45 #include <linux/smc91x.h> 46 47 static struct smc91x_platdata smc91x_info = { ··· 74 }; 75 #endif 76 77 + #if IS_ENABLED(CONFIG_MTD_M25P80) 78 static struct mtd_partition bfin_spi_flash_partitions[] = { 79 { 80 .name = "bootloader(spi)", ··· 105 }; 106 #endif 107 108 + #if IS_ENABLED(CONFIG_MMC_SPI) 109 static struct bfin5xx_spi_chip mmc_spi_chip_info = { 110 .enable_dma = 0, 111 }; 112 #endif 113 114 static struct spi_board_info bfin_spi_board_info[] __initdata = { 115 + #if IS_ENABLED(CONFIG_MTD_M25P80) 116 { 117 /* the modalias must be the same as spi device driver name */ 118 .modalias = "m25p80", /* Name of spi_driver for this device */ ··· 125 }, 126 #endif 127 128 + #if IS_ENABLED(CONFIG_MMC_SPI) 129 { 130 .modalias = "mmc_spi", 131 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ ··· 136 }, 137 #endif 138 139 + #if IS_ENABLED(CONFIG_SPI_SPIDEV) 140 { 141 .modalias = "spidev", 142 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 146 #endif 147 }; 148 149 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 150 /* SPI (0) */ 151 static struct resource bfin_spi0_resource[] = { 152 [0] = { ··· 184 }; 185 #endif /* spi master and devices */ 186 187 + #if IS_ENABLED(CONFIG_SERIAL_BFIN) 188 #ifdef CONFIG_SERIAL_BFIN_UART0 189 static struct resource bfin_uart0_resources[] = { 190 { ··· 235 #endif 236 #endif 237 238 + #if IS_ENABLED(CONFIG_BFIN_SIR) 239 #ifdef CONFIG_BFIN_SIR0 240 static struct resource bfin_sir0_resources[] = { 241 { ··· 264 #endif 265 #endif 266 267 + #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT) 268 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 269 static struct resource bfin_sport0_uart_resources[] = { 270 { ··· 335 #endif 336 #endif 337 338 + #if IS_ENABLED(CONFIG_KEYBOARD_GPIO) 339 #include <linux/input.h> 340 #include <linux/gpio_keys.h> 341 ··· 358 }; 359 #endif 360 361 + #if IS_ENABLED(CONFIG_I2C_GPIO) 362 #include <linux/i2c-gpio.h> 363 364 static struct i2c_gpio_platform_data i2c_gpio_data = { ··· 413 414 &bfin_dpmc, 415 416 + #if IS_ENABLED(CONFIG_RTC_DRV_BFIN) 417 &rtc_device, 418 #endif 419 420 + #if IS_ENABLED(CONFIG_SMC91X) 421 &smc91x_device, 422 #endif 423 424 425 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 426 &bfin_spi0_device, 427 #endif 428 429 + #if IS_ENABLED(CONFIG_SERIAL_BFIN) 430 #ifdef CONFIG_SERIAL_BFIN_UART0 431 &bfin_uart0_device, 432 #endif 433 #endif 434 435 + #if IS_ENABLED(CONFIG_BFIN_SIR) 436 #ifdef CONFIG_BFIN_SIR0 437 &bfin_sir0_device, 438 #endif 439 #endif 440 441 + #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT) 442 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 443 &bfin_sport0_uart_device, 444 #endif ··· 447 #endif 448 #endif 449 450 + #if IS_ENABLED(CONFIG_KEYBOARD_GPIO) 451 &bfin_device_gpiokeys, 452 #endif 453 454 + #if IS_ENABLED(CONFIG_I2C_GPIO) 455 &i2c_gpio_device, 456 #endif 457 }; ··· 469 if (ret < 0) 470 return ret; 471 472 + #if IS_ENABLED(CONFIG_SMC91X) 473 /* 474 * setup BF533_STAMP CPLD to route AMS3 to Ethernet MAC. 475 * the bfin-async-map driver takes care of flipping between
+27 -27
arch/blackfin/mach-bf533/boards/cm_bf533.c
··· 15 #include <linux/spi/spi.h> 16 #include <linux/spi/flash.h> 17 #include <linux/spi/mmc_spi.h> 18 - #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 19 #include <linux/usb/isp1362.h> 20 #endif 21 #include <linux/irq.h> ··· 29 */ 30 const char bfin_board_name[] = "Bluetechnix CM BF533"; 31 32 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 33 /* all SPI peripherals info goes here */ 34 - #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) 35 static struct mtd_partition bfin_spi_flash_partitions[] = { 36 { 37 .name = "bootloader(spi)", ··· 62 }; 63 #endif 64 65 - #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 66 static struct bfin5xx_spi_chip mmc_spi_chip_info = { 67 .enable_dma = 0, 68 }; 69 #endif 70 71 static struct spi_board_info bfin_spi_board_info[] __initdata = { 72 - #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) 73 { 74 /* the modalias must be the same as spi device driver name */ 75 .modalias = "m25p80", /* Name of spi_driver for this device */ ··· 82 }, 83 #endif 84 85 - #if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) 86 { 87 .modalias = "ad183x", 88 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 91 }, 92 #endif 93 94 - #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 95 { 96 .modalias = "mmc_spi", 97 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ ··· 140 }; 141 #endif /* spi master and devices */ 142 143 - #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 144 static struct platform_device rtc_device = { 145 .name = "rtc-bfin", 146 .id = -1, 147 }; 148 #endif 149 150 - #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 151 #include <linux/smc91x.h> 152 153 static struct smc91x_platdata smc91x_info = { ··· 178 }; 179 #endif 180 181 - #if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) 182 #include <linux/smsc911x.h> 183 184 static struct resource smsc911x_resources[] = { ··· 212 }; 213 #endif 214 215 - #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 216 #ifdef CONFIG_SERIAL_BFIN_UART0 217 static struct resource bfin_uart0_resources[] = { 218 { ··· 263 #endif 264 #endif 265 266 - #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 267 #ifdef CONFIG_BFIN_SIR0 268 static struct resource bfin_sir0_resources[] = { 269 { ··· 292 #endif 293 #endif 294 295 - #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 296 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 297 static struct resource bfin_sport0_uart_resources[] = { 298 { ··· 363 #endif 364 #endif 365 366 - #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 367 static struct resource isp1362_hcd_resources[] = { 368 { 369 .start = 0x20308000, ··· 403 #endif 404 405 406 - #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 407 static struct resource net2272_bfin_resources[] = { 408 { 409 .start = 0x20300000, ··· 426 427 428 429 - #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 430 static struct mtd_partition para_partitions[] = { 431 { 432 .name = "bootloader(nor)", ··· 495 496 &bfin_dpmc, 497 498 - #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 499 #ifdef CONFIG_SERIAL_BFIN_UART0 500 &bfin_uart0_device, 501 #endif 502 #endif 503 504 - #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 505 #ifdef CONFIG_BFIN_SIR0 506 &bfin_sir0_device, 507 #endif 508 #endif 509 510 - #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 511 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 512 &bfin_sport0_uart_device, 513 #endif ··· 516 #endif 517 #endif 518 519 - #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 520 &rtc_device, 521 #endif 522 523 - #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 524 &isp1362_hcd_device, 525 #endif 526 527 - #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 528 &smc91x_device, 529 #endif 530 531 - #if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) 532 &smsc911x_device, 533 #endif 534 535 - #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 536 &net2272_bfin_device, 537 #endif 538 539 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 540 &bfin_spi0_device, 541 #endif 542 543 - #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 544 &para_flash_device, 545 #endif 546 }; ··· 549 { 550 printk(KERN_INFO "%s(): registering device resources\n", __func__); 551 platform_add_devices(cm_bf533_devices, ARRAY_SIZE(cm_bf533_devices)); 552 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 553 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 554 #endif 555 return 0;
··· 15 #include <linux/spi/spi.h> 16 #include <linux/spi/flash.h> 17 #include <linux/spi/mmc_spi.h> 18 + #if IS_ENABLED(CONFIG_USB_ISP1362_HCD) 19 #include <linux/usb/isp1362.h> 20 #endif 21 #include <linux/irq.h> ··· 29 */ 30 const char bfin_board_name[] = "Bluetechnix CM BF533"; 31 32 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 33 /* all SPI peripherals info goes here */ 34 + #if IS_ENABLED(CONFIG_MTD_M25P80) 35 static struct mtd_partition bfin_spi_flash_partitions[] = { 36 { 37 .name = "bootloader(spi)", ··· 62 }; 63 #endif 64 65 + #if IS_ENABLED(CONFIG_MMC_SPI) 66 static struct bfin5xx_spi_chip mmc_spi_chip_info = { 67 .enable_dma = 0, 68 }; 69 #endif 70 71 static struct spi_board_info bfin_spi_board_info[] __initdata = { 72 + #if IS_ENABLED(CONFIG_MTD_M25P80) 73 { 74 /* the modalias must be the same as spi device driver name */ 75 .modalias = "m25p80", /* Name of spi_driver for this device */ ··· 82 }, 83 #endif 84 85 + #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD183X) 86 { 87 .modalias = "ad183x", 88 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 91 }, 92 #endif 93 94 + #if IS_ENABLED(CONFIG_MMC_SPI) 95 { 96 .modalias = "mmc_spi", 97 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ ··· 140 }; 141 #endif /* spi master and devices */ 142 143 + #if IS_ENABLED(CONFIG_RTC_DRV_BFIN) 144 static struct platform_device rtc_device = { 145 .name = "rtc-bfin", 146 .id = -1, 147 }; 148 #endif 149 150 + #if IS_ENABLED(CONFIG_SMC91X) 151 #include <linux/smc91x.h> 152 153 static struct smc91x_platdata smc91x_info = { ··· 178 }; 179 #endif 180 181 + #if IS_ENABLED(CONFIG_SMSC911X) 182 #include <linux/smsc911x.h> 183 184 static struct resource smsc911x_resources[] = { ··· 212 }; 213 #endif 214 215 + #if IS_ENABLED(CONFIG_SERIAL_BFIN) 216 #ifdef CONFIG_SERIAL_BFIN_UART0 217 static struct resource bfin_uart0_resources[] = { 218 { ··· 263 #endif 264 #endif 265 266 + #if IS_ENABLED(CONFIG_BFIN_SIR) 267 #ifdef CONFIG_BFIN_SIR0 268 static struct resource bfin_sir0_resources[] = { 269 { ··· 292 #endif 293 #endif 294 295 + #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT) 296 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 297 static struct resource bfin_sport0_uart_resources[] = { 298 { ··· 363 #endif 364 #endif 365 366 + #if IS_ENABLED(CONFIG_USB_ISP1362_HCD) 367 static struct resource isp1362_hcd_resources[] = { 368 { 369 .start = 0x20308000, ··· 403 #endif 404 405 406 + #if IS_ENABLED(CONFIG_USB_NET2272) 407 static struct resource net2272_bfin_resources[] = { 408 { 409 .start = 0x20300000, ··· 426 427 428 429 + #if IS_ENABLED(CONFIG_MTD_PHYSMAP) 430 static struct mtd_partition para_partitions[] = { 431 { 432 .name = "bootloader(nor)", ··· 495 496 &bfin_dpmc, 497 498 + #if IS_ENABLED(CONFIG_SERIAL_BFIN) 499 #ifdef CONFIG_SERIAL_BFIN_UART0 500 &bfin_uart0_device, 501 #endif 502 #endif 503 504 + #if IS_ENABLED(CONFIG_BFIN_SIR) 505 #ifdef CONFIG_BFIN_SIR0 506 &bfin_sir0_device, 507 #endif 508 #endif 509 510 + #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT) 511 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 512 &bfin_sport0_uart_device, 513 #endif ··· 516 #endif 517 #endif 518 519 + #if IS_ENABLED(CONFIG_RTC_DRV_BFIN) 520 &rtc_device, 521 #endif 522 523 + #if IS_ENABLED(CONFIG_USB_ISP1362_HCD) 524 &isp1362_hcd_device, 525 #endif 526 527 + #if IS_ENABLED(CONFIG_SMC91X) 528 &smc91x_device, 529 #endif 530 531 + #if IS_ENABLED(CONFIG_SMSC911X) 532 &smsc911x_device, 533 #endif 534 535 + #if IS_ENABLED(CONFIG_USB_NET2272) 536 &net2272_bfin_device, 537 #endif 538 539 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 540 &bfin_spi0_device, 541 #endif 542 543 + #if IS_ENABLED(CONFIG_MTD_PHYSMAP) 544 &para_flash_device, 545 #endif 546 }; ··· 549 { 550 printk(KERN_INFO "%s(): registering device resources\n", __func__); 551 platform_add_devices(cm_bf533_devices, ARRAY_SIZE(cm_bf533_devices)); 552 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 553 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 554 #endif 555 return 0;
+28 -28
arch/blackfin/mach-bf533/boards/ezkit.c
··· 14 #include <linux/mtd/physmap.h> 15 #include <linux/spi/spi.h> 16 #include <linux/spi/flash.h> 17 - #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 18 #include <linux/usb/isp1362.h> 19 #endif 20 #include <linux/irq.h> ··· 29 */ 30 const char bfin_board_name[] = "ADI BF533-EZKIT"; 31 32 - #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 33 static struct platform_device rtc_device = { 34 .name = "rtc-bfin", 35 .id = -1, ··· 40 * USB-LAN EzExtender board 41 * Driver needs to know address, irq and flag pin. 42 */ 43 - #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 44 #include <linux/smc91x.h> 45 46 static struct smc91x_platdata smc91x_info = { ··· 72 }; 73 #endif 74 75 - #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 76 static struct mtd_partition ezkit_partitions_a[] = { 77 { 78 .name = "bootloader(nor a)", ··· 138 }; 139 #endif 140 141 - #if defined(CONFIG_MTD_PLATRAM) || defined(CONFIG_MTD_PLATRAM_MODULE) 142 static struct platdata_mtd_ram sram_data_a = { 143 .mapname = "Flash A SRAM", 144 .bankwidth = 2, ··· 182 }; 183 #endif 184 185 - #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) 186 static struct mtd_partition bfin_spi_flash_partitions[] = { 187 { 188 .name = "bootloader(spi)", ··· 214 #endif 215 216 static struct spi_board_info bfin_spi_board_info[] __initdata = { 217 - #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) 218 { 219 /* the modalias must be the same as spi device driver name */ 220 .modalias = "m25p80", /* Name of spi_driver for this device */ ··· 227 }, 228 #endif 229 230 - #if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) 231 { 232 .modalias = "ad183x", 233 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 235 .chip_select = 4, 236 }, 237 #endif 238 - #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 239 { 240 .modalias = "spidev", 241 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 245 #endif 246 }; 247 248 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 249 /* SPI (0) */ 250 static struct resource bfin_spi0_resource[] = { 251 [0] = { ··· 283 }; 284 #endif /* spi master and devices */ 285 286 - #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 287 #ifdef CONFIG_SERIAL_BFIN_UART0 288 static struct resource bfin_uart0_resources[] = { 289 { ··· 334 #endif 335 #endif 336 337 - #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 338 #ifdef CONFIG_BFIN_SIR0 339 static struct resource bfin_sir0_resources[] = { 340 { ··· 363 #endif 364 #endif 365 366 - #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 367 #include <linux/input.h> 368 #include <linux/gpio_keys.h> 369 ··· 387 }; 388 #endif 389 390 - #if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE) 391 #include <linux/i2c-gpio.h> 392 393 static struct i2c_gpio_platform_data i2c_gpio_data = { ··· 435 }; 436 437 static struct i2c_board_info __initdata bfin_i2c_board_info[] = { 438 - #if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE) 439 { 440 I2C_BOARD_INFO("bfin-adv7393", 0x2B), 441 }, 442 #endif 443 }; 444 445 - #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 446 static struct platform_device bfin_i2s = { 447 .name = "bfin-i2s", 448 .id = CONFIG_SND_BF5XX_SPORT_NUM, ··· 450 }; 451 #endif 452 453 - #if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) 454 static struct platform_device bfin_ac97 = { 455 .name = "bfin-ac97", 456 .id = CONFIG_SND_BF5XX_SPORT_NUM, ··· 462 463 &bfin_dpmc, 464 465 - #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 466 &ezkit_flash_device_a, 467 &ezkit_flash_device_b, 468 #endif 469 470 - #if defined(CONFIG_MTD_PLATRAM) || defined(CONFIG_MTD_PLATRAM_MODULE) 471 &sram_device_a, 472 &sram_device_b, 473 #endif 474 475 - #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 476 &smc91x_device, 477 #endif 478 479 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 480 &bfin_spi0_device, 481 #endif 482 483 - #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 484 &rtc_device, 485 #endif 486 487 - #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 488 #ifdef CONFIG_SERIAL_BFIN_UART0 489 &bfin_uart0_device, 490 #endif 491 #endif 492 493 - #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 494 #ifdef CONFIG_BFIN_SIR0 495 &bfin_sir0_device, 496 #endif 497 #endif 498 499 - #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 500 &bfin_device_gpiokeys, 501 #endif 502 503 - #if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE) 504 &i2c_gpio_device, 505 #endif 506 507 - #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 508 &bfin_i2s, 509 #endif 510 511 - #if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) 512 &bfin_ac97, 513 #endif 514 };
··· 14 #include <linux/mtd/physmap.h> 15 #include <linux/spi/spi.h> 16 #include <linux/spi/flash.h> 17 + #if IS_ENABLED(CONFIG_USB_ISP1362_HCD) 18 #include <linux/usb/isp1362.h> 19 #endif 20 #include <linux/irq.h> ··· 29 */ 30 const char bfin_board_name[] = "ADI BF533-EZKIT"; 31 32 + #if IS_ENABLED(CONFIG_RTC_DRV_BFIN) 33 static struct platform_device rtc_device = { 34 .name = "rtc-bfin", 35 .id = -1, ··· 40 * USB-LAN EzExtender board 41 * Driver needs to know address, irq and flag pin. 42 */ 43 + #if IS_ENABLED(CONFIG_SMC91X) 44 #include <linux/smc91x.h> 45 46 static struct smc91x_platdata smc91x_info = { ··· 72 }; 73 #endif 74 75 + #if IS_ENABLED(CONFIG_MTD_PHYSMAP) 76 static struct mtd_partition ezkit_partitions_a[] = { 77 { 78 .name = "bootloader(nor a)", ··· 138 }; 139 #endif 140 141 + #if IS_ENABLED(CONFIG_MTD_PLATRAM) 142 static struct platdata_mtd_ram sram_data_a = { 143 .mapname = "Flash A SRAM", 144 .bankwidth = 2, ··· 182 }; 183 #endif 184 185 + #if IS_ENABLED(CONFIG_MTD_M25P80) 186 static struct mtd_partition bfin_spi_flash_partitions[] = { 187 { 188 .name = "bootloader(spi)", ··· 214 #endif 215 216 static struct spi_board_info bfin_spi_board_info[] __initdata = { 217 + #if IS_ENABLED(CONFIG_MTD_M25P80) 218 { 219 /* the modalias must be the same as spi device driver name */ 220 .modalias = "m25p80", /* Name of spi_driver for this device */ ··· 227 }, 228 #endif 229 230 + #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD183X) 231 { 232 .modalias = "ad183x", 233 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 235 .chip_select = 4, 236 }, 237 #endif 238 + #if IS_ENABLED(CONFIG_SPI_SPIDEV) 239 { 240 .modalias = "spidev", 241 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 245 #endif 246 }; 247 248 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 249 /* SPI (0) */ 250 static struct resource bfin_spi0_resource[] = { 251 [0] = { ··· 283 }; 284 #endif /* spi master and devices */ 285 286 + #if IS_ENABLED(CONFIG_SERIAL_BFIN) 287 #ifdef CONFIG_SERIAL_BFIN_UART0 288 static struct resource bfin_uart0_resources[] = { 289 { ··· 334 #endif 335 #endif 336 337 + #if IS_ENABLED(CONFIG_BFIN_SIR) 338 #ifdef CONFIG_BFIN_SIR0 339 static struct resource bfin_sir0_resources[] = { 340 { ··· 363 #endif 364 #endif 365 366 + #if IS_ENABLED(CONFIG_KEYBOARD_GPIO) 367 #include <linux/input.h> 368 #include <linux/gpio_keys.h> 369 ··· 387 }; 388 #endif 389 390 + #if IS_ENABLED(CONFIG_I2C_GPIO) 391 #include <linux/i2c-gpio.h> 392 393 static struct i2c_gpio_platform_data i2c_gpio_data = { ··· 435 }; 436 437 static struct i2c_board_info __initdata bfin_i2c_board_info[] = { 438 + #if IS_ENABLED(CONFIG_FB_BFIN_7393) 439 { 440 I2C_BOARD_INFO("bfin-adv7393", 0x2B), 441 }, 442 #endif 443 }; 444 445 + #if IS_ENABLED(CONFIG_SND_BF5XX_I2S) 446 static struct platform_device bfin_i2s = { 447 .name = "bfin-i2s", 448 .id = CONFIG_SND_BF5XX_SPORT_NUM, ··· 450 }; 451 #endif 452 453 + #if IS_ENABLED(CONFIG_SND_BF5XX_AC97) 454 static struct platform_device bfin_ac97 = { 455 .name = "bfin-ac97", 456 .id = CONFIG_SND_BF5XX_SPORT_NUM, ··· 462 463 &bfin_dpmc, 464 465 + #if IS_ENABLED(CONFIG_MTD_PHYSMAP) 466 &ezkit_flash_device_a, 467 &ezkit_flash_device_b, 468 #endif 469 470 + #if IS_ENABLED(CONFIG_MTD_PLATRAM) 471 &sram_device_a, 472 &sram_device_b, 473 #endif 474 475 + #if IS_ENABLED(CONFIG_SMC91X) 476 &smc91x_device, 477 #endif 478 479 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 480 &bfin_spi0_device, 481 #endif 482 483 + #if IS_ENABLED(CONFIG_RTC_DRV_BFIN) 484 &rtc_device, 485 #endif 486 487 + #if IS_ENABLED(CONFIG_SERIAL_BFIN) 488 #ifdef CONFIG_SERIAL_BFIN_UART0 489 &bfin_uart0_device, 490 #endif 491 #endif 492 493 + #if IS_ENABLED(CONFIG_BFIN_SIR) 494 #ifdef CONFIG_BFIN_SIR0 495 &bfin_sir0_device, 496 #endif 497 #endif 498 499 + #if IS_ENABLED(CONFIG_KEYBOARD_GPIO) 500 &bfin_device_gpiokeys, 501 #endif 502 503 + #if IS_ENABLED(CONFIG_I2C_GPIO) 504 &i2c_gpio_device, 505 #endif 506 507 + #if IS_ENABLED(CONFIG_SND_BF5XX_I2S) 508 &bfin_i2s, 509 #endif 510 511 + #if IS_ENABLED(CONFIG_SND_BF5XX_AC97) 512 &bfin_ac97, 513 #endif 514 };
+13 -13
arch/blackfin/mach-bf533/boards/ip0x.c
··· 15 #include <linux/mtd/partitions.h> 16 #include <linux/spi/spi.h> 17 #include <linux/spi/flash.h> 18 - #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 19 #include <linux/usb/isp1362.h> 20 #endif 21 #include <asm/irq.h> ··· 32 * Driver needs to know address, irq and flag pin. 33 */ 34 #if defined(CONFIG_BFIN532_IP0X) 35 - #if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE) 36 37 #include <linux/dm9000.h> 38 ··· 104 #endif 105 106 107 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 108 /* all SPI peripherals info goes here */ 109 110 - #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 111 static struct bfin5xx_spi_chip mmc_spi_chip_info = { 112 .enable_dma = 0, /* if 1 - block!!! */ 113 }; ··· 116 /* Notice: for blackfin, the speed_hz is the value of register 117 * SPI_BAUD, not the real baudrate */ 118 static struct spi_board_info bfin_spi_board_info[] __initdata = { 119 - #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 120 { 121 .modalias = "mmc_spi", 122 .max_speed_hz = 2, ··· 142 }; 143 #endif /* spi master and devices */ 144 145 - #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 146 #ifdef CONFIG_SERIAL_BFIN_UART0 147 static struct resource bfin_uart0_resources[] = { 148 { ··· 193 #endif 194 #endif 195 196 - #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 197 #ifdef CONFIG_BFIN_SIR0 198 static struct resource bfin_sir0_resources[] = { 199 { ··· 222 #endif 223 #endif 224 225 - #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 226 static struct resource isp1362_hcd_resources[] = { 227 { 228 .start = 0x20300000, ··· 264 265 static struct platform_device *ip0x_devices[] __initdata = { 266 #if defined(CONFIG_BFIN532_IP0X) 267 - #if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE) 268 &dm9000_device1, 269 &dm9000_device2, 270 #endif 271 #endif 272 273 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 274 &spi_bfin_master_device, 275 #endif 276 277 - #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 278 #ifdef CONFIG_SERIAL_BFIN_UART0 279 &bfin_uart0_device, 280 #endif 281 #endif 282 283 - #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 284 #ifdef CONFIG_BFIN_SIR0 285 &bfin_sir0_device, 286 #endif 287 #endif 288 289 - #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 290 &isp1362_hcd_device, 291 #endif 292 };
··· 15 #include <linux/mtd/partitions.h> 16 #include <linux/spi/spi.h> 17 #include <linux/spi/flash.h> 18 + #if IS_ENABLED(CONFIG_USB_ISP1362_HCD) 19 #include <linux/usb/isp1362.h> 20 #endif 21 #include <asm/irq.h> ··· 32 * Driver needs to know address, irq and flag pin. 33 */ 34 #if defined(CONFIG_BFIN532_IP0X) 35 + #if IS_ENABLED(CONFIG_DM9000) 36 37 #include <linux/dm9000.h> 38 ··· 104 #endif 105 106 107 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 108 /* all SPI peripherals info goes here */ 109 110 + #if IS_ENABLED(CONFIG_MMC_SPI) 111 static struct bfin5xx_spi_chip mmc_spi_chip_info = { 112 .enable_dma = 0, /* if 1 - block!!! */ 113 }; ··· 116 /* Notice: for blackfin, the speed_hz is the value of register 117 * SPI_BAUD, not the real baudrate */ 118 static struct spi_board_info bfin_spi_board_info[] __initdata = { 119 + #if IS_ENABLED(CONFIG_MMC_SPI) 120 { 121 .modalias = "mmc_spi", 122 .max_speed_hz = 2, ··· 142 }; 143 #endif /* spi master and devices */ 144 145 + #if IS_ENABLED(CONFIG_SERIAL_BFIN) 146 #ifdef CONFIG_SERIAL_BFIN_UART0 147 static struct resource bfin_uart0_resources[] = { 148 { ··· 193 #endif 194 #endif 195 196 + #if IS_ENABLED(CONFIG_BFIN_SIR) 197 #ifdef CONFIG_BFIN_SIR0 198 static struct resource bfin_sir0_resources[] = { 199 { ··· 222 #endif 223 #endif 224 225 + #if IS_ENABLED(CONFIG_USB_ISP1362_HCD) 226 static struct resource isp1362_hcd_resources[] = { 227 { 228 .start = 0x20300000, ··· 264 265 static struct platform_device *ip0x_devices[] __initdata = { 266 #if defined(CONFIG_BFIN532_IP0X) 267 + #if IS_ENABLED(CONFIG_DM9000) 268 &dm9000_device1, 269 &dm9000_device2, 270 #endif 271 #endif 272 273 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 274 &spi_bfin_master_device, 275 #endif 276 277 + #if IS_ENABLED(CONFIG_SERIAL_BFIN) 278 #ifdef CONFIG_SERIAL_BFIN_UART0 279 &bfin_uart0_device, 280 #endif 281 #endif 282 283 + #if IS_ENABLED(CONFIG_BFIN_SIR) 284 #ifdef CONFIG_BFIN_SIR0 285 &bfin_sir0_device, 286 #endif 287 #endif 288 289 + #if IS_ENABLED(CONFIG_USB_ISP1362_HCD) 290 &isp1362_hcd_device, 291 #endif 292 };
+53 -65
arch/blackfin/mach-bf533/boards/stamp.c
··· 14 #include <linux/spi/spi.h> 15 #include <linux/spi/flash.h> 16 #include <linux/spi/mmc_spi.h> 17 - #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 18 #include <linux/usb/isp1362.h> 19 #endif 20 #include <linux/irq.h> ··· 30 */ 31 const char bfin_board_name[] = "ADI BF533-STAMP"; 32 33 - #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 34 static struct platform_device rtc_device = { 35 .name = "rtc-bfin", 36 .id = -1, ··· 40 /* 41 * Driver needs to know address, irq and flag pin. 42 */ 43 - #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 44 #include <linux/smc91x.h> 45 46 static struct smc91x_platdata smc91x_info = { ··· 73 }; 74 #endif 75 76 - #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 77 static struct resource net2272_bfin_resources[] = { 78 { 79 .start = 0x20300000, ··· 97 }; 98 #endif 99 100 - #if defined(CONFIG_MTD_BFIN_ASYNC) || defined(CONFIG_MTD_BFIN_ASYNC_MODULE) 101 static struct mtd_partition stamp_partitions[] = { 102 { 103 .name = "bootloader(nor)", ··· 147 }; 148 #endif 149 150 - #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) 151 static struct mtd_partition bfin_spi_flash_partitions[] = { 152 { 153 .name = "bootloader(spi)", ··· 178 }; 179 #endif 180 181 - #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 182 #define MMC_SPI_CARD_DETECT_INT IRQ_PF5 183 static int bfin_mmc_spi_init(struct device *dev, 184 irqreturn_t (*detect_int)(int, void *), void *data) ··· 206 #endif 207 208 static struct spi_board_info bfin_spi_board_info[] __initdata = { 209 - #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) 210 { 211 /* the modalias must be the same as spi device driver name */ 212 .modalias = "m25p80", /* Name of spi_driver for this device */ ··· 219 }, 220 #endif 221 222 - #if defined(CONFIG_SND_BF5XX_SOC_AD1836) || \ 223 - defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE) 224 { 225 .modalias = "ad1836", 226 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 230 }, 231 #endif 232 233 - #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 234 { 235 .modalias = "spidev", 236 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 238 .chip_select = 1, 239 }, 240 #endif 241 - #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 242 { 243 .modalias = "mmc_spi", 244 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ ··· 251 #endif 252 }; 253 254 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 255 /* SPI (0) */ 256 static struct resource bfin_spi0_resource[] = { 257 [0] = { ··· 289 }; 290 #endif /* spi master and devices */ 291 292 - #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 293 #ifdef CONFIG_SERIAL_BFIN_UART0 294 static struct resource bfin_uart0_resources[] = { 295 { ··· 340 #endif 341 #endif 342 343 - #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 344 #ifdef CONFIG_BFIN_SIR0 345 static struct resource bfin_sir0_resources[] = { 346 { ··· 369 #endif 370 #endif 371 372 - #if defined(CONFIG_SERIAL_BFIN_SPORT) || \ 373 - defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 374 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 375 static struct resource bfin_sport0_uart_resources[] = { 376 { ··· 440 #endif 441 #endif 442 443 - #if defined(CONFIG_BFIN_SPORT) || defined(CONFIG_BFIN_SPORT_MODULE) 444 static struct resource bfin_sport0_resources[] = { 445 { 446 .start = SPORT0_TCR1, ··· 484 }; 485 #endif 486 487 - #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 488 #include <linux/input.h> 489 #include <linux/gpio_keys.h> 490 ··· 507 }; 508 #endif 509 510 - #if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE) 511 #include <linux/i2c-gpio.h> 512 513 static struct i2c_gpio_platform_data i2c_gpio_data = { ··· 528 #endif 529 530 static struct i2c_board_info __initdata bfin_i2c_board_info[] = { 531 - #if defined(CONFIG_JOYSTICK_AD7142) || defined(CONFIG_JOYSTICK_AD7142_MODULE) 532 { 533 I2C_BOARD_INFO("ad7142_joystick", 0x2C), 534 .irq = 39, 535 }, 536 #endif 537 - #if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) 538 { 539 I2C_BOARD_INFO("pcf8574_lcd", 0x22), 540 }, 541 #endif 542 - #if defined(CONFIG_INPUT_PCF8574) || defined(CONFIG_INPUT_PCF8574_MODULE) 543 { 544 I2C_BOARD_INFO("pcf8574_keypad", 0x27), 545 .irq = 39, 546 }, 547 #endif 548 - #if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE) 549 { 550 I2C_BOARD_INFO("bfin-adv7393", 0x2B), 551 }, 552 #endif 553 - #if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) 554 { 555 I2C_BOARD_INFO("ad5252", 0x2f), 556 }, ··· 584 }, 585 }; 586 587 - #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) || \ 588 - defined(CONFIG_SND_BF5XX_AC97) || \ 589 - defined(CONFIG_SND_BF5XX_AC97_MODULE) 590 591 #include <asm/bfin_sport.h> 592 ··· 637 }; 638 #endif 639 640 - #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 641 static struct platform_device bfin_i2s_pcm = { 642 .name = "bfin-i2s-pcm-audio", 643 .id = -1, 644 }; 645 #endif 646 647 - #if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) 648 static struct platform_device bfin_ac97_pcm = { 649 .name = "bfin-ac97-pcm-audio", 650 .id = -1, 651 }; 652 #endif 653 654 - #if defined(CONFIG_SND_BF5XX_SOC_AD1836) \ 655 - || defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE) 656 static const char * const ad1836_link[] = { 657 "bfin-i2s.0", 658 "spi0.4", ··· 665 }; 666 #endif 667 668 - #if defined(CONFIG_SND_BF5XX_SOC_AD73311) || \ 669 - defined(CONFIG_SND_BF5XX_SOC_AD73311_MODULE) 670 static const unsigned ad73311_gpio[] = { 671 GPIO_PF4, 672 }; ··· 679 }; 680 #endif 681 682 - #if defined(CONFIG_SND_SOC_AD73311) || defined(CONFIG_SND_SOC_AD73311_MODULE) 683 static struct platform_device bfin_ad73311_codec_device = { 684 .name = "ad73311", 685 .id = -1, 686 }; 687 #endif 688 689 - #if defined(CONFIG_SND_SOC_AD74111) || defined(CONFIG_SND_SOC_AD74111_MODULE) 690 static struct platform_device bfin_ad74111_codec_device = { 691 .name = "ad74111", 692 .id = -1, 693 }; 694 #endif 695 696 - #if defined(CONFIG_SND_BF5XX_SOC_I2S) || \ 697 - defined(CONFIG_SND_BF5XX_SOC_I2S_MODULE) 698 static struct platform_device bfin_i2s = { 699 .name = "bfin-i2s", 700 .id = CONFIG_SND_BF5XX_SPORT_NUM, ··· 706 }; 707 #endif 708 709 - #if defined(CONFIG_SND_BF5XX_SOC_AC97) || \ 710 - defined(CONFIG_SND_BF5XX_SOC_AC97_MODULE) 711 static struct platform_device bfin_ac97 = { 712 .name = "bfin-ac97", 713 .id = CONFIG_SND_BF5XX_SPORT_NUM, ··· 723 724 &bfin_dpmc, 725 726 - #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 727 &rtc_device, 728 #endif 729 730 - #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 731 &smc91x_device, 732 #endif 733 734 - #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 735 &net2272_bfin_device, 736 #endif 737 738 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 739 &bfin_spi0_device, 740 #endif 741 742 - #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 743 #ifdef CONFIG_SERIAL_BFIN_UART0 744 &bfin_uart0_device, 745 #endif 746 #endif 747 748 - #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 749 #ifdef CONFIG_BFIN_SIR0 750 &bfin_sir0_device, 751 #endif 752 #endif 753 754 - #if defined(CONFIG_SERIAL_BFIN_SPORT) || \ 755 - defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 756 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 757 &bfin_sport0_uart_device, 758 #endif ··· 760 #endif 761 #endif 762 763 - #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 764 &bfin_device_gpiokeys, 765 #endif 766 767 - #if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE) 768 &i2c_gpio_device, 769 #endif 770 771 - #if defined(CONFIG_MTD_BFIN_ASYNC) || defined(CONFIG_MTD_BFIN_ASYNC_MODULE) 772 &stamp_flash_device, 773 #endif 774 775 - #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 776 &bfin_i2s_pcm, 777 #endif 778 779 - #if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) 780 &bfin_ac97_pcm, 781 #endif 782 783 - #if defined(CONFIG_SND_BF5XX_SOC_AD1836) || \ 784 - defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE) 785 &bfin_ad1836_machine, 786 #endif 787 788 - #if defined(CONFIG_SND_BF5XX_SOC_AD73311) || \ 789 - defined(CONFIG_SND_BF5XX_SOC_AD73311_MODULE) 790 &bfin_ad73311_machine, 791 #endif 792 793 - #if defined(CONFIG_SND_SOC_AD73311) || defined(CONFIG_SND_SOC_AD73311_MODULE) 794 &bfin_ad73311_codec_device, 795 #endif 796 797 - #if defined(CONFIG_SND_SOC_AD74111) || defined(CONFIG_SND_SOC_AD74111_MODULE) 798 &bfin_ad74111_codec_device, 799 #endif 800 801 - #if defined(CONFIG_SND_BF5XX_SOC_I2S) || \ 802 - defined(CONFIG_SND_BF5XX_SOC_I2S_MODULE) 803 &bfin_i2s, 804 #endif 805 806 - #if defined(CONFIG_SND_BF5XX_SOC_AC97) || \ 807 - defined(CONFIG_SND_BF5XX_SOC_AC97_MODULE) 808 &bfin_ac97, 809 #endif 810 }; 811 812 static int __init net2272_init(void) 813 { 814 - #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 815 int ret; 816 817 /* Set PF0 to 0, PF1 to 1 make /AMS3 work properly */ ··· 853 if (ret < 0) 854 return ret; 855 856 - #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 857 /* 858 * setup BF533_STAMP CPLD to route AMS3 to Ethernet MAC. 859 * the bfin-async-map driver takes care of flipping between
··· 14 #include <linux/spi/spi.h> 15 #include <linux/spi/flash.h> 16 #include <linux/spi/mmc_spi.h> 17 + #if IS_ENABLED(CONFIG_USB_ISP1362_HCD) 18 #include <linux/usb/isp1362.h> 19 #endif 20 #include <linux/irq.h> ··· 30 */ 31 const char bfin_board_name[] = "ADI BF533-STAMP"; 32 33 + #if IS_ENABLED(CONFIG_RTC_DRV_BFIN) 34 static struct platform_device rtc_device = { 35 .name = "rtc-bfin", 36 .id = -1, ··· 40 /* 41 * Driver needs to know address, irq and flag pin. 42 */ 43 + #if IS_ENABLED(CONFIG_SMC91X) 44 #include <linux/smc91x.h> 45 46 static struct smc91x_platdata smc91x_info = { ··· 73 }; 74 #endif 75 76 + #if IS_ENABLED(CONFIG_USB_NET2272) 77 static struct resource net2272_bfin_resources[] = { 78 { 79 .start = 0x20300000, ··· 97 }; 98 #endif 99 100 + #if IS_ENABLED(CONFIG_MTD_BFIN_ASYNC) 101 static struct mtd_partition stamp_partitions[] = { 102 { 103 .name = "bootloader(nor)", ··· 147 }; 148 #endif 149 150 + #if IS_ENABLED(CONFIG_MTD_M25P80) 151 static struct mtd_partition bfin_spi_flash_partitions[] = { 152 { 153 .name = "bootloader(spi)", ··· 178 }; 179 #endif 180 181 + #if IS_ENABLED(CONFIG_MMC_SPI) 182 #define MMC_SPI_CARD_DETECT_INT IRQ_PF5 183 static int bfin_mmc_spi_init(struct device *dev, 184 irqreturn_t (*detect_int)(int, void *), void *data) ··· 206 #endif 207 208 static struct spi_board_info bfin_spi_board_info[] __initdata = { 209 + #if IS_ENABLED(CONFIG_MTD_M25P80) 210 { 211 /* the modalias must be the same as spi device driver name */ 212 .modalias = "m25p80", /* Name of spi_driver for this device */ ··· 219 }, 220 #endif 221 222 + #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD1836) 223 { 224 .modalias = "ad1836", 225 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 231 }, 232 #endif 233 234 + #if IS_ENABLED(CONFIG_SPI_SPIDEV) 235 { 236 .modalias = "spidev", 237 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 239 .chip_select = 1, 240 }, 241 #endif 242 + #if IS_ENABLED(CONFIG_MMC_SPI) 243 { 244 .modalias = "mmc_spi", 245 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ ··· 252 #endif 253 }; 254 255 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 256 /* SPI (0) */ 257 static struct resource bfin_spi0_resource[] = { 258 [0] = { ··· 290 }; 291 #endif /* spi master and devices */ 292 293 + #if IS_ENABLED(CONFIG_SERIAL_BFIN) 294 #ifdef CONFIG_SERIAL_BFIN_UART0 295 static struct resource bfin_uart0_resources[] = { 296 { ··· 341 #endif 342 #endif 343 344 + #if IS_ENABLED(CONFIG_BFIN_SIR) 345 #ifdef CONFIG_BFIN_SIR0 346 static struct resource bfin_sir0_resources[] = { 347 { ··· 370 #endif 371 #endif 372 373 + #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT) 374 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 375 static struct resource bfin_sport0_uart_resources[] = { 376 { ··· 442 #endif 443 #endif 444 445 + #if IS_ENABLED(CONFIG_BFIN_SPORT) 446 static struct resource bfin_sport0_resources[] = { 447 { 448 .start = SPORT0_TCR1, ··· 486 }; 487 #endif 488 489 + #if IS_ENABLED(CONFIG_KEYBOARD_GPIO) 490 #include <linux/input.h> 491 #include <linux/gpio_keys.h> 492 ··· 509 }; 510 #endif 511 512 + #if IS_ENABLED(CONFIG_I2C_GPIO) 513 #include <linux/i2c-gpio.h> 514 515 static struct i2c_gpio_platform_data i2c_gpio_data = { ··· 530 #endif 531 532 static struct i2c_board_info __initdata bfin_i2c_board_info[] = { 533 + #if IS_ENABLED(CONFIG_JOYSTICK_AD7142) 534 { 535 I2C_BOARD_INFO("ad7142_joystick", 0x2C), 536 .irq = 39, 537 }, 538 #endif 539 + #if IS_ENABLED(CONFIG_BFIN_TWI_LCD) 540 { 541 I2C_BOARD_INFO("pcf8574_lcd", 0x22), 542 }, 543 #endif 544 + #if IS_ENABLED(CONFIG_INPUT_PCF8574) 545 { 546 I2C_BOARD_INFO("pcf8574_keypad", 0x27), 547 .irq = 39, 548 }, 549 #endif 550 + #if IS_ENABLED(CONFIG_FB_BFIN_7393) 551 { 552 I2C_BOARD_INFO("bfin-adv7393", 0x2B), 553 }, 554 #endif 555 + #if IS_ENABLED(CONFIG_BFIN_TWI_LCD) 556 { 557 I2C_BOARD_INFO("ad5252", 0x2f), 558 }, ··· 586 }, 587 }; 588 589 + #if IS_ENABLED(CONFIG_SND_BF5XX_I2S) || \ 590 + IS_ENABLED(CONFIG_SND_BF5XX_AC97) 591 592 #include <asm/bfin_sport.h> 593 ··· 640 }; 641 #endif 642 643 + #if IS_ENABLED(CONFIG_SND_BF5XX_I2S) 644 static struct platform_device bfin_i2s_pcm = { 645 .name = "bfin-i2s-pcm-audio", 646 .id = -1, 647 }; 648 #endif 649 650 + #if IS_ENABLED(CONFIG_SND_BF5XX_AC97) 651 static struct platform_device bfin_ac97_pcm = { 652 .name = "bfin-ac97-pcm-audio", 653 .id = -1, 654 }; 655 #endif 656 657 + #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD1836) 658 static const char * const ad1836_link[] = { 659 "bfin-i2s.0", 660 "spi0.4", ··· 669 }; 670 #endif 671 672 + #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD73311) 673 static const unsigned ad73311_gpio[] = { 674 GPIO_PF4, 675 }; ··· 684 }; 685 #endif 686 687 + #if IS_ENABLED(CONFIG_SND_SOC_AD73311) 688 static struct platform_device bfin_ad73311_codec_device = { 689 .name = "ad73311", 690 .id = -1, 691 }; 692 #endif 693 694 + #if IS_ENABLED(CONFIG_SND_SOC_AD74111) 695 static struct platform_device bfin_ad74111_codec_device = { 696 .name = "ad74111", 697 .id = -1, 698 }; 699 #endif 700 701 + #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_I2S) 702 static struct platform_device bfin_i2s = { 703 .name = "bfin-i2s", 704 .id = CONFIG_SND_BF5XX_SPORT_NUM, ··· 712 }; 713 #endif 714 715 + #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AC97) 716 static struct platform_device bfin_ac97 = { 717 .name = "bfin-ac97", 718 .id = CONFIG_SND_BF5XX_SPORT_NUM, ··· 730 731 &bfin_dpmc, 732 733 + #if IS_ENABLED(CONFIG_RTC_DRV_BFIN) 734 &rtc_device, 735 #endif 736 737 + #if IS_ENABLED(CONFIG_SMC91X) 738 &smc91x_device, 739 #endif 740 741 + #if IS_ENABLED(CONFIG_USB_NET2272) 742 &net2272_bfin_device, 743 #endif 744 745 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 746 &bfin_spi0_device, 747 #endif 748 749 + #if IS_ENABLED(CONFIG_SERIAL_BFIN) 750 #ifdef CONFIG_SERIAL_BFIN_UART0 751 &bfin_uart0_device, 752 #endif 753 #endif 754 755 + #if IS_ENABLED(CONFIG_BFIN_SIR) 756 #ifdef CONFIG_BFIN_SIR0 757 &bfin_sir0_device, 758 #endif 759 #endif 760 761 + #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT) 762 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 763 &bfin_sport0_uart_device, 764 #endif ··· 768 #endif 769 #endif 770 771 + #if IS_ENABLED(CONFIG_KEYBOARD_GPIO) 772 &bfin_device_gpiokeys, 773 #endif 774 775 + #if IS_ENABLED(CONFIG_I2C_GPIO) 776 &i2c_gpio_device, 777 #endif 778 779 + #if IS_ENABLED(CONFIG_MTD_BFIN_ASYNC) 780 &stamp_flash_device, 781 #endif 782 783 + #if IS_ENABLED(CONFIG_SND_BF5XX_I2S) 784 &bfin_i2s_pcm, 785 #endif 786 787 + #if IS_ENABLED(CONFIG_SND_BF5XX_AC97) 788 &bfin_ac97_pcm, 789 #endif 790 791 + #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD1836) 792 &bfin_ad1836_machine, 793 #endif 794 795 + #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD73311) 796 &bfin_ad73311_machine, 797 #endif 798 799 + #if IS_ENABLED(CONFIG_SND_SOC_AD73311) 800 &bfin_ad73311_codec_device, 801 #endif 802 803 + #if IS_ENABLED(CONFIG_SND_SOC_AD74111) 804 &bfin_ad74111_codec_device, 805 #endif 806 807 + #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_I2S) 808 &bfin_i2s, 809 #endif 810 811 + #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AC97) 812 &bfin_ac97, 813 #endif 814 }; 815 816 static int __init net2272_init(void) 817 { 818 + #if IS_ENABLED(CONFIG_USB_NET2272) 819 int ret; 820 821 /* Set PF0 to 0, PF1 to 1 make /AMS3 work properly */ ··· 865 if (ret < 0) 866 return ret; 867 868 + #if IS_ENABLED(CONFIG_SMC91X) 869 /* 870 * setup BF533_STAMP CPLD to route AMS3 to Ethernet MAC. 871 * the bfin-async-map driver takes care of flipping between
+41 -41
arch/blackfin/mach-bf537/boards/cm_bf537e.c
··· 16 #include <linux/mtd/physmap.h> 17 #include <linux/spi/spi.h> 18 #include <linux/spi/flash.h> 19 - #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 20 #include <linux/usb/isp1362.h> 21 #endif 22 #include <linux/ata_platform.h> ··· 32 */ 33 const char bfin_board_name[] = "Bluetechnix CM BF537E"; 34 35 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 36 /* all SPI peripherals info goes here */ 37 38 - #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) 39 static struct mtd_partition bfin_spi_flash_partitions[] = { 40 { 41 .name = "bootloader(spi)", ··· 66 }; 67 #endif 68 69 - #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 70 static struct bfin5xx_spi_chip mmc_spi_chip_info = { 71 .enable_dma = 0, 72 }; 73 #endif 74 75 static struct spi_board_info bfin_spi_board_info[] __initdata = { 76 - #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) 77 { 78 /* the modalias must be the same as spi device driver name */ 79 .modalias = "m25p80", /* Name of spi_driver for this device */ ··· 86 }, 87 #endif 88 89 - #if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) 90 { 91 .modalias = "ad183x", 92 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 95 }, 96 #endif 97 98 - #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 99 { 100 .modalias = "mmc_spi", 101 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ ··· 144 }; 145 #endif /* spi master and devices */ 146 147 - #if defined(CONFIG_SPI_BFIN_SPORT) || defined(CONFIG_SPI_BFIN_SPORT_MODULE) 148 149 /* SPORT SPI controller data */ 150 static struct bfin5xx_spi_master bfin_sport_spi0_info = { ··· 209 210 #endif /* sport spi master and devices */ 211 212 - #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 213 static struct platform_device rtc_device = { 214 .name = "rtc-bfin", 215 .id = -1, 216 }; 217 #endif 218 219 - #if defined(CONFIG_FB_HITACHI_TX09) || defined(CONFIG_FB_HITACHI_TX09_MODULE) 220 static struct platform_device hitachi_fb_device = { 221 .name = "hitachi-tx09", 222 }; 223 #endif 224 225 - #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 226 #include <linux/smc91x.h> 227 228 static struct smc91x_platdata smc91x_info = { ··· 254 }; 255 #endif 256 257 - #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 258 static struct resource isp1362_hcd_resources[] = { 259 { 260 .start = 0x20308000, ··· 293 }; 294 #endif 295 296 - #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 297 static struct resource net2272_bfin_resources[] = { 298 { 299 .start = 0x20300000, ··· 314 }; 315 #endif 316 317 - #if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE) 318 static struct mtd_partition cm_partitions[] = { 319 { 320 .name = "bootloader(nor)", ··· 363 }; 364 #endif 365 366 - #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 367 #ifdef CONFIG_SERIAL_BFIN_UART0 368 static struct resource bfin_uart0_resources[] = { 369 { ··· 498 #endif 499 #endif 500 501 - #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 502 #ifdef CONFIG_BFIN_SIR0 503 static struct resource bfin_sir0_resources[] = { 504 { ··· 551 #endif 552 #endif 553 554 - #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 555 static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; 556 557 static struct resource bfin_twi0_resource[] = { ··· 578 }; 579 #endif 580 581 - #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) \ 582 - || defined(CONFIG_BFIN_SPORT) || defined(CONFIG_BFIN_SPORT_MODULE) 583 unsigned short bfin_sport0_peripherals[] = { 584 P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS, 585 P_SPORT0_DRPRI, P_SPORT0_RSCLK, P_SPORT0_DRSEC, P_SPORT0_DTSEC, 0 586 }; 587 #endif 588 - #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 589 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 590 static struct resource bfin_sport0_uart_resources[] = { 591 { ··· 650 }; 651 #endif 652 #endif 653 - #if defined(CONFIG_BFIN_SPORT) || defined(CONFIG_BFIN_SPORT_MODULE) 654 static struct resource bfin_sport0_resources[] = { 655 { 656 .start = SPORT0_TCR1, ··· 694 }; 695 #endif 696 697 - #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 698 #include <linux/bfin_mac.h> 699 static const unsigned short bfin_mac_peripherals[] = P_MII0; 700 ··· 727 }; 728 #endif 729 730 - #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 731 #define PATA_INT IRQ_PF14 732 733 static struct pata_platform_info bfin_pata_platform_data = { ··· 795 796 &bfin_dpmc, 797 798 - #if defined(CONFIG_BFIN_SPORT) || defined(CONFIG_BFIN_SPORT_MODULE) 799 &bfin_sport0_device, 800 #endif 801 802 - #if defined(CONFIG_FB_HITACHI_TX09) || defined(CONFIG_FB_HITACHI_TX09_MODULE) 803 &hitachi_fb_device, 804 #endif 805 806 - #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 807 &rtc_device, 808 #endif 809 810 - #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 811 #ifdef CONFIG_SERIAL_BFIN_UART0 812 &bfin_uart0_device, 813 #endif ··· 816 #endif 817 #endif 818 819 - #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 820 #ifdef CONFIG_BFIN_SIR0 821 &bfin_sir0_device, 822 #endif ··· 825 #endif 826 #endif 827 828 - #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 829 &i2c_bfin_twi_device, 830 #endif 831 832 - #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 833 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 834 &bfin_sport0_uart_device, 835 #endif ··· 838 #endif 839 #endif 840 841 - #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 842 &isp1362_hcd_device, 843 #endif 844 845 - #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 846 &smc91x_device, 847 #endif 848 849 - #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 850 &bfin_mii_bus, 851 &bfin_mac_device, 852 #endif 853 854 - #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 855 &net2272_bfin_device, 856 #endif 857 858 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 859 &bfin_spi0_device, 860 #endif 861 862 - #if defined(CONFIG_SPI_BFIN_SPORT) || defined(CONFIG_SPI_BFIN_SPORT_MODULE) 863 &bfin_sport_spi0_device, 864 &bfin_sport_spi1_device, 865 #endif 866 867 - #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 868 &bfin_pata_device, 869 #endif 870 871 - #if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE) 872 &cm_flash_device, 873 #endif 874 }; 875 876 static int __init net2272_init(void) 877 { 878 - #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 879 int ret; 880 881 ret = gpio_request(GPIO_PG14, "net2272"); ··· 895 { 896 printk(KERN_INFO "%s(): registering device resources\n", __func__); 897 platform_add_devices(cm_bf537e_devices, ARRAY_SIZE(cm_bf537e_devices)); 898 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 899 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 900 #endif 901 902 - #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 903 irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN); 904 #endif 905
··· 16 #include <linux/mtd/physmap.h> 17 #include <linux/spi/spi.h> 18 #include <linux/spi/flash.h> 19 + #if IS_ENABLED(CONFIG_USB_ISP1362_HCD) 20 #include <linux/usb/isp1362.h> 21 #endif 22 #include <linux/ata_platform.h> ··· 32 */ 33 const char bfin_board_name[] = "Bluetechnix CM BF537E"; 34 35 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 36 /* all SPI peripherals info goes here */ 37 38 + #if IS_ENABLED(CONFIG_MTD_M25P80) 39 static struct mtd_partition bfin_spi_flash_partitions[] = { 40 { 41 .name = "bootloader(spi)", ··· 66 }; 67 #endif 68 69 + #if IS_ENABLED(CONFIG_MMC_SPI) 70 static struct bfin5xx_spi_chip mmc_spi_chip_info = { 71 .enable_dma = 0, 72 }; 73 #endif 74 75 static struct spi_board_info bfin_spi_board_info[] __initdata = { 76 + #if IS_ENABLED(CONFIG_MTD_M25P80) 77 { 78 /* the modalias must be the same as spi device driver name */ 79 .modalias = "m25p80", /* Name of spi_driver for this device */ ··· 86 }, 87 #endif 88 89 + #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD183X) 90 { 91 .modalias = "ad183x", 92 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 95 }, 96 #endif 97 98 + #if IS_ENABLED(CONFIG_MMC_SPI) 99 { 100 .modalias = "mmc_spi", 101 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ ··· 144 }; 145 #endif /* spi master and devices */ 146 147 + #if IS_ENABLED(CONFIG_SPI_BFIN_SPORT) 148 149 /* SPORT SPI controller data */ 150 static struct bfin5xx_spi_master bfin_sport_spi0_info = { ··· 209 210 #endif /* sport spi master and devices */ 211 212 + #if IS_ENABLED(CONFIG_RTC_DRV_BFIN) 213 static struct platform_device rtc_device = { 214 .name = "rtc-bfin", 215 .id = -1, 216 }; 217 #endif 218 219 + #if IS_ENABLED(CONFIG_FB_HITACHI_TX09) 220 static struct platform_device hitachi_fb_device = { 221 .name = "hitachi-tx09", 222 }; 223 #endif 224 225 + #if IS_ENABLED(CONFIG_SMC91X) 226 #include <linux/smc91x.h> 227 228 static struct smc91x_platdata smc91x_info = { ··· 254 }; 255 #endif 256 257 + #if IS_ENABLED(CONFIG_USB_ISP1362_HCD) 258 static struct resource isp1362_hcd_resources[] = { 259 { 260 .start = 0x20308000, ··· 293 }; 294 #endif 295 296 + #if IS_ENABLED(CONFIG_USB_NET2272) 297 static struct resource net2272_bfin_resources[] = { 298 { 299 .start = 0x20300000, ··· 314 }; 315 #endif 316 317 + #if IS_ENABLED(CONFIG_MTD_GPIO_ADDR) 318 static struct mtd_partition cm_partitions[] = { 319 { 320 .name = "bootloader(nor)", ··· 363 }; 364 #endif 365 366 + #if IS_ENABLED(CONFIG_SERIAL_BFIN) 367 #ifdef CONFIG_SERIAL_BFIN_UART0 368 static struct resource bfin_uart0_resources[] = { 369 { ··· 498 #endif 499 #endif 500 501 + #if IS_ENABLED(CONFIG_BFIN_SIR) 502 #ifdef CONFIG_BFIN_SIR0 503 static struct resource bfin_sir0_resources[] = { 504 { ··· 551 #endif 552 #endif 553 554 + #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI) 555 static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; 556 557 static struct resource bfin_twi0_resource[] = { ··· 578 }; 579 #endif 580 581 + #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT) \ 582 + || IS_ENABLED(CONFIG_BFIN_SPORT) 583 unsigned short bfin_sport0_peripherals[] = { 584 P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS, 585 P_SPORT0_DRPRI, P_SPORT0_RSCLK, P_SPORT0_DRSEC, P_SPORT0_DTSEC, 0 586 }; 587 #endif 588 + #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT) 589 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 590 static struct resource bfin_sport0_uart_resources[] = { 591 { ··· 650 }; 651 #endif 652 #endif 653 + #if IS_ENABLED(CONFIG_BFIN_SPORT) 654 static struct resource bfin_sport0_resources[] = { 655 { 656 .start = SPORT0_TCR1, ··· 694 }; 695 #endif 696 697 + #if IS_ENABLED(CONFIG_BFIN_MAC) 698 #include <linux/bfin_mac.h> 699 static const unsigned short bfin_mac_peripherals[] = P_MII0; 700 ··· 727 }; 728 #endif 729 730 + #if IS_ENABLED(CONFIG_PATA_PLATFORM) 731 #define PATA_INT IRQ_PF14 732 733 static struct pata_platform_info bfin_pata_platform_data = { ··· 795 796 &bfin_dpmc, 797 798 + #if IS_ENABLED(CONFIG_BFIN_SPORT) 799 &bfin_sport0_device, 800 #endif 801 802 + #if IS_ENABLED(CONFIG_FB_HITACHI_TX09) 803 &hitachi_fb_device, 804 #endif 805 806 + #if IS_ENABLED(CONFIG_RTC_DRV_BFIN) 807 &rtc_device, 808 #endif 809 810 + #if IS_ENABLED(CONFIG_SERIAL_BFIN) 811 #ifdef CONFIG_SERIAL_BFIN_UART0 812 &bfin_uart0_device, 813 #endif ··· 816 #endif 817 #endif 818 819 + #if IS_ENABLED(CONFIG_BFIN_SIR) 820 #ifdef CONFIG_BFIN_SIR0 821 &bfin_sir0_device, 822 #endif ··· 825 #endif 826 #endif 827 828 + #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI) 829 &i2c_bfin_twi_device, 830 #endif 831 832 + #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT) 833 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 834 &bfin_sport0_uart_device, 835 #endif ··· 838 #endif 839 #endif 840 841 + #if IS_ENABLED(CONFIG_USB_ISP1362_HCD) 842 &isp1362_hcd_device, 843 #endif 844 845 + #if IS_ENABLED(CONFIG_SMC91X) 846 &smc91x_device, 847 #endif 848 849 + #if IS_ENABLED(CONFIG_BFIN_MAC) 850 &bfin_mii_bus, 851 &bfin_mac_device, 852 #endif 853 854 + #if IS_ENABLED(CONFIG_USB_NET2272) 855 &net2272_bfin_device, 856 #endif 857 858 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 859 &bfin_spi0_device, 860 #endif 861 862 + #if IS_ENABLED(CONFIG_SPI_BFIN_SPORT) 863 &bfin_sport_spi0_device, 864 &bfin_sport_spi1_device, 865 #endif 866 867 + #if IS_ENABLED(CONFIG_PATA_PLATFORM) 868 &bfin_pata_device, 869 #endif 870 871 + #if IS_ENABLED(CONFIG_MTD_GPIO_ADDR) 872 &cm_flash_device, 873 #endif 874 }; 875 876 static int __init net2272_init(void) 877 { 878 + #if IS_ENABLED(CONFIG_USB_NET2272) 879 int ret; 880 881 ret = gpio_request(GPIO_PG14, "net2272"); ··· 895 { 896 printk(KERN_INFO "%s(): registering device resources\n", __func__); 897 platform_add_devices(cm_bf537e_devices, ARRAY_SIZE(cm_bf537e_devices)); 898 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 899 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 900 #endif 901 902 + #if IS_ENABLED(CONFIG_PATA_PLATFORM) 903 irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN); 904 #endif 905
+35 -35
arch/blackfin/mach-bf537/boards/cm_bf537u.c
··· 16 #include <linux/mtd/physmap.h> 17 #include <linux/spi/spi.h> 18 #include <linux/spi/flash.h> 19 - #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 20 #include <linux/usb/isp1362.h> 21 #endif 22 #include <linux/ata_platform.h> ··· 32 */ 33 const char bfin_board_name[] = "Bluetechnix CM BF537U"; 34 35 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 36 /* all SPI peripherals info goes here */ 37 38 - #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) 39 static struct mtd_partition bfin_spi_flash_partitions[] = { 40 { 41 .name = "bootloader(spi)", ··· 66 }; 67 #endif 68 69 - #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 70 static struct bfin5xx_spi_chip mmc_spi_chip_info = { 71 .enable_dma = 0, 72 }; 73 #endif 74 75 static struct spi_board_info bfin_spi_board_info[] __initdata = { 76 - #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) 77 { 78 /* the modalias must be the same as spi device driver name */ 79 .modalias = "m25p80", /* Name of spi_driver for this device */ ··· 86 }, 87 #endif 88 89 - #if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) 90 { 91 .modalias = "ad183x", 92 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 95 }, 96 #endif 97 98 - #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 99 { 100 .modalias = "mmc_spi", 101 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ ··· 144 }; 145 #endif /* spi master and devices */ 146 147 - #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 148 static struct platform_device rtc_device = { 149 .name = "rtc-bfin", 150 .id = -1, 151 }; 152 #endif 153 154 - #if defined(CONFIG_FB_HITACHI_TX09) || defined(CONFIG_FB_HITACHI_TX09_MODULE) 155 static struct platform_device hitachi_fb_device = { 156 .name = "hitachi-tx09", 157 }; 158 #endif 159 160 - #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 161 #include <linux/smc91x.h> 162 163 static struct smc91x_platdata smc91x_info = { ··· 189 }; 190 #endif 191 192 - #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 193 static struct resource isp1362_hcd_resources[] = { 194 { 195 .start = 0x20308000, ··· 228 }; 229 #endif 230 231 - #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 232 static struct resource net2272_bfin_resources[] = { 233 { 234 .start = 0x20200000, ··· 249 }; 250 #endif 251 252 - #if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE) 253 static struct mtd_partition cm_partitions[] = { 254 { 255 .name = "bootloader(nor)", ··· 298 }; 299 #endif 300 301 - #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 302 #ifdef CONFIG_SERIAL_BFIN_UART0 303 static struct resource bfin_uart0_resources[] = { 304 { ··· 397 #endif 398 #endif 399 400 - #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 401 #ifdef CONFIG_BFIN_SIR0 402 static struct resource bfin_sir0_resources[] = { 403 { ··· 450 #endif 451 #endif 452 453 - #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 454 static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; 455 456 static struct resource bfin_twi0_resource[] = { ··· 477 }; 478 #endif 479 480 - #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 481 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 482 static struct resource bfin_sport0_uart_resources[] = { 483 { ··· 548 #endif 549 #endif 550 551 - #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 552 #include <linux/bfin_mac.h> 553 static const unsigned short bfin_mac_peripherals[] = P_MII0; 554 ··· 581 }; 582 #endif 583 584 - #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 585 #define PATA_INT IRQ_PF14 586 587 static struct pata_platform_info bfin_pata_platform_data = { ··· 649 650 &bfin_dpmc, 651 652 - #if defined(CONFIG_FB_HITACHI_TX09) || defined(CONFIG_FB_HITACHI_TX09_MODULE) 653 &hitachi_fb_device, 654 #endif 655 656 - #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 657 &rtc_device, 658 #endif 659 660 - #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 661 #ifdef CONFIG_SERIAL_BFIN_UART0 662 &bfin_uart0_device, 663 #endif ··· 666 #endif 667 #endif 668 669 - #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 670 #ifdef CONFIG_BFIN_SIR0 671 &bfin_sir0_device, 672 #endif ··· 675 #endif 676 #endif 677 678 - #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 679 &i2c_bfin_twi_device, 680 #endif 681 682 - #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 683 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 684 &bfin_sport0_uart_device, 685 #endif ··· 688 #endif 689 #endif 690 691 - #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 692 &isp1362_hcd_device, 693 #endif 694 695 - #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 696 &smc91x_device, 697 #endif 698 699 - #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 700 &bfin_mii_bus, 701 &bfin_mac_device, 702 #endif 703 704 - #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 705 &net2272_bfin_device, 706 #endif 707 708 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 709 &bfin_spi0_device, 710 #endif 711 712 - #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 713 &bfin_pata_device, 714 #endif 715 716 - #if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE) 717 &cm_flash_device, 718 #endif 719 }; 720 721 static int __init net2272_init(void) 722 { 723 - #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 724 int ret; 725 726 ret = gpio_request(GPIO_PH15, driver_name); ··· 752 { 753 printk(KERN_INFO "%s(): registering device resources\n", __func__); 754 platform_add_devices(cm_bf537u_devices, ARRAY_SIZE(cm_bf537u_devices)); 755 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 756 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 757 #endif 758 759 - #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 760 irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN); 761 #endif 762
··· 16 #include <linux/mtd/physmap.h> 17 #include <linux/spi/spi.h> 18 #include <linux/spi/flash.h> 19 + #if IS_ENABLED(CONFIG_USB_ISP1362_HCD) 20 #include <linux/usb/isp1362.h> 21 #endif 22 #include <linux/ata_platform.h> ··· 32 */ 33 const char bfin_board_name[] = "Bluetechnix CM BF537U"; 34 35 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 36 /* all SPI peripherals info goes here */ 37 38 + #if IS_ENABLED(CONFIG_MTD_M25P80) 39 static struct mtd_partition bfin_spi_flash_partitions[] = { 40 { 41 .name = "bootloader(spi)", ··· 66 }; 67 #endif 68 69 + #if IS_ENABLED(CONFIG_MMC_SPI) 70 static struct bfin5xx_spi_chip mmc_spi_chip_info = { 71 .enable_dma = 0, 72 }; 73 #endif 74 75 static struct spi_board_info bfin_spi_board_info[] __initdata = { 76 + #if IS_ENABLED(CONFIG_MTD_M25P80) 77 { 78 /* the modalias must be the same as spi device driver name */ 79 .modalias = "m25p80", /* Name of spi_driver for this device */ ··· 86 }, 87 #endif 88 89 + #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD183X) 90 { 91 .modalias = "ad183x", 92 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 95 }, 96 #endif 97 98 + #if IS_ENABLED(CONFIG_MMC_SPI) 99 { 100 .modalias = "mmc_spi", 101 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ ··· 144 }; 145 #endif /* spi master and devices */ 146 147 + #if IS_ENABLED(CONFIG_RTC_DRV_BFIN) 148 static struct platform_device rtc_device = { 149 .name = "rtc-bfin", 150 .id = -1, 151 }; 152 #endif 153 154 + #if IS_ENABLED(CONFIG_FB_HITACHI_TX09) 155 static struct platform_device hitachi_fb_device = { 156 .name = "hitachi-tx09", 157 }; 158 #endif 159 160 + #if IS_ENABLED(CONFIG_SMC91X) 161 #include <linux/smc91x.h> 162 163 static struct smc91x_platdata smc91x_info = { ··· 189 }; 190 #endif 191 192 + #if IS_ENABLED(CONFIG_USB_ISP1362_HCD) 193 static struct resource isp1362_hcd_resources[] = { 194 { 195 .start = 0x20308000, ··· 228 }; 229 #endif 230 231 + #if IS_ENABLED(CONFIG_USB_NET2272) 232 static struct resource net2272_bfin_resources[] = { 233 { 234 .start = 0x20200000, ··· 249 }; 250 #endif 251 252 + #if IS_ENABLED(CONFIG_MTD_GPIO_ADDR) 253 static struct mtd_partition cm_partitions[] = { 254 { 255 .name = "bootloader(nor)", ··· 298 }; 299 #endif 300 301 + #if IS_ENABLED(CONFIG_SERIAL_BFIN) 302 #ifdef CONFIG_SERIAL_BFIN_UART0 303 static struct resource bfin_uart0_resources[] = { 304 { ··· 397 #endif 398 #endif 399 400 + #if IS_ENABLED(CONFIG_BFIN_SIR) 401 #ifdef CONFIG_BFIN_SIR0 402 static struct resource bfin_sir0_resources[] = { 403 { ··· 450 #endif 451 #endif 452 453 + #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI) 454 static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; 455 456 static struct resource bfin_twi0_resource[] = { ··· 477 }; 478 #endif 479 480 + #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT) 481 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 482 static struct resource bfin_sport0_uart_resources[] = { 483 { ··· 548 #endif 549 #endif 550 551 + #if IS_ENABLED(CONFIG_BFIN_MAC) 552 #include <linux/bfin_mac.h> 553 static const unsigned short bfin_mac_peripherals[] = P_MII0; 554 ··· 581 }; 582 #endif 583 584 + #if IS_ENABLED(CONFIG_PATA_PLATFORM) 585 #define PATA_INT IRQ_PF14 586 587 static struct pata_platform_info bfin_pata_platform_data = { ··· 649 650 &bfin_dpmc, 651 652 + #if IS_ENABLED(CONFIG_FB_HITACHI_TX09) 653 &hitachi_fb_device, 654 #endif 655 656 + #if IS_ENABLED(CONFIG_RTC_DRV_BFIN) 657 &rtc_device, 658 #endif 659 660 + #if IS_ENABLED(CONFIG_SERIAL_BFIN) 661 #ifdef CONFIG_SERIAL_BFIN_UART0 662 &bfin_uart0_device, 663 #endif ··· 666 #endif 667 #endif 668 669 + #if IS_ENABLED(CONFIG_BFIN_SIR) 670 #ifdef CONFIG_BFIN_SIR0 671 &bfin_sir0_device, 672 #endif ··· 675 #endif 676 #endif 677 678 + #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI) 679 &i2c_bfin_twi_device, 680 #endif 681 682 + #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT) 683 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 684 &bfin_sport0_uart_device, 685 #endif ··· 688 #endif 689 #endif 690 691 + #if IS_ENABLED(CONFIG_USB_ISP1362_HCD) 692 &isp1362_hcd_device, 693 #endif 694 695 + #if IS_ENABLED(CONFIG_SMC91X) 696 &smc91x_device, 697 #endif 698 699 + #if IS_ENABLED(CONFIG_BFIN_MAC) 700 &bfin_mii_bus, 701 &bfin_mac_device, 702 #endif 703 704 + #if IS_ENABLED(CONFIG_USB_NET2272) 705 &net2272_bfin_device, 706 #endif 707 708 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 709 &bfin_spi0_device, 710 #endif 711 712 + #if IS_ENABLED(CONFIG_PATA_PLATFORM) 713 &bfin_pata_device, 714 #endif 715 716 + #if IS_ENABLED(CONFIG_MTD_GPIO_ADDR) 717 &cm_flash_device, 718 #endif 719 }; 720 721 static int __init net2272_init(void) 722 { 723 + #if IS_ENABLED(CONFIG_USB_NET2272) 724 int ret; 725 726 ret = gpio_request(GPIO_PH15, driver_name); ··· 752 { 753 printk(KERN_INFO "%s(): registering device resources\n", __func__); 754 platform_add_devices(cm_bf537u_devices, ARRAY_SIZE(cm_bf537u_devices)); 755 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 756 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 757 #endif 758 759 + #if IS_ENABLED(CONFIG_PATA_PLATFORM) 760 irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN); 761 #endif 762
+16 -16
arch/blackfin/mach-bf537/boards/dnp5370.c
··· 41 #define FLASH_MAC 0x202f0000 42 #define CONFIG_MTD_PHYSMAP_LEN 0x300000 43 44 - #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 45 static struct platform_device rtc_device = { 46 .name = "rtc-bfin", 47 .id = -1, 48 }; 49 #endif 50 51 - #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 52 #include <linux/bfin_mac.h> 53 static const unsigned short bfin_mac_peripherals[] = P_RMII0; 54 ··· 81 }; 82 #endif 83 84 - #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 85 static struct mtd_partition asmb_flash_partitions[] = { 86 { 87 .name = "bootloader(nor)", ··· 125 }; 126 #endif 127 128 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 129 130 - #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 131 132 static struct bfin5xx_spi_chip mmc_spi_chip_info = { 133 .enable_dma = 0, /* use no dma transfer with this chip*/ ··· 135 136 #endif 137 138 - #if defined(CONFIG_MTD_DATAFLASH) || defined(CONFIG_MTD_DATAFLASH_MODULE) 139 /* This mapping is for at45db642 it has 1056 page size, 140 * partition size and offset should be page aligned 141 */ ··· 166 167 static struct spi_board_info bfin_spi_board_info[] __initdata = { 168 /* SD/MMC card reader at SPI bus */ 169 - #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 170 { 171 .modalias = "mmc_spi", 172 .max_speed_hz = 20000000, ··· 178 #endif 179 180 /* 8 Megabyte Atmel NOR flash chip at SPI bus */ 181 - #if defined(CONFIG_MTD_DATAFLASH) || defined(CONFIG_MTD_DATAFLASH_MODULE) 182 { 183 .modalias = "mtd_dataflash", 184 .max_speed_hz = 16700000, ··· 228 }; 229 #endif 230 231 - #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 232 #ifdef CONFIG_SERIAL_BFIN_UART0 233 static struct resource bfin_uart0_resources[] = { 234 { ··· 328 #endif 329 #endif 330 331 - #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 332 static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; 333 334 static struct resource bfin_twi0_resource[] = { ··· 357 358 static struct platform_device *dnp5370_devices[] __initdata = { 359 360 - #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 361 #ifdef CONFIG_SERIAL_BFIN_UART0 362 &bfin_uart0_device, 363 #endif ··· 366 #endif 367 #endif 368 369 - #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 370 &asmb_flash_device, 371 #endif 372 373 - #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 374 &bfin_mii_bus, 375 &bfin_mac_device, 376 #endif 377 378 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 379 &spi_bfin_master_device, 380 #endif 381 382 - #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 383 &i2c_bfin_twi_device, 384 #endif 385 386 - #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 387 &rtc_device, 388 #endif 389
··· 41 #define FLASH_MAC 0x202f0000 42 #define CONFIG_MTD_PHYSMAP_LEN 0x300000 43 44 + #if IS_ENABLED(CONFIG_RTC_DRV_BFIN) 45 static struct platform_device rtc_device = { 46 .name = "rtc-bfin", 47 .id = -1, 48 }; 49 #endif 50 51 + #if IS_ENABLED(CONFIG_BFIN_MAC) 52 #include <linux/bfin_mac.h> 53 static const unsigned short bfin_mac_peripherals[] = P_RMII0; 54 ··· 81 }; 82 #endif 83 84 + #if IS_ENABLED(CONFIG_MTD_PHYSMAP) 85 static struct mtd_partition asmb_flash_partitions[] = { 86 { 87 .name = "bootloader(nor)", ··· 125 }; 126 #endif 127 128 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 129 130 + #if IS_ENABLED(CONFIG_MMC_SPI) 131 132 static struct bfin5xx_spi_chip mmc_spi_chip_info = { 133 .enable_dma = 0, /* use no dma transfer with this chip*/ ··· 135 136 #endif 137 138 + #if IS_ENABLED(CONFIG_MTD_DATAFLASH) 139 /* This mapping is for at45db642 it has 1056 page size, 140 * partition size and offset should be page aligned 141 */ ··· 166 167 static struct spi_board_info bfin_spi_board_info[] __initdata = { 168 /* SD/MMC card reader at SPI bus */ 169 + #if IS_ENABLED(CONFIG_MMC_SPI) 170 { 171 .modalias = "mmc_spi", 172 .max_speed_hz = 20000000, ··· 178 #endif 179 180 /* 8 Megabyte Atmel NOR flash chip at SPI bus */ 181 + #if IS_ENABLED(CONFIG_MTD_DATAFLASH) 182 { 183 .modalias = "mtd_dataflash", 184 .max_speed_hz = 16700000, ··· 228 }; 229 #endif 230 231 + #if IS_ENABLED(CONFIG_SERIAL_BFIN) 232 #ifdef CONFIG_SERIAL_BFIN_UART0 233 static struct resource bfin_uart0_resources[] = { 234 { ··· 328 #endif 329 #endif 330 331 + #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI) 332 static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; 333 334 static struct resource bfin_twi0_resource[] = { ··· 357 358 static struct platform_device *dnp5370_devices[] __initdata = { 359 360 + #if IS_ENABLED(CONFIG_SERIAL_BFIN) 361 #ifdef CONFIG_SERIAL_BFIN_UART0 362 &bfin_uart0_device, 363 #endif ··· 366 #endif 367 #endif 368 369 + #if IS_ENABLED(CONFIG_MTD_PHYSMAP) 370 &asmb_flash_device, 371 #endif 372 373 + #if IS_ENABLED(CONFIG_BFIN_MAC) 374 &bfin_mii_bus, 375 &bfin_mac_device, 376 #endif 377 378 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 379 &spi_bfin_master_device, 380 #endif 381 382 + #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI) 383 &i2c_bfin_twi_device, 384 #endif 385 386 + #if IS_ENABLED(CONFIG_RTC_DRV_BFIN) 387 &rtc_device, 388 #endif 389
+24 -26
arch/blackfin/mach-bf537/boards/minotaur.c
··· 13 #include <linux/mtd/partitions.h> 14 #include <linux/spi/spi.h> 15 #include <linux/spi/flash.h> 16 - #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 17 #include <linux/usb/isp1362.h> 18 #endif 19 #include <linux/ata_platform.h> ··· 31 */ 32 const char bfin_board_name[] = "CamSig Minotaur BF537"; 33 34 - #if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) 35 static struct resource bfin_pcmcia_cf_resources[] = { 36 { 37 .start = 0x20310000, /* IO PORT */ ··· 60 }; 61 #endif 62 63 - #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 64 static struct platform_device rtc_device = { 65 .name = "rtc-bfin", 66 .id = -1, 67 }; 68 #endif 69 70 - #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 71 #include <linux/bfin_mac.h> 72 static const unsigned short bfin_mac_peripherals[] = P_MII0; 73 ··· 100 }; 101 #endif 102 103 - #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 104 static struct resource net2272_bfin_resources[] = { 105 { 106 .start = 0x20300000, ··· 121 }; 122 #endif 123 124 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 125 /* all SPI peripherals info goes here */ 126 127 - #if defined(CONFIG_MTD_M25P80) \ 128 - || defined(CONFIG_MTD_M25P80_MODULE) 129 130 /* Partition sizes */ 131 #define FLASH_SIZE 0x00400000 ··· 161 }; 162 #endif 163 164 - #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 165 static struct bfin5xx_spi_chip mmc_spi_chip_info = { 166 .enable_dma = 0, 167 }; 168 #endif 169 170 static struct spi_board_info bfin_spi_board_info[] __initdata = { 171 - #if defined(CONFIG_MTD_M25P80) \ 172 - || defined(CONFIG_MTD_M25P80_MODULE) 173 { 174 /* the modalias must be the same as spi device driver name */ 175 .modalias = "m25p80", /* Name of spi_driver for this device */ ··· 181 }, 182 #endif 183 184 - #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 185 { 186 .modalias = "mmc_spi", 187 .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */ ··· 229 }; 230 #endif /* spi master and devices */ 231 232 - #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 233 #ifdef CONFIG_SERIAL_BFIN_UART0 234 static struct resource bfin_uart0_resources[] = { 235 { ··· 328 #endif 329 #endif 330 331 - #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 332 #ifdef CONFIG_BFIN_SIR0 333 static struct resource bfin_sir0_resources[] = { 334 { ··· 383 #endif 384 #endif 385 386 - #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 387 static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; 388 389 static struct resource bfin_twi0_resource[] = { ··· 410 }; 411 #endif 412 413 - #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 414 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 415 static struct resource bfin_sport0_uart_resources[] = { 416 { ··· 482 #endif 483 484 static struct platform_device *minotaur_devices[] __initdata = { 485 - #if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) 486 &bfin_pcmcia_cf_device, 487 #endif 488 489 - #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 490 &rtc_device, 491 #endif 492 493 - #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 494 &bfin_mii_bus, 495 &bfin_mac_device, 496 #endif 497 498 - #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 499 &net2272_bfin_device, 500 #endif 501 502 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 503 &bfin_spi0_device, 504 #endif 505 506 - #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 507 #ifdef CONFIG_SERIAL_BFIN_UART0 508 &bfin_uart0_device, 509 #endif ··· 512 #endif 513 #endif 514 515 - #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 516 #ifdef CONFIG_BFIN_SIR0 517 &bfin_sir0_device, 518 #endif ··· 521 #endif 522 #endif 523 524 - #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 525 &i2c_bfin_twi_device, 526 #endif 527 528 - #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 529 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 530 &bfin_sport0_uart_device, 531 #endif ··· 540 { 541 printk(KERN_INFO "%s(): registering device resources\n", __func__); 542 platform_add_devices(minotaur_devices, ARRAY_SIZE(minotaur_devices)); 543 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 544 spi_register_board_info(bfin_spi_board_info, 545 ARRAY_SIZE(bfin_spi_board_info)); 546 #endif
··· 13 #include <linux/mtd/partitions.h> 14 #include <linux/spi/spi.h> 15 #include <linux/spi/flash.h> 16 + #if IS_ENABLED(CONFIG_USB_ISP1362_HCD) 17 #include <linux/usb/isp1362.h> 18 #endif 19 #include <linux/ata_platform.h> ··· 31 */ 32 const char bfin_board_name[] = "CamSig Minotaur BF537"; 33 34 + #if IS_ENABLED(CONFIG_BFIN_CFPCMCIA) 35 static struct resource bfin_pcmcia_cf_resources[] = { 36 { 37 .start = 0x20310000, /* IO PORT */ ··· 60 }; 61 #endif 62 63 + #if IS_ENABLED(CONFIG_RTC_DRV_BFIN) 64 static struct platform_device rtc_device = { 65 .name = "rtc-bfin", 66 .id = -1, 67 }; 68 #endif 69 70 + #if IS_ENABLED(CONFIG_BFIN_MAC) 71 #include <linux/bfin_mac.h> 72 static const unsigned short bfin_mac_peripherals[] = P_MII0; 73 ··· 100 }; 101 #endif 102 103 + #if IS_ENABLED(CONFIG_USB_NET2272) 104 static struct resource net2272_bfin_resources[] = { 105 { 106 .start = 0x20300000, ··· 121 }; 122 #endif 123 124 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 125 /* all SPI peripherals info goes here */ 126 127 + #if IS_ENABLED(CONFIG_MTD_M25P80) 128 129 /* Partition sizes */ 130 #define FLASH_SIZE 0x00400000 ··· 162 }; 163 #endif 164 165 + #if IS_ENABLED(CONFIG_MMC_SPI) 166 static struct bfin5xx_spi_chip mmc_spi_chip_info = { 167 .enable_dma = 0, 168 }; 169 #endif 170 171 static struct spi_board_info bfin_spi_board_info[] __initdata = { 172 + #if IS_ENABLED(CONFIG_MTD_M25P80) 173 { 174 /* the modalias must be the same as spi device driver name */ 175 .modalias = "m25p80", /* Name of spi_driver for this device */ ··· 183 }, 184 #endif 185 186 + #if IS_ENABLED(CONFIG_MMC_SPI) 187 { 188 .modalias = "mmc_spi", 189 .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */ ··· 231 }; 232 #endif /* spi master and devices */ 233 234 + #if IS_ENABLED(CONFIG_SERIAL_BFIN) 235 #ifdef CONFIG_SERIAL_BFIN_UART0 236 static struct resource bfin_uart0_resources[] = { 237 { ··· 330 #endif 331 #endif 332 333 + #if IS_ENABLED(CONFIG_BFIN_SIR) 334 #ifdef CONFIG_BFIN_SIR0 335 static struct resource bfin_sir0_resources[] = { 336 { ··· 385 #endif 386 #endif 387 388 + #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI) 389 static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; 390 391 static struct resource bfin_twi0_resource[] = { ··· 412 }; 413 #endif 414 415 + #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT) 416 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 417 static struct resource bfin_sport0_uart_resources[] = { 418 { ··· 484 #endif 485 486 static struct platform_device *minotaur_devices[] __initdata = { 487 + #if IS_ENABLED(CONFIG_BFIN_CFPCMCIA) 488 &bfin_pcmcia_cf_device, 489 #endif 490 491 + #if IS_ENABLED(CONFIG_RTC_DRV_BFIN) 492 &rtc_device, 493 #endif 494 495 + #if IS_ENABLED(CONFIG_BFIN_MAC) 496 &bfin_mii_bus, 497 &bfin_mac_device, 498 #endif 499 500 + #if IS_ENABLED(CONFIG_USB_NET2272) 501 &net2272_bfin_device, 502 #endif 503 504 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 505 &bfin_spi0_device, 506 #endif 507 508 + #if IS_ENABLED(CONFIG_SERIAL_BFIN) 509 #ifdef CONFIG_SERIAL_BFIN_UART0 510 &bfin_uart0_device, 511 #endif ··· 514 #endif 515 #endif 516 517 + #if IS_ENABLED(CONFIG_BFIN_SIR) 518 #ifdef CONFIG_BFIN_SIR0 519 &bfin_sir0_device, 520 #endif ··· 523 #endif 524 #endif 525 526 + #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI) 527 &i2c_bfin_twi_device, 528 #endif 529 530 + #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT) 531 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 532 &bfin_sport0_uart_device, 533 #endif ··· 542 { 543 printk(KERN_INFO "%s(): registering device resources\n", __func__); 544 platform_add_devices(minotaur_devices, ARRAY_SIZE(minotaur_devices)); 545 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 546 spi_register_board_info(bfin_spi_board_info, 547 ARRAY_SIZE(bfin_spi_board_info)); 548 #endif
+26 -29
arch/blackfin/mach-bf537/boards/pnav10.c
··· 30 * Driver needs to know address, irq and flag pin. 31 */ 32 33 - #if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) 34 static struct resource bfin_pcmcia_cf_resources[] = { 35 { 36 .start = 0x20310000, /* IO PORT */ ··· 59 }; 60 #endif 61 62 - #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 63 static struct platform_device rtc_device = { 64 .name = "rtc-bfin", 65 .id = -1, 66 }; 67 #endif 68 69 - #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 70 #include <linux/smc91x.h> 71 72 static struct smc91x_platdata smc91x_info = { ··· 99 }; 100 #endif 101 102 - #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 103 #include <linux/bfin_mac.h> 104 static const unsigned short bfin_mac_peripherals[] = P_RMII0; 105 ··· 132 }; 133 #endif 134 135 - #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 136 static struct resource net2272_bfin_resources[] = { 137 { 138 .start = 0x20300000, ··· 153 }; 154 #endif 155 156 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 157 /* all SPI peripherals info goes here */ 158 159 - #if defined(CONFIG_MTD_M25P80) \ 160 - || defined(CONFIG_MTD_M25P80_MODULE) 161 static struct mtd_partition bfin_spi_flash_partitions[] = { 162 { 163 .name = "bootloader(spi)", ··· 187 }; 188 #endif 189 190 - #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 191 static struct bfin5xx_spi_chip mmc_spi_chip_info = { 192 .enable_dma = 0, 193 }; 194 #endif 195 196 - #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 197 static const struct ad7877_platform_data bfin_ad7877_ts_info = { 198 .model = 7877, 199 .vref_delay_usecs = 50, /* internal, no capacitor */ ··· 210 #endif 211 212 static struct spi_board_info bfin_spi_board_info[] __initdata = { 213 - #if defined(CONFIG_MTD_M25P80) \ 214 - || defined(CONFIG_MTD_M25P80_MODULE) 215 { 216 /* the modalias must be the same as spi device driver name */ 217 .modalias = "m25p80", /* Name of spi_driver for this device */ ··· 223 }, 224 #endif 225 226 - #if defined(CONFIG_SND_BF5XX_SOC_AD183X) \ 227 - || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) 228 { 229 .modalias = "ad183x", 230 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 231 .chip_select = 4, 232 }, 233 #endif 234 - #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 235 { 236 .modalias = "mmc_spi", 237 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ ··· 241 .mode = SPI_MODE_3, 242 }, 243 #endif 244 - #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 245 { 246 .modalias = "ad7877", 247 .platform_data = &bfin_ad7877_ts_info, ··· 291 }; 292 #endif /* spi master and devices */ 293 294 - #if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE) 295 static struct platform_device bfin_fb_device = { 296 .name = "bf537-lq035", 297 }; 298 #endif 299 300 - #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 301 #ifdef CONFIG_SERIAL_BFIN_UART0 302 static struct resource bfin_uart0_resources[] = { 303 { ··· 396 #endif 397 #endif 398 399 - #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 400 #ifdef CONFIG_BFIN_SIR0 401 static struct resource bfin_sir0_resources[] = { 402 { ··· 452 #endif 453 454 static struct platform_device *stamp_devices[] __initdata = { 455 - #if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) 456 &bfin_pcmcia_cf_device, 457 #endif 458 459 - #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 460 &rtc_device, 461 #endif 462 463 - #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 464 &smc91x_device, 465 #endif 466 467 - #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 468 &bfin_mii_bus, 469 &bfin_mac_device, 470 #endif 471 472 - #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 473 &net2272_bfin_device, 474 #endif 475 476 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 477 &bfin_spi0_device, 478 #endif 479 480 - #if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE) 481 &bfin_fb_device, 482 #endif 483 484 - #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 485 #ifdef CONFIG_SERIAL_BFIN_UART0 486 &bfin_uart0_device, 487 #endif ··· 490 #endif 491 #endif 492 493 - #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 494 #ifdef CONFIG_BFIN_SIR0 495 &bfin_sir0_device, 496 #endif ··· 504 { 505 printk(KERN_INFO "%s(): registering device resources\n", __func__); 506 platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); 507 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 508 spi_register_board_info(bfin_spi_board_info, 509 ARRAY_SIZE(bfin_spi_board_info)); 510 #endif
··· 30 * Driver needs to know address, irq and flag pin. 31 */ 32 33 + #if IS_ENABLED(CONFIG_BFIN_CFPCMCIA) 34 static struct resource bfin_pcmcia_cf_resources[] = { 35 { 36 .start = 0x20310000, /* IO PORT */ ··· 59 }; 60 #endif 61 62 + #if IS_ENABLED(CONFIG_RTC_DRV_BFIN) 63 static struct platform_device rtc_device = { 64 .name = "rtc-bfin", 65 .id = -1, 66 }; 67 #endif 68 69 + #if IS_ENABLED(CONFIG_SMC91X) 70 #include <linux/smc91x.h> 71 72 static struct smc91x_platdata smc91x_info = { ··· 99 }; 100 #endif 101 102 + #if IS_ENABLED(CONFIG_BFIN_MAC) 103 #include <linux/bfin_mac.h> 104 static const unsigned short bfin_mac_peripherals[] = P_RMII0; 105 ··· 132 }; 133 #endif 134 135 + #if IS_ENABLED(CONFIG_USB_NET2272) 136 static struct resource net2272_bfin_resources[] = { 137 { 138 .start = 0x20300000, ··· 153 }; 154 #endif 155 156 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 157 /* all SPI peripherals info goes here */ 158 159 + #if IS_ENABLED(CONFIG_MTD_M25P80) 160 static struct mtd_partition bfin_spi_flash_partitions[] = { 161 { 162 .name = "bootloader(spi)", ··· 188 }; 189 #endif 190 191 + #if IS_ENABLED(CONFIG_MMC_SPI) 192 static struct bfin5xx_spi_chip mmc_spi_chip_info = { 193 .enable_dma = 0, 194 }; 195 #endif 196 197 + #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877) 198 static const struct ad7877_platform_data bfin_ad7877_ts_info = { 199 .model = 7877, 200 .vref_delay_usecs = 50, /* internal, no capacitor */ ··· 211 #endif 212 213 static struct spi_board_info bfin_spi_board_info[] __initdata = { 214 + #if IS_ENABLED(CONFIG_MTD_M25P80) 215 { 216 /* the modalias must be the same as spi device driver name */ 217 .modalias = "m25p80", /* Name of spi_driver for this device */ ··· 225 }, 226 #endif 227 228 + #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD183X) 229 { 230 .modalias = "ad183x", 231 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 234 .chip_select = 4, 235 }, 236 #endif 237 + #if IS_ENABLED(CONFIG_MMC_SPI) 238 { 239 .modalias = "mmc_spi", 240 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ ··· 244 .mode = SPI_MODE_3, 245 }, 246 #endif 247 + #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877) 248 { 249 .modalias = "ad7877", 250 .platform_data = &bfin_ad7877_ts_info, ··· 294 }; 295 #endif /* spi master and devices */ 296 297 + #if IS_ENABLED(CONFIG_FB_BF537_LQ035) 298 static struct platform_device bfin_fb_device = { 299 .name = "bf537-lq035", 300 }; 301 #endif 302 303 + #if IS_ENABLED(CONFIG_SERIAL_BFIN) 304 #ifdef CONFIG_SERIAL_BFIN_UART0 305 static struct resource bfin_uart0_resources[] = { 306 { ··· 399 #endif 400 #endif 401 402 + #if IS_ENABLED(CONFIG_BFIN_SIR) 403 #ifdef CONFIG_BFIN_SIR0 404 static struct resource bfin_sir0_resources[] = { 405 { ··· 455 #endif 456 457 static struct platform_device *stamp_devices[] __initdata = { 458 + #if IS_ENABLED(CONFIG_BFIN_CFPCMCIA) 459 &bfin_pcmcia_cf_device, 460 #endif 461 462 + #if IS_ENABLED(CONFIG_RTC_DRV_BFIN) 463 &rtc_device, 464 #endif 465 466 + #if IS_ENABLED(CONFIG_SMC91X) 467 &smc91x_device, 468 #endif 469 470 + #if IS_ENABLED(CONFIG_BFIN_MAC) 471 &bfin_mii_bus, 472 &bfin_mac_device, 473 #endif 474 475 + #if IS_ENABLED(CONFIG_USB_NET2272) 476 &net2272_bfin_device, 477 #endif 478 479 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 480 &bfin_spi0_device, 481 #endif 482 483 + #if IS_ENABLED(CONFIG_FB_BF537_LQ035) 484 &bfin_fb_device, 485 #endif 486 487 + #if IS_ENABLED(CONFIG_SERIAL_BFIN) 488 #ifdef CONFIG_SERIAL_BFIN_UART0 489 &bfin_uart0_device, 490 #endif ··· 493 #endif 494 #endif 495 496 + #if IS_ENABLED(CONFIG_BFIN_SIR) 497 #ifdef CONFIG_BFIN_SIR0 498 &bfin_sir0_device, 499 #endif ··· 507 { 508 printk(KERN_INFO "%s(): registering device resources\n", __func__); 509 platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); 510 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 511 spi_register_board_info(bfin_spi_board_info, 512 ARRAY_SIZE(bfin_spi_board_info)); 513 #endif
+190 -235
arch/blackfin/mach-bf537/boards/stamp.c
··· 18 #include <linux/mtd/physmap.h> 19 #include <linux/spi/spi.h> 20 #include <linux/spi/flash.h> 21 - #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 22 #include <linux/usb/isp1362.h> 23 #endif 24 #include <linux/i2c.h> ··· 53 * Driver needs to know address, irq and flag pin. 54 */ 55 56 - #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) 57 #include <linux/usb/isp1760.h> 58 static struct resource bfin_isp1760_resources[] = { 59 [0] = { ··· 88 }; 89 #endif 90 91 - #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 92 #include <linux/gpio_keys.h> 93 94 static struct gpio_keys_button bfin_gpio_keys_table[] = { ··· 111 }; 112 #endif 113 114 - #if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) 115 static struct resource bfin_pcmcia_cf_resources[] = { 116 { 117 .start = 0x20310000, /* IO PORT */ ··· 140 }; 141 #endif 142 143 - #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 144 static struct platform_device rtc_device = { 145 .name = "rtc-bfin", 146 .id = -1, 147 }; 148 #endif 149 150 - #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 151 #include <linux/smc91x.h> 152 153 static struct smc91x_platdata smc91x_info = { ··· 180 }; 181 #endif 182 183 - #if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE) 184 static struct resource dm9000_resources[] = { 185 [0] = { 186 .start = 0x203FB800, ··· 207 }; 208 #endif 209 210 - #if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE) 211 static struct resource sl811_hcd_resources[] = { 212 { 213 .start = 0x20340000, ··· 251 }; 252 #endif 253 254 - #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 255 static struct resource isp1362_hcd_resources[] = { 256 { 257 .start = 0x20360000, ··· 290 }; 291 #endif 292 293 - #if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) 294 static unsigned short bfin_can_peripherals[] = { 295 P_CAN0_RX, P_CAN0_TX, 0 296 }; ··· 328 }; 329 #endif 330 331 - #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 332 #include <linux/bfin_mac.h> 333 static const unsigned short bfin_mac_peripherals[] = P_MII0; 334 ··· 361 }; 362 #endif 363 364 - #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 365 static struct resource net2272_bfin_resources[] = { 366 { 367 .start = 0x20300000, ··· 385 }; 386 #endif 387 388 - #if defined(CONFIG_MTD_NAND_PLATFORM) || defined(CONFIG_MTD_NAND_PLATFORM_MODULE) 389 const char *part_probes[] = { "cmdlinepart", "RedBoot", NULL }; 390 391 static struct mtd_partition bfin_plat_nand_partitions[] = { ··· 461 static void bfin_plat_nand_init(void) {} 462 #endif 463 464 - #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 465 static struct mtd_partition stamp_partitions[] = { 466 { 467 .name = "bootloader(nor)", ··· 509 }; 510 #endif 511 512 - #if defined(CONFIG_MTD_M25P80) \ 513 - || defined(CONFIG_MTD_M25P80_MODULE) 514 static struct mtd_partition bfin_spi_flash_partitions[] = { 515 { 516 .name = "bootloader(spi)", ··· 540 }; 541 #endif 542 543 - #if defined(CONFIG_INPUT_AD714X_SPI) || defined(CONFIG_INPUT_AD714X_SPI_MODULE) 544 #include <linux/input/ad714x.h> 545 546 static struct ad714x_slider_plat ad7147_spi_slider_plat[] = { ··· 601 }; 602 #endif 603 604 - #if defined(CONFIG_INPUT_AD714X_I2C) || defined(CONFIG_INPUT_AD714X_I2C_MODULE) 605 #include <linux/input/ad714x.h> 606 static struct ad714x_button_plat ad7142_i2c_button_plat[] = { 607 { ··· 648 }; 649 #endif 650 651 - #if defined(CONFIG_AD2S90) || defined(CONFIG_AD2S90_MODULE) 652 static struct bfin5xx_spi_chip ad2s90_spi_chip_info = { 653 .enable_dma = 0, 654 }; 655 #endif 656 657 - #if defined(CONFIG_AD2S120X) || defined(CONFIG_AD2S120X_MODULE) 658 - static unsigned short ad2s120x_platform_data[] = { 659 /* used as SAMPLE and RDVEL */ 660 GPIO_PF5, GPIO_PF6, 0 661 }; 662 663 - static struct bfin5xx_spi_chip ad2s120x_spi_chip_info = { 664 .enable_dma = 0, 665 }; 666 #endif 667 668 - #if defined(CONFIG_AD2S1210) || defined(CONFIG_AD2S1210_MODULE) 669 static unsigned short ad2s1210_platform_data[] = { 670 /* use as SAMPLE, A0, A1 */ 671 GPIO_PF7, GPIO_PF8, GPIO_PF9, ··· 681 }; 682 #endif 683 684 - #if defined(CONFIG_AD7314) || defined(CONFIG_AD7314_MODULE) 685 static struct bfin5xx_spi_chip ad7314_spi_chip_info = { 686 .enable_dma = 0, 687 }; 688 #endif 689 690 - #if defined(CONFIG_AD7816) || defined(CONFIG_AD7816_MODULE) 691 static unsigned short ad7816_platform_data[] = { 692 GPIO_PF4, /* rdwr_pin */ 693 GPIO_PF5, /* convert_pin */ ··· 700 }; 701 #endif 702 703 - #if defined(CONFIG_ADT7310) || defined(CONFIG_ADT7310_MODULE) 704 static unsigned long adt7310_platform_data[3] = { 705 /* INT bound temperature alarm event. line 1 */ 706 IRQ_PG4, IRQF_TRIGGER_LOW, ··· 713 }; 714 #endif 715 716 - #if defined(CONFIG_AD7298) || defined(CONFIG_AD7298_MODULE) 717 static unsigned short ad7298_platform_data[] = { 718 GPIO_PF7, /* busy_pin */ 719 0, 720 }; 721 #endif 722 723 - #if defined(CONFIG_ADT7316_SPI) || defined(CONFIG_ADT7316_SPI_MODULE) 724 static unsigned long adt7316_spi_data[2] = { 725 IRQF_TRIGGER_LOW, /* interrupt flags */ 726 GPIO_PF7, /* ldac_pin, 0 means DAC/LDAC registers control DAC update */ ··· 731 }; 732 #endif 733 734 - #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 735 #define MMC_SPI_CARD_DETECT_INT IRQ_PF5 736 737 static int bfin_mmc_spi_init(struct device *dev, ··· 758 }; 759 #endif 760 761 - #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 762 #include <linux/spi/ad7877.h> 763 static const struct ad7877_platform_data bfin_ad7877_ts_info = { 764 .model = 7877, ··· 775 }; 776 #endif 777 778 - #if defined(CONFIG_TOUCHSCREEN_AD7879) || defined(CONFIG_TOUCHSCREEN_AD7879_MODULE) 779 #include <linux/spi/ad7879.h> 780 static const struct ad7879_platform_data bfin_ad7879_ts_info = { 781 .model = 7879, /* Model = AD7879 */ ··· 792 }; 793 #endif 794 795 - #if defined(CONFIG_INPUT_ADXL34X) || defined(CONFIG_INPUT_ADXL34X_MODULE) 796 #include <linux/input/adxl34x.h> 797 static const struct adxl34x_platform_data adxl34x_info = { 798 .x_axis_offset = 0, ··· 831 }; 832 #endif 833 834 - #if defined(CONFIG_ENC28J60) || defined(CONFIG_ENC28J60_MODULE) 835 static struct bfin5xx_spi_chip enc28j60_spi_chip_info = { 836 .enable_dma = 1, 837 }; 838 #endif 839 840 - #if defined(CONFIG_ADF702X) || defined(CONFIG_ADF702X_MODULE) 841 #include <linux/spi/adf702x.h> 842 #define TXREG 0x0160A470 843 static const u32 adf7021_regs[] = { ··· 879 static inline void adf702x_mac_init(void) {} 880 #endif 881 882 - #if defined(CONFIG_TOUCHSCREEN_ADS7846) || defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE) 883 #include <linux/spi/ads7846.h> 884 static int ads7873_get_pendown_state(void) 885 { ··· 898 }; 899 #endif 900 901 - #if defined(CONFIG_MTD_DATAFLASH) \ 902 - || defined(CONFIG_MTD_DATAFLASH_MODULE) 903 904 static struct mtd_partition bfin_spi_dataflash_partitions[] = { 905 { ··· 929 }; 930 #endif 931 932 - #if defined(CONFIG_AD7476) || defined(CONFIG_AD7476_MODULE) 933 static struct bfin5xx_spi_chip spi_ad7476_chip_info = { 934 .enable_dma = 0, /* use dma transfer with this chip*/ 935 }; 936 #endif 937 938 static struct spi_board_info bfin_spi_board_info[] __initdata = { 939 - #if defined(CONFIG_MTD_M25P80) \ 940 - || defined(CONFIG_MTD_M25P80_MODULE) 941 { 942 /* the modalias must be the same as spi device driver name */ 943 .modalias = "m25p80", /* Name of spi_driver for this device */ ··· 948 .mode = SPI_MODE_3, 949 }, 950 #endif 951 - #if defined(CONFIG_MTD_DATAFLASH) \ 952 - || defined(CONFIG_MTD_DATAFLASH_MODULE) 953 { /* DataFlash chip */ 954 .modalias = "mtd_dataflash", 955 .max_speed_hz = 33250000, /* max spi clock (SCK) speed in HZ */ ··· 960 }, 961 #endif 962 963 - #if defined(CONFIG_SND_BF5XX_SOC_AD1836) \ 964 - || defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE) 965 { 966 .modalias = "ad1836", 967 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 981 }, 982 #endif 983 984 - #if defined(CONFIG_SND_SOC_ADAV80X) || defined(CONFIG_SND_SOC_ADV80X_MODULE) 985 { 986 .modalias = "adav801", 987 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 991 }, 992 #endif 993 994 - #if defined(CONFIG_INPUT_AD714X_SPI) || defined(CONFIG_INPUT_AD714X_SPI_MODULE) 995 { 996 .modalias = "ad714x_captouch", 997 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ ··· 1003 }, 1004 #endif 1005 1006 - #if defined(CONFIG_AD2S90) || defined(CONFIG_AD2S90_MODULE) 1007 { 1008 .modalias = "ad2s90", 1009 .bus_num = 0, ··· 1014 }, 1015 #endif 1016 1017 - #if defined(CONFIG_AD2S120X) || defined(CONFIG_AD2S120X_MODULE) 1018 { 1019 - .modalias = "ad2s120x", 1020 .bus_num = 0, 1021 .chip_select = 4, /* CS, change it for your board */ 1022 - .platform_data = ad2s120x_platform_data, 1023 - .controller_data = &ad2s120x_spi_chip_info, 1024 }, 1025 #endif 1026 1027 - #if defined(CONFIG_AD2S1210) || defined(CONFIG_AD2S1210_MODULE) 1028 { 1029 .modalias = "ad2s1210", 1030 .max_speed_hz = 8192000, ··· 1035 }, 1036 #endif 1037 1038 - #if defined(CONFIG_AD7314) || defined(CONFIG_AD7314_MODULE) 1039 { 1040 .modalias = "ad7314", 1041 .max_speed_hz = 1000000, ··· 1046 }, 1047 #endif 1048 1049 - #if defined(CONFIG_AD7816) || defined(CONFIG_AD7816_MODULE) 1050 { 1051 .modalias = "ad7818", 1052 .max_speed_hz = 1000000, ··· 1058 }, 1059 #endif 1060 1061 - #if defined(CONFIG_ADT7310) || defined(CONFIG_ADT7310_MODULE) 1062 { 1063 .modalias = "adt7310", 1064 .max_speed_hz = 1000000, ··· 1071 }, 1072 #endif 1073 1074 - #if defined(CONFIG_AD7298) || defined(CONFIG_AD7298_MODULE) 1075 { 1076 .modalias = "ad7298", 1077 .max_speed_hz = 1000000, ··· 1082 }, 1083 #endif 1084 1085 - #if defined(CONFIG_ADT7316_SPI) || defined(CONFIG_ADT7316_SPI_MODULE) 1086 { 1087 .modalias = "adt7316", 1088 .max_speed_hz = 1000000, ··· 1095 }, 1096 #endif 1097 1098 - #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 1099 { 1100 .modalias = "mmc_spi", 1101 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ ··· 1106 .mode = SPI_MODE_3, 1107 }, 1108 #endif 1109 - #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 1110 { 1111 .modalias = "ad7877", 1112 .platform_data = &bfin_ad7877_ts_info, ··· 1116 .chip_select = 1, 1117 }, 1118 #endif 1119 - #if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE) 1120 { 1121 .modalias = "ad7879", 1122 .platform_data = &bfin_ad7879_ts_info, ··· 1127 .mode = SPI_CPHA | SPI_CPOL, 1128 }, 1129 #endif 1130 - #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 1131 { 1132 .modalias = "spidev", 1133 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 1135 .chip_select = 1, 1136 }, 1137 #endif 1138 - #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) 1139 { 1140 .modalias = "bfin-lq035q1-spi", 1141 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ ··· 1144 .mode = SPI_CPHA | SPI_CPOL, 1145 }, 1146 #endif 1147 - #if defined(CONFIG_ENC28J60) || defined(CONFIG_ENC28J60_MODULE) 1148 { 1149 .modalias = "enc28j60", 1150 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ ··· 1155 .mode = SPI_MODE_0, 1156 }, 1157 #endif 1158 - #if defined(CONFIG_INPUT_ADXL34X_SPI) || defined(CONFIG_INPUT_ADXL34X_SPI_MODULE) 1159 { 1160 .modalias = "adxl34x", 1161 .platform_data = &adxl34x_info, ··· 1166 .mode = SPI_MODE_3, 1167 }, 1168 #endif 1169 - #if defined(CONFIG_ADF702X) || defined(CONFIG_ADF702X_MODULE) 1170 { 1171 .modalias = "adf702x", 1172 .max_speed_hz = 16000000, /* max spi clock (SCK) speed in HZ */ ··· 1176 .mode = SPI_MODE_0, 1177 }, 1178 #endif 1179 - #if defined(CONFIG_TOUCHSCREEN_ADS7846) || defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE) 1180 { 1181 .modalias = "ads7846", 1182 .max_speed_hz = 2000000, /* max spi clock (SCK) speed in HZ */ ··· 1187 .mode = SPI_MODE_0, 1188 }, 1189 #endif 1190 - #if defined(CONFIG_AD7476) \ 1191 - || defined(CONFIG_AD7476_MODULE) 1192 { 1193 .modalias = "ad7476", /* Name of spi_driver for this device */ 1194 .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */ ··· 1198 .mode = SPI_MODE_3, 1199 }, 1200 #endif 1201 - #if defined(CONFIG_ADE7753) \ 1202 - || defined(CONFIG_ADE7753_MODULE) 1203 { 1204 .modalias = "ade7753", 1205 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ ··· 1208 .mode = SPI_MODE_1, 1209 }, 1210 #endif 1211 - #if defined(CONFIG_ADE7754) \ 1212 - || defined(CONFIG_ADE7754_MODULE) 1213 { 1214 .modalias = "ade7754", 1215 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ ··· 1218 .mode = SPI_MODE_1, 1219 }, 1220 #endif 1221 - #if defined(CONFIG_ADE7758) \ 1222 - || defined(CONFIG_ADE7758_MODULE) 1223 { 1224 .modalias = "ade7758", 1225 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ ··· 1228 .mode = SPI_MODE_1, 1229 }, 1230 #endif 1231 - #if defined(CONFIG_ADE7759) \ 1232 - || defined(CONFIG_ADE7759_MODULE) 1233 { 1234 .modalias = "ade7759", 1235 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ ··· 1238 .mode = SPI_MODE_1, 1239 }, 1240 #endif 1241 - #if defined(CONFIG_ADE7854_SPI) \ 1242 - || defined(CONFIG_ADE7854_SPI_MODULE) 1243 { 1244 .modalias = "ade7854", 1245 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ ··· 1248 .mode = SPI_MODE_3, 1249 }, 1250 #endif 1251 - #if defined(CONFIG_ADIS16060) \ 1252 - || defined(CONFIG_ADIS16060_MODULE) 1253 { 1254 .modalias = "adis16060_r", 1255 .max_speed_hz = 2900000, /* max spi clock (SCK) speed in HZ */ ··· 1266 .mode = SPI_MODE_1, 1267 }, 1268 #endif 1269 - #if defined(CONFIG_ADIS16130) \ 1270 - || defined(CONFIG_ADIS16130_MODULE) 1271 { 1272 .modalias = "adis16130", 1273 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ ··· 1276 .mode = SPI_MODE_3, 1277 }, 1278 #endif 1279 - #if defined(CONFIG_ADIS16201) \ 1280 - || defined(CONFIG_ADIS16201_MODULE) 1281 { 1282 .modalias = "adis16201", 1283 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ ··· 1287 .irq = IRQ_PF4, 1288 }, 1289 #endif 1290 - #if defined(CONFIG_ADIS16203) \ 1291 - || defined(CONFIG_ADIS16203_MODULE) 1292 { 1293 .modalias = "adis16203", 1294 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ ··· 1298 .irq = IRQ_PF4, 1299 }, 1300 #endif 1301 - #if defined(CONFIG_ADIS16204) \ 1302 - || defined(CONFIG_ADIS16204_MODULE) 1303 { 1304 .modalias = "adis16204", 1305 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ ··· 1309 .irq = IRQ_PF4, 1310 }, 1311 #endif 1312 - #if defined(CONFIG_ADIS16209) \ 1313 - || defined(CONFIG_ADIS16209_MODULE) 1314 { 1315 .modalias = "adis16209", 1316 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ ··· 1320 .irq = IRQ_PF4, 1321 }, 1322 #endif 1323 - #if defined(CONFIG_ADIS16220) \ 1324 - || defined(CONFIG_ADIS16220_MODULE) 1325 { 1326 .modalias = "adis16220", 1327 .max_speed_hz = 2000000, /* max spi clock (SCK) speed in HZ */ ··· 1331 .irq = IRQ_PF4, 1332 }, 1333 #endif 1334 - #if defined(CONFIG_ADIS16240) \ 1335 - || defined(CONFIG_ADIS16240_MODULE) 1336 { 1337 .modalias = "adis16240", 1338 .max_speed_hz = 1500000, /* max spi clock (SCK) speed in HZ */ ··· 1342 .irq = IRQ_PF4, 1343 }, 1344 #endif 1345 - #if defined(CONFIG_ADIS16260) \ 1346 - || defined(CONFIG_ADIS16260_MODULE) 1347 { 1348 .modalias = "adis16260", 1349 .max_speed_hz = 1500000, /* max spi clock (SCK) speed in HZ */ ··· 1353 .irq = IRQ_PF4, 1354 }, 1355 #endif 1356 - #if defined(CONFIG_ADIS16261) \ 1357 - || defined(CONFIG_ADIS16261_MODULE) 1358 { 1359 .modalias = "adis16261", 1360 .max_speed_hz = 2500000, /* max spi clock (SCK) speed in HZ */ ··· 1363 .mode = SPI_MODE_3, 1364 }, 1365 #endif 1366 - #if defined(CONFIG_ADIS16300) \ 1367 - || defined(CONFIG_ADIS16300_MODULE) 1368 { 1369 .modalias = "adis16300", 1370 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ ··· 1374 .irq = IRQ_PF4, 1375 }, 1376 #endif 1377 - #if defined(CONFIG_ADIS16350) \ 1378 - || defined(CONFIG_ADIS16350_MODULE) 1379 { 1380 .modalias = "adis16364", 1381 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ ··· 1385 .irq = IRQ_PF4, 1386 }, 1387 #endif 1388 - #if defined(CONFIG_ADIS16400) \ 1389 - || defined(CONFIG_ADIS16400_MODULE) 1390 { 1391 .modalias = "adis16400", 1392 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ ··· 1397 #endif 1398 }; 1399 1400 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 1401 /* SPI controller data */ 1402 static struct bfin5xx_spi_master bfin_spi0_info = { 1403 .num_chipselect = MAX_CTRL_CS + MAX_BLACKFIN_GPIOS, ··· 1435 }; 1436 #endif /* spi master and devices */ 1437 1438 - #if defined(CONFIG_SPI_BFIN_SPORT) || defined(CONFIG_SPI_BFIN_SPORT_MODULE) 1439 1440 /* SPORT SPI controller data */ 1441 static struct bfin5xx_spi_master bfin_sport_spi0_info = { ··· 1500 1501 #endif /* sport spi master and devices */ 1502 1503 - #if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE) 1504 static struct platform_device bfin_fb_device = { 1505 .name = "bf537_lq035", 1506 }; 1507 #endif 1508 1509 - #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) 1510 #include <asm/bfin-lq035q1.h> 1511 1512 static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = { ··· 1535 }; 1536 #endif 1537 1538 - #if defined(CONFIG_VIDEO_BLACKFIN_CAPTURE) \ 1539 - || defined(CONFIG_VIDEO_BLACKFIN_CAPTURE_MODULE) 1540 #include <linux/videodev2.h> 1541 #include <media/blackfin/bfin_capture.h> 1542 #include <media/blackfin/ppi.h> ··· 1555 .pin_req = ppi_req, 1556 }; 1557 1558 - #if defined(CONFIG_VIDEO_VS6624) \ 1559 - || defined(CONFIG_VIDEO_VS6624_MODULE) 1560 static struct v4l2_input vs6624_inputs[] = { 1561 { 1562 .index = 0, ··· 1598 }; 1599 #endif 1600 1601 - #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 1602 #ifdef CONFIG_SERIAL_BFIN_UART0 1603 static struct resource bfin_uart0_resources[] = { 1604 { ··· 1709 #endif 1710 #endif 1711 1712 - #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 1713 #ifdef CONFIG_BFIN_SIR0 1714 static struct resource bfin_sir0_resources[] = { 1715 { ··· 1764 #endif 1765 #endif 1766 1767 - #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 1768 static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; 1769 1770 static struct resource bfin_twi0_resource[] = { ··· 1791 }; 1792 #endif 1793 1794 - #if defined(CONFIG_KEYBOARD_ADP5588) || defined(CONFIG_KEYBOARD_ADP5588_MODULE) 1795 static const unsigned short adp5588_keymap[ADP5588_KEYMAPSIZE] = { 1796 [0] = KEY_GRAVE, 1797 [1] = KEY_1, ··· 1876 }; 1877 #endif 1878 1879 - #if defined(CONFIG_PMIC_ADP5520) || defined(CONFIG_PMIC_ADP5520_MODULE) 1880 #include <linux/mfd/adp5520.h> 1881 1882 /* ··· 1987 1988 #endif 1989 1990 - #if defined(CONFIG_GPIO_ADP5588) || defined(CONFIG_GPIO_ADP5588_MODULE) 1991 static struct adp5588_gpio_platform_data adp5588_gpio_data = { 1992 .gpio_start = 50, 1993 .pullup_dis_mask = 0, 1994 }; 1995 #endif 1996 1997 - #if defined(CONFIG_BACKLIGHT_ADP8870) || defined(CONFIG_BACKLIGHT_ADP8870_MODULE) 1998 #include <linux/i2c/adp8870.h> 1999 static struct led_info adp8870_leds[] = { 2000 { ··· 2046 }; 2047 #endif 2048 2049 - #if defined(CONFIG_BACKLIGHT_ADP8860) || defined(CONFIG_BACKLIGHT_ADP8860_MODULE) 2050 #include <linux/i2c/adp8860.h> 2051 static struct led_info adp8860_leds[] = { 2052 { ··· 2088 }; 2089 #endif 2090 2091 - #if defined(CONFIG_REGULATOR_AD5398) || defined(CONFIG_REGULATOR_AD5398_MODULE) 2092 static struct regulator_consumer_supply ad5398_consumer = { 2093 .supply = "current", 2094 }; ··· 2103 .consumer_supplies = &ad5398_consumer, 2104 }; 2105 2106 - #if defined(CONFIG_REGULATOR_VIRTUAL_CONSUMER) || \ 2107 - defined(CONFIG_REGULATOR_VIRTUAL_CONSUMER_MODULE) 2108 static struct platform_device ad5398_virt_consumer_device = { 2109 .name = "reg-virt-consumer", 2110 .id = 0, ··· 2112 }, 2113 }; 2114 #endif 2115 - #if defined(CONFIG_REGULATOR_USERSPACE_CONSUMER) || \ 2116 - defined(CONFIG_REGULATOR_USERSPACE_CONSUMER_MODULE) 2117 static struct regulator_bulk_data ad5398_bulk_data = { 2118 .supply = "current", 2119 }; ··· 2133 #endif 2134 #endif 2135 2136 - #if defined(CONFIG_ADT7410) || defined(CONFIG_ADT7410_MODULE) 2137 /* INT bound temperature alarm event. line 1 */ 2138 static unsigned long adt7410_platform_data[2] = { 2139 IRQ_PG4, IRQF_TRIGGER_LOW, 2140 }; 2141 #endif 2142 2143 - #if defined(CONFIG_ADT7316_I2C) || defined(CONFIG_ADT7316_I2C_MODULE) 2144 /* INT bound temperature alarm event. line 1 */ 2145 static unsigned long adt7316_i2c_data[2] = { 2146 IRQF_TRIGGER_LOW, /* interrupt flags */ ··· 2155 }, 2156 #endif 2157 2158 - #if defined(CONFIG_SND_SOC_ADAV80X) || defined(CONFIG_SND_SOC_ADAV80X_MODULE) 2159 { 2160 I2C_BOARD_INFO("adav803", 0x10), 2161 }, 2162 #endif 2163 2164 - #if defined(CONFIG_INPUT_AD714X_I2C) || defined(CONFIG_INPUT_AD714X_I2C_MODULE) 2165 { 2166 I2C_BOARD_INFO("ad7142_captouch", 0x2C), 2167 .irq = IRQ_PG5, ··· 2169 }, 2170 #endif 2171 2172 - #if defined(CONFIG_AD7150) || defined(CONFIG_AD7150_MODULE) 2173 { 2174 I2C_BOARD_INFO("ad7150", 0x48), 2175 .irq = IRQ_PG5, /* fixme: use real interrupt number */ 2176 }, 2177 #endif 2178 2179 - #if defined(CONFIG_AD7152) || defined(CONFIG_AD7152_MODULE) 2180 { 2181 I2C_BOARD_INFO("ad7152", 0x48), 2182 }, 2183 #endif 2184 2185 - #if defined(CONFIG_AD774X) || defined(CONFIG_AD774X_MODULE) 2186 { 2187 I2C_BOARD_INFO("ad774x", 0x48), 2188 }, 2189 #endif 2190 2191 - #if defined(CONFIG_ADE7854_I2C) || defined(CONFIG_ADE7854_I2C_MODULE) 2192 { 2193 I2C_BOARD_INFO("ade7854", 0x38), 2194 }, 2195 #endif 2196 2197 - #if defined(CONFIG_ADT75) || defined(CONFIG_ADT75_MODULE) 2198 { 2199 I2C_BOARD_INFO("adt75", 0x9), 2200 .irq = IRQ_PG5, 2201 }, 2202 #endif 2203 2204 - #if defined(CONFIG_ADT7410) || defined(CONFIG_ADT7410_MODULE) 2205 { 2206 I2C_BOARD_INFO("adt7410", 0x48), 2207 /* CT critical temperature event. line 0 */ ··· 2210 }, 2211 #endif 2212 2213 - #if defined(CONFIG_AD7291) || defined(CONFIG_AD7291_MODULE) 2214 { 2215 I2C_BOARD_INFO("ad7291", 0x20), 2216 .irq = IRQ_PG5, 2217 }, 2218 #endif 2219 2220 - #if defined(CONFIG_ADT7316_I2C) || defined(CONFIG_ADT7316_I2C_MODULE) 2221 { 2222 I2C_BOARD_INFO("adt7316", 0x48), 2223 .irq = IRQ_PG6, ··· 2225 }, 2226 #endif 2227 2228 - #if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) 2229 { 2230 I2C_BOARD_INFO("pcf8574_lcd", 0x22), 2231 }, 2232 #endif 2233 - #if defined(CONFIG_INPUT_PCF8574) || defined(CONFIG_INPUT_PCF8574_MODULE) 2234 { 2235 I2C_BOARD_INFO("pcf8574_keypad", 0x27), 2236 .irq = IRQ_PG6, 2237 }, 2238 #endif 2239 - #if defined(CONFIG_TOUCHSCREEN_AD7879_I2C) || defined(CONFIG_TOUCHSCREEN_AD7879_I2C_MODULE) 2240 { 2241 I2C_BOARD_INFO("ad7879", 0x2F), 2242 .irq = IRQ_PG5, 2243 .platform_data = (void *)&bfin_ad7879_ts_info, 2244 }, 2245 #endif 2246 - #if defined(CONFIG_KEYBOARD_ADP5588) || defined(CONFIG_KEYBOARD_ADP5588_MODULE) 2247 { 2248 I2C_BOARD_INFO("adp5588-keys", 0x34), 2249 .irq = IRQ_PG0, 2250 .platform_data = (void *)&adp5588_kpad_data, 2251 }, 2252 #endif 2253 - #if defined(CONFIG_PMIC_ADP5520) || defined(CONFIG_PMIC_ADP5520_MODULE) 2254 { 2255 I2C_BOARD_INFO("pmic-adp5520", 0x32), 2256 .irq = IRQ_PG0, 2257 .platform_data = (void *)&adp5520_pdev_data, 2258 }, 2259 #endif 2260 - #if defined(CONFIG_INPUT_ADXL34X_I2C) || defined(CONFIG_INPUT_ADXL34X_I2C_MODULE) 2261 { 2262 I2C_BOARD_INFO("adxl34x", 0x53), 2263 .irq = IRQ_PG3, 2264 .platform_data = (void *)&adxl34x_info, 2265 }, 2266 #endif 2267 - #if defined(CONFIG_GPIO_ADP5588) || defined(CONFIG_GPIO_ADP5588_MODULE) 2268 { 2269 I2C_BOARD_INFO("adp5588-gpio", 0x34), 2270 .platform_data = (void *)&adp5588_gpio_data, 2271 }, 2272 #endif 2273 - #if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE) 2274 { 2275 I2C_BOARD_INFO("bfin-adv7393", 0x2B), 2276 }, 2277 #endif 2278 - #if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE) 2279 { 2280 I2C_BOARD_INFO("bf537-lq035-ad5280", 0x2F), 2281 }, 2282 #endif 2283 - #if defined(CONFIG_BACKLIGHT_ADP8870) || defined(CONFIG_BACKLIGHT_ADP8870_MODULE) 2284 { 2285 I2C_BOARD_INFO("adp8870", 0x2B), 2286 .platform_data = (void *)&adp8870_pdata, 2287 }, 2288 #endif 2289 - #if defined(CONFIG_SND_SOC_ADAU1371) || defined(CONFIG_SND_SOC_ADAU1371_MODULE) 2290 { 2291 I2C_BOARD_INFO("adau1371", 0x1A), 2292 }, 2293 #endif 2294 - #if defined(CONFIG_SND_SOC_ADAU1761) || defined(CONFIG_SND_SOC_ADAU1761_MODULE) 2295 { 2296 I2C_BOARD_INFO("adau1761", 0x38), 2297 }, 2298 #endif 2299 - #if defined(CONFIG_SND_SOC_ADAU1361) || defined(CONFIG_SND_SOC_ADAU1361_MODULE) 2300 { 2301 I2C_BOARD_INFO("adau1361", 0x38), 2302 }, 2303 #endif 2304 - #if defined(CONFIG_SND_SOC_ADAU1701) || defined(CONFIG_SND_SOC_ADAU1701_MODULE) 2305 { 2306 I2C_BOARD_INFO("adau1701", 0x34), 2307 }, 2308 #endif 2309 - #if defined(CONFIG_AD525X_DPOT) || defined(CONFIG_AD525X_DPOT_MODULE) 2310 { 2311 I2C_BOARD_INFO("ad5258", 0x18), 2312 }, 2313 #endif 2314 - #if defined(CONFIG_SND_SOC_SSM2602) || defined(CONFIG_SND_SOC_SSM2602_MODULE) 2315 { 2316 I2C_BOARD_INFO("ssm2602", 0x1b), 2317 }, 2318 #endif 2319 - #if defined(CONFIG_REGULATOR_AD5398) || defined(CONFIG_REGULATOR_AD5398_MODULE) 2320 { 2321 I2C_BOARD_INFO("ad5398", 0xC), 2322 .platform_data = (void *)&ad5398_regulator_data, 2323 }, 2324 #endif 2325 - #if defined(CONFIG_BACKLIGHT_ADP8860) || defined(CONFIG_BACKLIGHT_ADP8860_MODULE) 2326 { 2327 I2C_BOARD_INFO("adp8860", 0x2A), 2328 .platform_data = (void *)&adp8860_pdata, 2329 }, 2330 #endif 2331 - #if defined(CONFIG_SND_SOC_ADAU1373) || defined(CONFIG_SND_SOC_ADAU1373_MODULE) 2332 { 2333 I2C_BOARD_INFO("adau1373", 0x1A), 2334 }, 2335 #endif 2336 - #if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) 2337 { 2338 I2C_BOARD_INFO("ad5252", 0x2e), 2339 }, 2340 #endif 2341 }; 2342 - #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) \ 2343 - || defined(CONFIG_BFIN_SPORT) || defined(CONFIG_BFIN_SPORT_MODULE) 2344 unsigned short bfin_sport0_peripherals[] = { 2345 P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS, 2346 P_SPORT0_DRPRI, P_SPORT0_RSCLK, P_SPORT0_DRSEC, P_SPORT0_DTSEC, 0 2347 }; 2348 #endif 2349 - #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 2350 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 2351 static struct resource bfin_sport0_uart_resources[] = { 2352 { ··· 2411 }; 2412 #endif 2413 #endif 2414 - #if defined(CONFIG_BFIN_SPORT) || defined(CONFIG_BFIN_SPORT_MODULE) 2415 static struct resource bfin_sport0_resources[] = { 2416 { 2417 .start = SPORT0_TCR1, ··· 2454 }, 2455 }; 2456 #endif 2457 - #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 2458 #define CF_IDE_NAND_CARD_USE_HDD_INTERFACE 2459 /* #define CF_IDE_NAND_CARD_USE_CF_IN_COMMON_MEMORY_MODE */ 2460 ··· 2541 }, 2542 }; 2543 2544 - #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) || \ 2545 - defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) 2546 2547 #define SPORT_REQ(x) \ 2548 [x] = {P_SPORT##x##_TFS, P_SPORT##x##_DTPRI, P_SPORT##x##_TSCLK, \ ··· 2592 }; 2593 #endif 2594 2595 - #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 2596 static struct platform_device bfin_i2s_pcm = { 2597 .name = "bfin-i2s-pcm-audio", 2598 .id = -1, 2599 }; 2600 #endif 2601 2602 - #if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) 2603 static struct platform_device bfin_ac97_pcm = { 2604 .name = "bfin-ac97-pcm-audio", 2605 .id = -1, 2606 }; 2607 #endif 2608 2609 - #if defined(CONFIG_SND_BF5XX_SOC_AD1836) \ 2610 - || defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE) 2611 static const char * const ad1836_link[] = { 2612 "bfin-i2s.0", 2613 "spi0.4", ··· 2620 }; 2621 #endif 2622 2623 - #if defined(CONFIG_SND_BF5XX_SOC_AD73311) || \ 2624 - defined(CONFIG_SND_BF5XX_SOC_AD73311_MODULE) 2625 static const unsigned ad73311_gpio[] = { 2626 GPIO_PF4, 2627 }; ··· 2634 }; 2635 #endif 2636 2637 - #if defined(CONFIG_SND_SOC_AD73311) || defined(CONFIG_SND_SOC_AD73311_MODULE) 2638 static struct platform_device bfin_ad73311_codec_device = { 2639 .name = "ad73311", 2640 .id = -1, 2641 }; 2642 #endif 2643 2644 - #if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAV80X) || \ 2645 - defined(CONFIG_SND_SOC_BFIN_EVAL_ADAV80X_MODULE) 2646 static struct platform_device bfin_eval_adav801_device = { 2647 .name = "bfin-eval-adav801", 2648 .id = -1, 2649 }; 2650 #endif 2651 2652 - #if defined(CONFIG_SND_BF5XX_SOC_I2S) || defined(CONFIG_SND_BF5XX_SOC_I2S_MODULE) 2653 static struct platform_device bfin_i2s = { 2654 .name = "bfin-i2s", 2655 .id = CONFIG_SND_BF5XX_SPORT_NUM, ··· 2660 }; 2661 #endif 2662 2663 - #if defined(CONFIG_SND_BF5XX_SOC_AC97) || defined(CONFIG_SND_BF5XX_SOC_AC97_MODULE) 2664 static struct platform_device bfin_ac97 = { 2665 .name = "bfin-ac97", 2666 .id = CONFIG_SND_BF5XX_SPORT_NUM, ··· 2672 }; 2673 #endif 2674 2675 - #if defined(CONFIG_REGULATOR_FIXED_VOLTAGE) || defined(CONFIG_REGULATOR_FIXED_VOLTAGE_MODULE) 2676 #define REGULATOR_ADP122 "adp122" 2677 #define REGULATOR_ADP122_UV 2500000 2678 ··· 2710 }, 2711 }; 2712 2713 - #if defined(CONFIG_REGULATOR_USERSPACE_CONSUMER) || \ 2714 - defined(CONFIG_REGULATOR_USERSPACE_CONSUMER_MODULE) 2715 static struct regulator_bulk_data adp122_bulk_data = { 2716 .supply = REGULATOR_ADP122, 2717 }; ··· 2731 #endif 2732 #endif 2733 2734 - #if defined(CONFIG_IIO_GPIO_TRIGGER) || \ 2735 - defined(CONFIG_IIO_GPIO_TRIGGER_MODULE) 2736 2737 static struct resource iio_gpio_trigger_resources[] = { 2738 [0] = { ··· 2748 }; 2749 #endif 2750 2751 - #if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1373) || \ 2752 - defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1373_MODULE) 2753 static struct platform_device bf5xx_adau1373_device = { 2754 .name = "bfin-eval-adau1373", 2755 }; 2756 #endif 2757 2758 - #if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1701) || \ 2759 - defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1701_MODULE) 2760 static struct platform_device bf5xx_adau1701_device = { 2761 .name = "bfin-eval-adau1701", 2762 }; ··· 2763 static struct platform_device *stamp_devices[] __initdata = { 2764 2765 &bfin_dpmc, 2766 - #if defined(CONFIG_BFIN_SPORT) || defined(CONFIG_BFIN_SPORT_MODULE) 2767 &bfin_sport0_device, 2768 #endif 2769 - #if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) 2770 &bfin_pcmcia_cf_device, 2771 #endif 2772 2773 - #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 2774 &rtc_device, 2775 #endif 2776 2777 - #if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE) 2778 &sl811_hcd_device, 2779 #endif 2780 2781 - #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 2782 &isp1362_hcd_device, 2783 #endif 2784 2785 - #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) 2786 &bfin_isp1760_device, 2787 #endif 2788 2789 - #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 2790 &smc91x_device, 2791 #endif 2792 2793 - #if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE) 2794 &dm9000_device, 2795 #endif 2796 2797 - #if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) 2798 &bfin_can_device, 2799 #endif 2800 2801 - #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 2802 &bfin_mii_bus, 2803 &bfin_mac_device, 2804 #endif 2805 2806 - #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 2807 &net2272_bfin_device, 2808 #endif 2809 2810 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 2811 &bfin_spi0_device, 2812 #endif 2813 2814 - #if defined(CONFIG_SPI_BFIN_SPORT) || defined(CONFIG_SPI_BFIN_SPORT_MODULE) 2815 &bfin_sport_spi0_device, 2816 &bfin_sport_spi1_device, 2817 #endif 2818 2819 - #if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE) 2820 &bfin_fb_device, 2821 #endif 2822 2823 - #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) 2824 &bfin_lq035q1_device, 2825 #endif 2826 2827 - #if defined(CONFIG_VIDEO_BLACKFIN_CAPTURE) \ 2828 - || defined(CONFIG_VIDEO_BLACKFIN_CAPTURE_MODULE) 2829 &bfin_capture_device, 2830 #endif 2831 2832 - #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 2833 #ifdef CONFIG_SERIAL_BFIN_UART0 2834 &bfin_uart0_device, 2835 #endif ··· 2837 #endif 2838 #endif 2839 2840 - #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 2841 #ifdef CONFIG_BFIN_SIR0 2842 &bfin_sir0_device, 2843 #endif ··· 2846 #endif 2847 #endif 2848 2849 - #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 2850 &i2c_bfin_twi_device, 2851 #endif 2852 2853 - #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 2854 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 2855 &bfin_sport0_uart_device, 2856 #endif ··· 2859 #endif 2860 #endif 2861 2862 - #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 2863 &bfin_pata_device, 2864 #endif 2865 2866 - #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 2867 &bfin_device_gpiokeys, 2868 #endif 2869 2870 - #if defined(CONFIG_MTD_NAND_PLATFORM) || defined(CONFIG_MTD_NAND_PLATFORM_MODULE) 2871 &bfin_async_nand_device, 2872 #endif 2873 2874 - #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 2875 &stamp_flash_device, 2876 #endif 2877 2878 - #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 2879 &bfin_i2s_pcm, 2880 #endif 2881 2882 - #if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) 2883 &bfin_ac97_pcm, 2884 #endif 2885 2886 - #if defined(CONFIG_SND_BF5XX_SOC_AD1836) || \ 2887 - defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE) 2888 &bfin_ad1836_machine, 2889 #endif 2890 2891 - #if defined(CONFIG_SND_BF5XX_SOC_AD73311) || \ 2892 - defined(CONFIG_SND_BF5XX_SOC_AD73311_MODULE) 2893 &bfin_ad73311_machine, 2894 #endif 2895 2896 - #if defined(CONFIG_SND_SOC_AD73311) || defined(CONFIG_SND_SOC_AD73311_MODULE) 2897 &bfin_ad73311_codec_device, 2898 #endif 2899 2900 - #if defined(CONFIG_SND_BF5XX_SOC_I2S) || defined(CONFIG_SND_BF5XX_SOC_I2S_MODULE) 2901 &bfin_i2s, 2902 #endif 2903 2904 - #if defined(CONFIG_SND_BF5XX_SOC_AC97) || defined(CONFIG_SND_BF5XX_SOC_AC97_MODULE) 2905 &bfin_ac97, 2906 #endif 2907 2908 - #if defined(CONFIG_REGULATOR_AD5398) || defined(CONFIG_REGULATOR_AD5398_MODULE) 2909 - #if defined(CONFIG_REGULATOR_VIRTUAL_CONSUMER) || \ 2910 - defined(CONFIG_REGULATOR_VIRTUAL_CONSUMER_MODULE) 2911 &ad5398_virt_consumer_device, 2912 #endif 2913 - #if defined(CONFIG_REGULATOR_USERSPACE_CONSUMER) || \ 2914 - defined(CONFIG_REGULATOR_USERSPACE_CONSUMER_MODULE) 2915 &ad5398_userspace_consumer_device, 2916 #endif 2917 #endif 2918 2919 - #if defined(CONFIG_REGULATOR_FIXED_VOLTAGE) || defined(CONFIG_REGULATOR_FIXED_VOLTAGE_MODULE) 2920 &adp_switch_device, 2921 - #if defined(CONFIG_REGULATOR_USERSPACE_CONSUMER) || \ 2922 - defined(CONFIG_REGULATOR_USERSPACE_CONSUMER_MODULE) 2923 &adp122_userspace_consumer_device, 2924 #endif 2925 #endif 2926 2927 - #if defined(CONFIG_IIO_GPIO_TRIGGER) || \ 2928 - defined(CONFIG_IIO_GPIO_TRIGGER_MODULE) 2929 &iio_gpio_trigger, 2930 #endif 2931 2932 - #if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1373) || \ 2933 - defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1373_MODULE) 2934 &bf5xx_adau1373_device, 2935 #endif 2936 2937 - #if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1701) || \ 2938 - defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1701_MODULE) 2939 &bf5xx_adau1701_device, 2940 #endif 2941 2942 - #if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAV80X) || \ 2943 - defined(CONFIG_SND_SOC_BFIN_EVAL_ADAV80X_MODULE) 2944 &bfin_eval_adav801_device, 2945 #endif 2946 }; 2947 2948 static int __init net2272_init(void) 2949 { 2950 - #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 2951 int ret; 2952 2953 ret = gpio_request(GPIO_PF6, "net2272");
··· 18 #include <linux/mtd/physmap.h> 19 #include <linux/spi/spi.h> 20 #include <linux/spi/flash.h> 21 + #if IS_ENABLED(CONFIG_USB_ISP1362_HCD) 22 #include <linux/usb/isp1362.h> 23 #endif 24 #include <linux/i2c.h> ··· 53 * Driver needs to know address, irq and flag pin. 54 */ 55 56 + #if IS_ENABLED(CONFIG_USB_ISP1760_HCD) 57 #include <linux/usb/isp1760.h> 58 static struct resource bfin_isp1760_resources[] = { 59 [0] = { ··· 88 }; 89 #endif 90 91 + #if IS_ENABLED(CONFIG_KEYBOARD_GPIO) 92 #include <linux/gpio_keys.h> 93 94 static struct gpio_keys_button bfin_gpio_keys_table[] = { ··· 111 }; 112 #endif 113 114 + #if IS_ENABLED(CONFIG_BFIN_CFPCMCIA) 115 static struct resource bfin_pcmcia_cf_resources[] = { 116 { 117 .start = 0x20310000, /* IO PORT */ ··· 140 }; 141 #endif 142 143 + #if IS_ENABLED(CONFIG_RTC_DRV_BFIN) 144 static struct platform_device rtc_device = { 145 .name = "rtc-bfin", 146 .id = -1, 147 }; 148 #endif 149 150 + #if IS_ENABLED(CONFIG_SMC91X) 151 #include <linux/smc91x.h> 152 153 static struct smc91x_platdata smc91x_info = { ··· 180 }; 181 #endif 182 183 + #if IS_ENABLED(CONFIG_DM9000) 184 static struct resource dm9000_resources[] = { 185 [0] = { 186 .start = 0x203FB800, ··· 207 }; 208 #endif 209 210 + #if IS_ENABLED(CONFIG_USB_SL811_HCD) 211 static struct resource sl811_hcd_resources[] = { 212 { 213 .start = 0x20340000, ··· 251 }; 252 #endif 253 254 + #if IS_ENABLED(CONFIG_USB_ISP1362_HCD) 255 static struct resource isp1362_hcd_resources[] = { 256 { 257 .start = 0x20360000, ··· 290 }; 291 #endif 292 293 + #if IS_ENABLED(CONFIG_CAN_BFIN) 294 static unsigned short bfin_can_peripherals[] = { 295 P_CAN0_RX, P_CAN0_TX, 0 296 }; ··· 328 }; 329 #endif 330 331 + #if IS_ENABLED(CONFIG_BFIN_MAC) 332 #include <linux/bfin_mac.h> 333 static const unsigned short bfin_mac_peripherals[] = P_MII0; 334 ··· 361 }; 362 #endif 363 364 + #if IS_ENABLED(CONFIG_USB_NET2272) 365 static struct resource net2272_bfin_resources[] = { 366 { 367 .start = 0x20300000, ··· 385 }; 386 #endif 387 388 + #if IS_ENABLED(CONFIG_MTD_NAND_PLATFORM) 389 const char *part_probes[] = { "cmdlinepart", "RedBoot", NULL }; 390 391 static struct mtd_partition bfin_plat_nand_partitions[] = { ··· 461 static void bfin_plat_nand_init(void) {} 462 #endif 463 464 + #if IS_ENABLED(CONFIG_MTD_PHYSMAP) 465 static struct mtd_partition stamp_partitions[] = { 466 { 467 .name = "bootloader(nor)", ··· 509 }; 510 #endif 511 512 + #if IS_ENABLED(CONFIG_MTD_M25P80) 513 static struct mtd_partition bfin_spi_flash_partitions[] = { 514 { 515 .name = "bootloader(spi)", ··· 541 }; 542 #endif 543 544 + #if IS_ENABLED(CONFIG_INPUT_AD714X_SPI) 545 #include <linux/input/ad714x.h> 546 547 static struct ad714x_slider_plat ad7147_spi_slider_plat[] = { ··· 602 }; 603 #endif 604 605 + #if IS_ENABLED(CONFIG_INPUT_AD714X_I2C) 606 #include <linux/input/ad714x.h> 607 static struct ad714x_button_plat ad7142_i2c_button_plat[] = { 608 { ··· 649 }; 650 #endif 651 652 + #if IS_ENABLED(CONFIG_AD2S90) 653 static struct bfin5xx_spi_chip ad2s90_spi_chip_info = { 654 .enable_dma = 0, 655 }; 656 #endif 657 658 + #if IS_ENABLED(CONFIG_AD2S1200) 659 + static unsigned short ad2s1200_platform_data[] = { 660 /* used as SAMPLE and RDVEL */ 661 GPIO_PF5, GPIO_PF6, 0 662 }; 663 664 + static struct bfin5xx_spi_chip ad2s1200_spi_chip_info = { 665 .enable_dma = 0, 666 }; 667 #endif 668 669 + #if IS_ENABLED(CONFIG_AD2S1210) 670 static unsigned short ad2s1210_platform_data[] = { 671 /* use as SAMPLE, A0, A1 */ 672 GPIO_PF7, GPIO_PF8, GPIO_PF9, ··· 682 }; 683 #endif 684 685 + #if IS_ENABLED(CONFIG_SENSORS_AD7314) 686 static struct bfin5xx_spi_chip ad7314_spi_chip_info = { 687 .enable_dma = 0, 688 }; 689 #endif 690 691 + #if IS_ENABLED(CONFIG_AD7816) 692 static unsigned short ad7816_platform_data[] = { 693 GPIO_PF4, /* rdwr_pin */ 694 GPIO_PF5, /* convert_pin */ ··· 701 }; 702 #endif 703 704 + #if IS_ENABLED(CONFIG_ADT7310) 705 static unsigned long adt7310_platform_data[3] = { 706 /* INT bound temperature alarm event. line 1 */ 707 IRQ_PG4, IRQF_TRIGGER_LOW, ··· 714 }; 715 #endif 716 717 + #if IS_ENABLED(CONFIG_AD7298) 718 static unsigned short ad7298_platform_data[] = { 719 GPIO_PF7, /* busy_pin */ 720 0, 721 }; 722 #endif 723 724 + #if IS_ENABLED(CONFIG_ADT7316_SPI) 725 static unsigned long adt7316_spi_data[2] = { 726 IRQF_TRIGGER_LOW, /* interrupt flags */ 727 GPIO_PF7, /* ldac_pin, 0 means DAC/LDAC registers control DAC update */ ··· 732 }; 733 #endif 734 735 + #if IS_ENABLED(CONFIG_MMC_SPI) 736 #define MMC_SPI_CARD_DETECT_INT IRQ_PF5 737 738 static int bfin_mmc_spi_init(struct device *dev, ··· 759 }; 760 #endif 761 762 + #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877) 763 #include <linux/spi/ad7877.h> 764 static const struct ad7877_platform_data bfin_ad7877_ts_info = { 765 .model = 7877, ··· 776 }; 777 #endif 778 779 + #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7879) 780 #include <linux/spi/ad7879.h> 781 static const struct ad7879_platform_data bfin_ad7879_ts_info = { 782 .model = 7879, /* Model = AD7879 */ ··· 793 }; 794 #endif 795 796 + #if IS_ENABLED(CONFIG_INPUT_ADXL34X) 797 #include <linux/input/adxl34x.h> 798 static const struct adxl34x_platform_data adxl34x_info = { 799 .x_axis_offset = 0, ··· 832 }; 833 #endif 834 835 + #if IS_ENABLED(CONFIG_ENC28J60) 836 static struct bfin5xx_spi_chip enc28j60_spi_chip_info = { 837 .enable_dma = 1, 838 }; 839 #endif 840 841 + #if IS_ENABLED(CONFIG_ADF702X) 842 #include <linux/spi/adf702x.h> 843 #define TXREG 0x0160A470 844 static const u32 adf7021_regs[] = { ··· 880 static inline void adf702x_mac_init(void) {} 881 #endif 882 883 + #if IS_ENABLED(CONFIG_TOUCHSCREEN_ADS7846) 884 #include <linux/spi/ads7846.h> 885 static int ads7873_get_pendown_state(void) 886 { ··· 899 }; 900 #endif 901 902 + #if IS_ENABLED(CONFIG_MTD_DATAFLASH) 903 904 static struct mtd_partition bfin_spi_dataflash_partitions[] = { 905 { ··· 931 }; 932 #endif 933 934 + #if IS_ENABLED(CONFIG_AD7476) 935 static struct bfin5xx_spi_chip spi_ad7476_chip_info = { 936 .enable_dma = 0, /* use dma transfer with this chip*/ 937 }; 938 #endif 939 940 static struct spi_board_info bfin_spi_board_info[] __initdata = { 941 + #if IS_ENABLED(CONFIG_MTD_M25P80) 942 { 943 /* the modalias must be the same as spi device driver name */ 944 .modalias = "m25p80", /* Name of spi_driver for this device */ ··· 951 .mode = SPI_MODE_3, 952 }, 953 #endif 954 + #if IS_ENABLED(CONFIG_MTD_DATAFLASH) 955 { /* DataFlash chip */ 956 .modalias = "mtd_dataflash", 957 .max_speed_hz = 33250000, /* max spi clock (SCK) speed in HZ */ ··· 964 }, 965 #endif 966 967 + #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD1836) 968 { 969 .modalias = "ad1836", 970 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 986 }, 987 #endif 988 989 + #if IS_ENABLED(CONFIG_SND_SOC_ADAV80X) 990 { 991 .modalias = "adav801", 992 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 996 }, 997 #endif 998 999 + #if IS_ENABLED(CONFIG_INPUT_AD714X_SPI) 1000 { 1001 .modalias = "ad714x_captouch", 1002 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ ··· 1008 }, 1009 #endif 1010 1011 + #if IS_ENABLED(CONFIG_AD2S90) 1012 { 1013 .modalias = "ad2s90", 1014 .bus_num = 0, ··· 1019 }, 1020 #endif 1021 1022 + #if IS_ENABLED(CONFIG_AD2S1200) 1023 { 1024 + .modalias = "ad2s1200", 1025 .bus_num = 0, 1026 .chip_select = 4, /* CS, change it for your board */ 1027 + .platform_data = ad2s1200_platform_data, 1028 + .controller_data = &ad2s1200_spi_chip_info, 1029 }, 1030 #endif 1031 1032 + #if IS_ENABLED(CONFIG_AD2S1210) 1033 { 1034 .modalias = "ad2s1210", 1035 .max_speed_hz = 8192000, ··· 1040 }, 1041 #endif 1042 1043 + #if IS_ENABLED(CONFIG_SENSORS_AD7314) 1044 { 1045 .modalias = "ad7314", 1046 .max_speed_hz = 1000000, ··· 1051 }, 1052 #endif 1053 1054 + #if IS_ENABLED(CONFIG_AD7816) 1055 { 1056 .modalias = "ad7818", 1057 .max_speed_hz = 1000000, ··· 1063 }, 1064 #endif 1065 1066 + #if IS_ENABLED(CONFIG_ADT7310) 1067 { 1068 .modalias = "adt7310", 1069 .max_speed_hz = 1000000, ··· 1076 }, 1077 #endif 1078 1079 + #if IS_ENABLED(CONFIG_AD7298) 1080 { 1081 .modalias = "ad7298", 1082 .max_speed_hz = 1000000, ··· 1087 }, 1088 #endif 1089 1090 + #if IS_ENABLED(CONFIG_ADT7316_SPI) 1091 { 1092 .modalias = "adt7316", 1093 .max_speed_hz = 1000000, ··· 1100 }, 1101 #endif 1102 1103 + #if IS_ENABLED(CONFIG_MMC_SPI) 1104 { 1105 .modalias = "mmc_spi", 1106 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ ··· 1111 .mode = SPI_MODE_3, 1112 }, 1113 #endif 1114 + #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877) 1115 { 1116 .modalias = "ad7877", 1117 .platform_data = &bfin_ad7877_ts_info, ··· 1121 .chip_select = 1, 1122 }, 1123 #endif 1124 + #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7879_SPI) 1125 { 1126 .modalias = "ad7879", 1127 .platform_data = &bfin_ad7879_ts_info, ··· 1132 .mode = SPI_CPHA | SPI_CPOL, 1133 }, 1134 #endif 1135 + #if IS_ENABLED(CONFIG_SPI_SPIDEV) 1136 { 1137 .modalias = "spidev", 1138 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 1140 .chip_select = 1, 1141 }, 1142 #endif 1143 + #if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1) 1144 { 1145 .modalias = "bfin-lq035q1-spi", 1146 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ ··· 1149 .mode = SPI_CPHA | SPI_CPOL, 1150 }, 1151 #endif 1152 + #if IS_ENABLED(CONFIG_ENC28J60) 1153 { 1154 .modalias = "enc28j60", 1155 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ ··· 1160 .mode = SPI_MODE_0, 1161 }, 1162 #endif 1163 + #if IS_ENABLED(CONFIG_INPUT_ADXL34X_SPI) 1164 { 1165 .modalias = "adxl34x", 1166 .platform_data = &adxl34x_info, ··· 1171 .mode = SPI_MODE_3, 1172 }, 1173 #endif 1174 + #if IS_ENABLED(CONFIG_ADF702X) 1175 { 1176 .modalias = "adf702x", 1177 .max_speed_hz = 16000000, /* max spi clock (SCK) speed in HZ */ ··· 1181 .mode = SPI_MODE_0, 1182 }, 1183 #endif 1184 + #if IS_ENABLED(CONFIG_TOUCHSCREEN_ADS7846) 1185 { 1186 .modalias = "ads7846", 1187 .max_speed_hz = 2000000, /* max spi clock (SCK) speed in HZ */ ··· 1192 .mode = SPI_MODE_0, 1193 }, 1194 #endif 1195 + #if IS_ENABLED(CONFIG_AD7476) 1196 { 1197 .modalias = "ad7476", /* Name of spi_driver for this device */ 1198 .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */ ··· 1204 .mode = SPI_MODE_3, 1205 }, 1206 #endif 1207 + #if IS_ENABLED(CONFIG_ADE7753) 1208 { 1209 .modalias = "ade7753", 1210 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ ··· 1215 .mode = SPI_MODE_1, 1216 }, 1217 #endif 1218 + #if IS_ENABLED(CONFIG_ADE7754) 1219 { 1220 .modalias = "ade7754", 1221 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ ··· 1226 .mode = SPI_MODE_1, 1227 }, 1228 #endif 1229 + #if IS_ENABLED(CONFIG_ADE7758) 1230 { 1231 .modalias = "ade7758", 1232 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ ··· 1237 .mode = SPI_MODE_1, 1238 }, 1239 #endif 1240 + #if IS_ENABLED(CONFIG_ADE7759) 1241 { 1242 .modalias = "ade7759", 1243 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ ··· 1248 .mode = SPI_MODE_1, 1249 }, 1250 #endif 1251 + #if IS_ENABLED(CONFIG_ADE7854_SPI) 1252 { 1253 .modalias = "ade7854", 1254 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ ··· 1259 .mode = SPI_MODE_3, 1260 }, 1261 #endif 1262 + #if IS_ENABLED(CONFIG_ADIS16060) 1263 { 1264 .modalias = "adis16060_r", 1265 .max_speed_hz = 2900000, /* max spi clock (SCK) speed in HZ */ ··· 1278 .mode = SPI_MODE_1, 1279 }, 1280 #endif 1281 + #if IS_ENABLED(CONFIG_ADIS16130) 1282 { 1283 .modalias = "adis16130", 1284 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ ··· 1289 .mode = SPI_MODE_3, 1290 }, 1291 #endif 1292 + #if IS_ENABLED(CONFIG_ADIS16201) 1293 { 1294 .modalias = "adis16201", 1295 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ ··· 1301 .irq = IRQ_PF4, 1302 }, 1303 #endif 1304 + #if IS_ENABLED(CONFIG_ADIS16203) 1305 { 1306 .modalias = "adis16203", 1307 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ ··· 1313 .irq = IRQ_PF4, 1314 }, 1315 #endif 1316 + #if IS_ENABLED(CONFIG_ADIS16204) 1317 { 1318 .modalias = "adis16204", 1319 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ ··· 1325 .irq = IRQ_PF4, 1326 }, 1327 #endif 1328 + #if IS_ENABLED(CONFIG_ADIS16209) 1329 { 1330 .modalias = "adis16209", 1331 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ ··· 1337 .irq = IRQ_PF4, 1338 }, 1339 #endif 1340 + #if IS_ENABLED(CONFIG_ADIS16220) 1341 { 1342 .modalias = "adis16220", 1343 .max_speed_hz = 2000000, /* max spi clock (SCK) speed in HZ */ ··· 1349 .irq = IRQ_PF4, 1350 }, 1351 #endif 1352 + #if IS_ENABLED(CONFIG_ADIS16240) 1353 { 1354 .modalias = "adis16240", 1355 .max_speed_hz = 1500000, /* max spi clock (SCK) speed in HZ */ ··· 1361 .irq = IRQ_PF4, 1362 }, 1363 #endif 1364 + #if IS_ENABLED(CONFIG_ADIS16260) 1365 { 1366 .modalias = "adis16260", 1367 .max_speed_hz = 1500000, /* max spi clock (SCK) speed in HZ */ ··· 1373 .irq = IRQ_PF4, 1374 }, 1375 #endif 1376 + #if IS_ENABLED(CONFIG_ADIS16261) 1377 { 1378 .modalias = "adis16261", 1379 .max_speed_hz = 2500000, /* max spi clock (SCK) speed in HZ */ ··· 1384 .mode = SPI_MODE_3, 1385 }, 1386 #endif 1387 + #if IS_ENABLED(CONFIG_ADIS16300) 1388 { 1389 .modalias = "adis16300", 1390 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ ··· 1396 .irq = IRQ_PF4, 1397 }, 1398 #endif 1399 + #if IS_ENABLED(CONFIG_ADIS16350) 1400 { 1401 .modalias = "adis16364", 1402 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ ··· 1408 .irq = IRQ_PF4, 1409 }, 1410 #endif 1411 + #if IS_ENABLED(CONFIG_ADIS16400) 1412 { 1413 .modalias = "adis16400", 1414 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ ··· 1421 #endif 1422 }; 1423 1424 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 1425 /* SPI controller data */ 1426 static struct bfin5xx_spi_master bfin_spi0_info = { 1427 .num_chipselect = MAX_CTRL_CS + MAX_BLACKFIN_GPIOS, ··· 1459 }; 1460 #endif /* spi master and devices */ 1461 1462 + #if IS_ENABLED(CONFIG_SPI_BFIN_SPORT) 1463 1464 /* SPORT SPI controller data */ 1465 static struct bfin5xx_spi_master bfin_sport_spi0_info = { ··· 1524 1525 #endif /* sport spi master and devices */ 1526 1527 + #if IS_ENABLED(CONFIG_FB_BF537_LQ035) 1528 static struct platform_device bfin_fb_device = { 1529 .name = "bf537_lq035", 1530 }; 1531 #endif 1532 1533 + #if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1) 1534 #include <asm/bfin-lq035q1.h> 1535 1536 static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = { ··· 1559 }; 1560 #endif 1561 1562 + #if IS_ENABLED(CONFIG_VIDEO_BLACKFIN_CAPTURE) 1563 #include <linux/videodev2.h> 1564 #include <media/blackfin/bfin_capture.h> 1565 #include <media/blackfin/ppi.h> ··· 1580 .pin_req = ppi_req, 1581 }; 1582 1583 + #if IS_ENABLED(CONFIG_VIDEO_VS6624) 1584 static struct v4l2_input vs6624_inputs[] = { 1585 { 1586 .index = 0, ··· 1624 }; 1625 #endif 1626 1627 + #if IS_ENABLED(CONFIG_SERIAL_BFIN) 1628 #ifdef CONFIG_SERIAL_BFIN_UART0 1629 static struct resource bfin_uart0_resources[] = { 1630 { ··· 1735 #endif 1736 #endif 1737 1738 + #if IS_ENABLED(CONFIG_BFIN_SIR) 1739 #ifdef CONFIG_BFIN_SIR0 1740 static struct resource bfin_sir0_resources[] = { 1741 { ··· 1790 #endif 1791 #endif 1792 1793 + #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI) 1794 static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; 1795 1796 static struct resource bfin_twi0_resource[] = { ··· 1817 }; 1818 #endif 1819 1820 + #if IS_ENABLED(CONFIG_KEYBOARD_ADP5588) 1821 static const unsigned short adp5588_keymap[ADP5588_KEYMAPSIZE] = { 1822 [0] = KEY_GRAVE, 1823 [1] = KEY_1, ··· 1902 }; 1903 #endif 1904 1905 + #if IS_ENABLED(CONFIG_PMIC_ADP5520) 1906 #include <linux/mfd/adp5520.h> 1907 1908 /* ··· 2013 2014 #endif 2015 2016 + #if IS_ENABLED(CONFIG_GPIO_ADP5588) 2017 static struct adp5588_gpio_platform_data adp5588_gpio_data = { 2018 .gpio_start = 50, 2019 .pullup_dis_mask = 0, 2020 }; 2021 #endif 2022 2023 + #if IS_ENABLED(CONFIG_BACKLIGHT_ADP8870) 2024 #include <linux/i2c/adp8870.h> 2025 static struct led_info adp8870_leds[] = { 2026 { ··· 2072 }; 2073 #endif 2074 2075 + #if IS_ENABLED(CONFIG_BACKLIGHT_ADP8860) 2076 #include <linux/i2c/adp8860.h> 2077 static struct led_info adp8860_leds[] = { 2078 { ··· 2114 }; 2115 #endif 2116 2117 + #if IS_ENABLED(CONFIG_REGULATOR_AD5398) 2118 static struct regulator_consumer_supply ad5398_consumer = { 2119 .supply = "current", 2120 }; ··· 2129 .consumer_supplies = &ad5398_consumer, 2130 }; 2131 2132 + #if IS_ENABLED(CONFIG_REGULATOR_VIRTUAL_CONSUMER) 2133 static struct platform_device ad5398_virt_consumer_device = { 2134 .name = "reg-virt-consumer", 2135 .id = 0, ··· 2139 }, 2140 }; 2141 #endif 2142 + #if IS_ENABLED(CONFIG_REGULATOR_USERSPACE_CONSUMER) 2143 static struct regulator_bulk_data ad5398_bulk_data = { 2144 .supply = "current", 2145 }; ··· 2161 #endif 2162 #endif 2163 2164 + #if IS_ENABLED(CONFIG_ADT7410) 2165 /* INT bound temperature alarm event. line 1 */ 2166 static unsigned long adt7410_platform_data[2] = { 2167 IRQ_PG4, IRQF_TRIGGER_LOW, 2168 }; 2169 #endif 2170 2171 + #if IS_ENABLED(CONFIG_ADT7316_I2C) 2172 /* INT bound temperature alarm event. line 1 */ 2173 static unsigned long adt7316_i2c_data[2] = { 2174 IRQF_TRIGGER_LOW, /* interrupt flags */ ··· 2183 }, 2184 #endif 2185 2186 + #if IS_ENABLED(CONFIG_SND_SOC_ADAV80X) 2187 { 2188 I2C_BOARD_INFO("adav803", 0x10), 2189 }, 2190 #endif 2191 2192 + #if IS_ENABLED(CONFIG_INPUT_AD714X_I2C) 2193 { 2194 I2C_BOARD_INFO("ad7142_captouch", 0x2C), 2195 .irq = IRQ_PG5, ··· 2197 }, 2198 #endif 2199 2200 + #if IS_ENABLED(CONFIG_AD7150) 2201 { 2202 I2C_BOARD_INFO("ad7150", 0x48), 2203 .irq = IRQ_PG5, /* fixme: use real interrupt number */ 2204 }, 2205 #endif 2206 2207 + #if IS_ENABLED(CONFIG_AD7152) 2208 { 2209 I2C_BOARD_INFO("ad7152", 0x48), 2210 }, 2211 #endif 2212 2213 + #if IS_ENABLED(CONFIG_AD774X) 2214 { 2215 I2C_BOARD_INFO("ad774x", 0x48), 2216 }, 2217 #endif 2218 2219 + #if IS_ENABLED(CONFIG_ADE7854_I2C) 2220 { 2221 I2C_BOARD_INFO("ade7854", 0x38), 2222 }, 2223 #endif 2224 2225 + #if IS_ENABLED(CONFIG_SENSORS_LM75) 2226 { 2227 I2C_BOARD_INFO("adt75", 0x9), 2228 .irq = IRQ_PG5, 2229 }, 2230 #endif 2231 2232 + #if IS_ENABLED(CONFIG_ADT7410) 2233 { 2234 I2C_BOARD_INFO("adt7410", 0x48), 2235 /* CT critical temperature event. line 0 */ ··· 2238 }, 2239 #endif 2240 2241 + #if IS_ENABLED(CONFIG_AD7291) 2242 { 2243 I2C_BOARD_INFO("ad7291", 0x20), 2244 .irq = IRQ_PG5, 2245 }, 2246 #endif 2247 2248 + #if IS_ENABLED(CONFIG_ADT7316_I2C) 2249 { 2250 I2C_BOARD_INFO("adt7316", 0x48), 2251 .irq = IRQ_PG6, ··· 2253 }, 2254 #endif 2255 2256 + #if IS_ENABLED(CONFIG_BFIN_TWI_LCD) 2257 { 2258 I2C_BOARD_INFO("pcf8574_lcd", 0x22), 2259 }, 2260 #endif 2261 + #if IS_ENABLED(CONFIG_INPUT_PCF8574) 2262 { 2263 I2C_BOARD_INFO("pcf8574_keypad", 0x27), 2264 .irq = IRQ_PG6, 2265 }, 2266 #endif 2267 + #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7879_I2C) 2268 { 2269 I2C_BOARD_INFO("ad7879", 0x2F), 2270 .irq = IRQ_PG5, 2271 .platform_data = (void *)&bfin_ad7879_ts_info, 2272 }, 2273 #endif 2274 + #if IS_ENABLED(CONFIG_KEYBOARD_ADP5588) 2275 { 2276 I2C_BOARD_INFO("adp5588-keys", 0x34), 2277 .irq = IRQ_PG0, 2278 .platform_data = (void *)&adp5588_kpad_data, 2279 }, 2280 #endif 2281 + #if IS_ENABLED(CONFIG_PMIC_ADP5520) 2282 { 2283 I2C_BOARD_INFO("pmic-adp5520", 0x32), 2284 .irq = IRQ_PG0, 2285 .platform_data = (void *)&adp5520_pdev_data, 2286 }, 2287 #endif 2288 + #if IS_ENABLED(CONFIG_INPUT_ADXL34X_I2C) 2289 { 2290 I2C_BOARD_INFO("adxl34x", 0x53), 2291 .irq = IRQ_PG3, 2292 .platform_data = (void *)&adxl34x_info, 2293 }, 2294 #endif 2295 + #if IS_ENABLED(CONFIG_GPIO_ADP5588) 2296 { 2297 I2C_BOARD_INFO("adp5588-gpio", 0x34), 2298 .platform_data = (void *)&adp5588_gpio_data, 2299 }, 2300 #endif 2301 + #if IS_ENABLED(CONFIG_FB_BFIN_7393) 2302 { 2303 I2C_BOARD_INFO("bfin-adv7393", 0x2B), 2304 }, 2305 #endif 2306 + #if IS_ENABLED(CONFIG_FB_BF537_LQ035) 2307 { 2308 I2C_BOARD_INFO("bf537-lq035-ad5280", 0x2F), 2309 }, 2310 #endif 2311 + #if IS_ENABLED(CONFIG_BACKLIGHT_ADP8870) 2312 { 2313 I2C_BOARD_INFO("adp8870", 0x2B), 2314 .platform_data = (void *)&adp8870_pdata, 2315 }, 2316 #endif 2317 + #if IS_ENABLED(CONFIG_SND_SOC_ADAU1371) 2318 { 2319 I2C_BOARD_INFO("adau1371", 0x1A), 2320 }, 2321 #endif 2322 + #if IS_ENABLED(CONFIG_SND_SOC_ADAU1761) 2323 { 2324 I2C_BOARD_INFO("adau1761", 0x38), 2325 }, 2326 #endif 2327 + #if IS_ENABLED(CONFIG_SND_SOC_ADAU1361) 2328 { 2329 I2C_BOARD_INFO("adau1361", 0x38), 2330 }, 2331 #endif 2332 + #if IS_ENABLED(CONFIG_SND_SOC_ADAU1701) 2333 { 2334 I2C_BOARD_INFO("adau1701", 0x34), 2335 }, 2336 #endif 2337 + #if IS_ENABLED(CONFIG_AD525X_DPOT) 2338 { 2339 I2C_BOARD_INFO("ad5258", 0x18), 2340 }, 2341 #endif 2342 + #if IS_ENABLED(CONFIG_SND_SOC_SSM2602) 2343 { 2344 I2C_BOARD_INFO("ssm2602", 0x1b), 2345 }, 2346 #endif 2347 + #if IS_ENABLED(CONFIG_REGULATOR_AD5398) 2348 { 2349 I2C_BOARD_INFO("ad5398", 0xC), 2350 .platform_data = (void *)&ad5398_regulator_data, 2351 }, 2352 #endif 2353 + #if IS_ENABLED(CONFIG_BACKLIGHT_ADP8860) 2354 { 2355 I2C_BOARD_INFO("adp8860", 0x2A), 2356 .platform_data = (void *)&adp8860_pdata, 2357 }, 2358 #endif 2359 + #if IS_ENABLED(CONFIG_SND_SOC_ADAU1373) 2360 { 2361 I2C_BOARD_INFO("adau1373", 0x1A), 2362 }, 2363 #endif 2364 + #if IS_ENABLED(CONFIG_BFIN_TWI_LCD) 2365 { 2366 I2C_BOARD_INFO("ad5252", 0x2e), 2367 }, 2368 #endif 2369 }; 2370 + #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT) \ 2371 + || IS_ENABLED(CONFIG_BFIN_SPORT) 2372 unsigned short bfin_sport0_peripherals[] = { 2373 P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS, 2374 P_SPORT0_DRPRI, P_SPORT0_RSCLK, P_SPORT0_DRSEC, P_SPORT0_DTSEC, 0 2375 }; 2376 #endif 2377 + #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT) 2378 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 2379 static struct resource bfin_sport0_uart_resources[] = { 2380 { ··· 2439 }; 2440 #endif 2441 #endif 2442 + #if IS_ENABLED(CONFIG_BFIN_SPORT) 2443 static struct resource bfin_sport0_resources[] = { 2444 { 2445 .start = SPORT0_TCR1, ··· 2482 }, 2483 }; 2484 #endif 2485 + #if IS_ENABLED(CONFIG_PATA_PLATFORM) 2486 #define CF_IDE_NAND_CARD_USE_HDD_INTERFACE 2487 /* #define CF_IDE_NAND_CARD_USE_CF_IN_COMMON_MEMORY_MODE */ 2488 ··· 2569 }, 2570 }; 2571 2572 + #if IS_ENABLED(CONFIG_SND_BF5XX_I2S) || \ 2573 + IS_ENABLED(CONFIG_SND_BF5XX_AC97) 2574 2575 #define SPORT_REQ(x) \ 2576 [x] = {P_SPORT##x##_TFS, P_SPORT##x##_DTPRI, P_SPORT##x##_TSCLK, \ ··· 2620 }; 2621 #endif 2622 2623 + #if IS_ENABLED(CONFIG_SND_BF5XX_I2S) 2624 static struct platform_device bfin_i2s_pcm = { 2625 .name = "bfin-i2s-pcm-audio", 2626 .id = -1, 2627 }; 2628 #endif 2629 2630 + #if IS_ENABLED(CONFIG_SND_BF5XX_AC97) 2631 static struct platform_device bfin_ac97_pcm = { 2632 .name = "bfin-ac97-pcm-audio", 2633 .id = -1, 2634 }; 2635 #endif 2636 2637 + #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD1836) 2638 static const char * const ad1836_link[] = { 2639 "bfin-i2s.0", 2640 "spi0.4", ··· 2649 }; 2650 #endif 2651 2652 + #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD73311) 2653 static const unsigned ad73311_gpio[] = { 2654 GPIO_PF4, 2655 }; ··· 2664 }; 2665 #endif 2666 2667 + #if IS_ENABLED(CONFIG_SND_SOC_AD73311) 2668 static struct platform_device bfin_ad73311_codec_device = { 2669 .name = "ad73311", 2670 .id = -1, 2671 }; 2672 #endif 2673 2674 + #if IS_ENABLED(CONFIG_SND_SOC_BFIN_EVAL_ADAV80X) 2675 static struct platform_device bfin_eval_adav801_device = { 2676 .name = "bfin-eval-adav801", 2677 .id = -1, 2678 }; 2679 #endif 2680 2681 + #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_I2S) 2682 static struct platform_device bfin_i2s = { 2683 .name = "bfin-i2s", 2684 .id = CONFIG_SND_BF5XX_SPORT_NUM, ··· 2691 }; 2692 #endif 2693 2694 + #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AC97) 2695 static struct platform_device bfin_ac97 = { 2696 .name = "bfin-ac97", 2697 .id = CONFIG_SND_BF5XX_SPORT_NUM, ··· 2703 }; 2704 #endif 2705 2706 + #if IS_ENABLED(CONFIG_REGULATOR_FIXED_VOLTAGE) 2707 #define REGULATOR_ADP122 "adp122" 2708 #define REGULATOR_ADP122_UV 2500000 2709 ··· 2741 }, 2742 }; 2743 2744 + #if IS_ENABLED(CONFIG_REGULATOR_USERSPACE_CONSUMER) 2745 static struct regulator_bulk_data adp122_bulk_data = { 2746 .supply = REGULATOR_ADP122, 2747 }; ··· 2763 #endif 2764 #endif 2765 2766 + #if IS_ENABLED(CONFIG_IIO_GPIO_TRIGGER) 2767 2768 static struct resource iio_gpio_trigger_resources[] = { 2769 [0] = { ··· 2781 }; 2782 #endif 2783 2784 + #if IS_ENABLED(CONFIG_SND_SOC_BFIN_EVAL_ADAU1373) 2785 static struct platform_device bf5xx_adau1373_device = { 2786 .name = "bfin-eval-adau1373", 2787 }; 2788 #endif 2789 2790 + #if IS_ENABLED(CONFIG_SND_SOC_BFIN_EVAL_ADAU1701) 2791 static struct platform_device bf5xx_adau1701_device = { 2792 .name = "bfin-eval-adau1701", 2793 }; ··· 2798 static struct platform_device *stamp_devices[] __initdata = { 2799 2800 &bfin_dpmc, 2801 + #if IS_ENABLED(CONFIG_BFIN_SPORT) 2802 &bfin_sport0_device, 2803 #endif 2804 + #if IS_ENABLED(CONFIG_BFIN_CFPCMCIA) 2805 &bfin_pcmcia_cf_device, 2806 #endif 2807 2808 + #if IS_ENABLED(CONFIG_RTC_DRV_BFIN) 2809 &rtc_device, 2810 #endif 2811 2812 + #if IS_ENABLED(CONFIG_USB_SL811_HCD) 2813 &sl811_hcd_device, 2814 #endif 2815 2816 + #if IS_ENABLED(CONFIG_USB_ISP1362_HCD) 2817 &isp1362_hcd_device, 2818 #endif 2819 2820 + #if IS_ENABLED(CONFIG_USB_ISP1760_HCD) 2821 &bfin_isp1760_device, 2822 #endif 2823 2824 + #if IS_ENABLED(CONFIG_SMC91X) 2825 &smc91x_device, 2826 #endif 2827 2828 + #if IS_ENABLED(CONFIG_DM9000) 2829 &dm9000_device, 2830 #endif 2831 2832 + #if IS_ENABLED(CONFIG_CAN_BFIN) 2833 &bfin_can_device, 2834 #endif 2835 2836 + #if IS_ENABLED(CONFIG_BFIN_MAC) 2837 &bfin_mii_bus, 2838 &bfin_mac_device, 2839 #endif 2840 2841 + #if IS_ENABLED(CONFIG_USB_NET2272) 2842 &net2272_bfin_device, 2843 #endif 2844 2845 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 2846 &bfin_spi0_device, 2847 #endif 2848 2849 + #if IS_ENABLED(CONFIG_SPI_BFIN_SPORT) 2850 &bfin_sport_spi0_device, 2851 &bfin_sport_spi1_device, 2852 #endif 2853 2854 + #if IS_ENABLED(CONFIG_FB_BF537_LQ035) 2855 &bfin_fb_device, 2856 #endif 2857 2858 + #if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1) 2859 &bfin_lq035q1_device, 2860 #endif 2861 2862 + #if IS_ENABLED(CONFIG_VIDEO_BLACKFIN_CAPTURE) 2863 &bfin_capture_device, 2864 #endif 2865 2866 + #if IS_ENABLED(CONFIG_SERIAL_BFIN) 2867 #ifdef CONFIG_SERIAL_BFIN_UART0 2868 &bfin_uart0_device, 2869 #endif ··· 2873 #endif 2874 #endif 2875 2876 + #if IS_ENABLED(CONFIG_BFIN_SIR) 2877 #ifdef CONFIG_BFIN_SIR0 2878 &bfin_sir0_device, 2879 #endif ··· 2882 #endif 2883 #endif 2884 2885 + #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI) 2886 &i2c_bfin_twi_device, 2887 #endif 2888 2889 + #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT) 2890 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 2891 &bfin_sport0_uart_device, 2892 #endif ··· 2895 #endif 2896 #endif 2897 2898 + #if IS_ENABLED(CONFIG_PATA_PLATFORM) 2899 &bfin_pata_device, 2900 #endif 2901 2902 + #if IS_ENABLED(CONFIG_KEYBOARD_GPIO) 2903 &bfin_device_gpiokeys, 2904 #endif 2905 2906 + #if IS_ENABLED(CONFIG_MTD_NAND_PLATFORM) 2907 &bfin_async_nand_device, 2908 #endif 2909 2910 + #if IS_ENABLED(CONFIG_MTD_PHYSMAP) 2911 &stamp_flash_device, 2912 #endif 2913 2914 + #if IS_ENABLED(CONFIG_SND_BF5XX_I2S) 2915 &bfin_i2s_pcm, 2916 #endif 2917 2918 + #if IS_ENABLED(CONFIG_SND_BF5XX_AC97) 2919 &bfin_ac97_pcm, 2920 #endif 2921 2922 + #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD1836) 2923 &bfin_ad1836_machine, 2924 #endif 2925 2926 + #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD73311) 2927 &bfin_ad73311_machine, 2928 #endif 2929 2930 + #if IS_ENABLED(CONFIG_SND_SOC_AD73311) 2931 &bfin_ad73311_codec_device, 2932 #endif 2933 2934 + #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_I2S) 2935 &bfin_i2s, 2936 #endif 2937 2938 + #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AC97) 2939 &bfin_ac97, 2940 #endif 2941 2942 + #if IS_ENABLED(CONFIG_REGULATOR_AD5398) 2943 + #if IS_ENABLED(CONFIG_REGULATOR_VIRTUAL_CONSUMER) 2944 &ad5398_virt_consumer_device, 2945 #endif 2946 + #if IS_ENABLED(CONFIG_REGULATOR_USERSPACE_CONSUMER) 2947 &ad5398_userspace_consumer_device, 2948 #endif 2949 #endif 2950 2951 + #if IS_ENABLED(CONFIG_REGULATOR_FIXED_VOLTAGE) 2952 &adp_switch_device, 2953 + #if IS_ENABLED(CONFIG_REGULATOR_USERSPACE_CONSUMER) 2954 &adp122_userspace_consumer_device, 2955 #endif 2956 #endif 2957 2958 + #if IS_ENABLED(CONFIG_IIO_GPIO_TRIGGER) 2959 &iio_gpio_trigger, 2960 #endif 2961 2962 + #if IS_ENABLED(CONFIG_SND_SOC_BFIN_EVAL_ADAU1373) 2963 &bf5xx_adau1373_device, 2964 #endif 2965 2966 + #if IS_ENABLED(CONFIG_SND_SOC_BFIN_EVAL_ADAU1701) 2967 &bf5xx_adau1701_device, 2968 #endif 2969 2970 + #if IS_ENABLED(CONFIG_SND_SOC_BFIN_EVAL_ADAV80X) 2971 &bfin_eval_adav801_device, 2972 #endif 2973 }; 2974 2975 static int __init net2272_init(void) 2976 { 2977 + #if IS_ENABLED(CONFIG_USB_NET2272) 2978 int ret; 2979 2980 ret = gpio_request(GPIO_PF6, "net2272");
+35 -35
arch/blackfin/mach-bf537/boards/tcm_bf537.c
··· 16 #include <linux/mtd/physmap.h> 17 #include <linux/spi/spi.h> 18 #include <linux/spi/flash.h> 19 - #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 20 #include <linux/usb/isp1362.h> 21 #endif 22 #include <linux/ata_platform.h> ··· 32 */ 33 const char bfin_board_name[] = "Bluetechnix TCM BF537"; 34 35 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 36 /* all SPI peripherals info goes here */ 37 38 - #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) 39 static struct mtd_partition bfin_spi_flash_partitions[] = { 40 { 41 .name = "bootloader(spi)", ··· 66 }; 67 #endif 68 69 - #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 70 static struct bfin5xx_spi_chip mmc_spi_chip_info = { 71 .enable_dma = 0, 72 }; 73 #endif 74 75 static struct spi_board_info bfin_spi_board_info[] __initdata = { 76 - #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) 77 { 78 /* the modalias must be the same as spi device driver name */ 79 .modalias = "m25p80", /* Name of spi_driver for this device */ ··· 86 }, 87 #endif 88 89 - #if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) 90 { 91 .modalias = "ad183x", 92 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 95 }, 96 #endif 97 98 - #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 99 { 100 .modalias = "mmc_spi", 101 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ ··· 144 }; 145 #endif /* spi master and devices */ 146 147 - #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 148 static struct platform_device rtc_device = { 149 .name = "rtc-bfin", 150 .id = -1, 151 }; 152 #endif 153 154 - #if defined(CONFIG_FB_HITACHI_TX09) || defined(CONFIG_FB_HITACHI_TX09_MODULE) 155 static struct platform_device hitachi_fb_device = { 156 .name = "hitachi-tx09", 157 }; 158 #endif 159 160 - #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 161 #include <linux/smc91x.h> 162 163 static struct smc91x_platdata smc91x_info = { ··· 189 }; 190 #endif 191 192 - #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 193 static struct resource isp1362_hcd_resources[] = { 194 { 195 .start = 0x20308000, ··· 228 }; 229 #endif 230 231 - #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 232 static struct resource net2272_bfin_resources[] = { 233 { 234 .start = 0x20300000, ··· 249 }; 250 #endif 251 252 - #if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE) 253 static struct mtd_partition cm_partitions[] = { 254 { 255 .name = "bootloader(nor)", ··· 298 }; 299 #endif 300 301 - #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 302 #ifdef CONFIG_SERIAL_BFIN_UART0 303 static struct resource bfin_uart0_resources[] = { 304 { ··· 397 #endif 398 #endif 399 400 - #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 401 #ifdef CONFIG_BFIN_SIR0 402 static struct resource bfin_sir0_resources[] = { 403 { ··· 452 #endif 453 #endif 454 455 - #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 456 static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; 457 458 static struct resource bfin_twi0_resource[] = { ··· 479 }; 480 #endif 481 482 - #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 483 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 484 static struct resource bfin_sport0_uart_resources[] = { 485 { ··· 550 #endif 551 #endif 552 553 - #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 554 #include <linux/bfin_mac.h> 555 static const unsigned short bfin_mac_peripherals[] = P_MII0; 556 ··· 583 }; 584 #endif 585 586 - #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 587 #define PATA_INT IRQ_PF14 588 589 static struct pata_platform_info bfin_pata_platform_data = { ··· 651 652 &bfin_dpmc, 653 654 - #if defined(CONFIG_FB_HITACHI_TX09) || defined(CONFIG_FB_HITACHI_TX09_MODULE) 655 &hitachi_fb_device, 656 #endif 657 658 - #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 659 &rtc_device, 660 #endif 661 662 - #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 663 #ifdef CONFIG_SERIAL_BFIN_UART0 664 &bfin_uart0_device, 665 #endif ··· 668 #endif 669 #endif 670 671 - #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 672 #ifdef CONFIG_BFIN_SIR0 673 &bfin_sir0_device, 674 #endif ··· 677 #endif 678 #endif 679 680 - #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 681 &i2c_bfin_twi_device, 682 #endif 683 684 - #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 685 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 686 &bfin_sport0_uart_device, 687 #endif ··· 690 #endif 691 #endif 692 693 - #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 694 &isp1362_hcd_device, 695 #endif 696 697 - #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 698 &smc91x_device, 699 #endif 700 701 - #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 702 &bfin_mii_bus, 703 &bfin_mac_device, 704 #endif 705 706 - #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 707 &net2272_bfin_device, 708 #endif 709 710 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 711 &bfin_spi0_device, 712 #endif 713 714 - #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 715 &bfin_pata_device, 716 #endif 717 718 - #if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE) 719 &cm_flash_device, 720 #endif 721 }; 722 723 static int __init net2272_init(void) 724 { 725 - #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 726 int ret; 727 728 ret = gpio_request(GPIO_PG14, "net2272"); ··· 742 { 743 printk(KERN_INFO "%s(): registering device resources\n", __func__); 744 platform_add_devices(cm_bf537_devices, ARRAY_SIZE(cm_bf537_devices)); 745 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 746 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 747 #endif 748 749 - #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 750 irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN); 751 #endif 752
··· 16 #include <linux/mtd/physmap.h> 17 #include <linux/spi/spi.h> 18 #include <linux/spi/flash.h> 19 + #if IS_ENABLED(CONFIG_USB_ISP1362_HCD) 20 #include <linux/usb/isp1362.h> 21 #endif 22 #include <linux/ata_platform.h> ··· 32 */ 33 const char bfin_board_name[] = "Bluetechnix TCM BF537"; 34 35 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 36 /* all SPI peripherals info goes here */ 37 38 + #if IS_ENABLED(CONFIG_MTD_M25P80) 39 static struct mtd_partition bfin_spi_flash_partitions[] = { 40 { 41 .name = "bootloader(spi)", ··· 66 }; 67 #endif 68 69 + #if IS_ENABLED(CONFIG_MMC_SPI) 70 static struct bfin5xx_spi_chip mmc_spi_chip_info = { 71 .enable_dma = 0, 72 }; 73 #endif 74 75 static struct spi_board_info bfin_spi_board_info[] __initdata = { 76 + #if IS_ENABLED(CONFIG_MTD_M25P80) 77 { 78 /* the modalias must be the same as spi device driver name */ 79 .modalias = "m25p80", /* Name of spi_driver for this device */ ··· 86 }, 87 #endif 88 89 + #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD183X) 90 { 91 .modalias = "ad183x", 92 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 95 }, 96 #endif 97 98 + #if IS_ENABLED(CONFIG_MMC_SPI) 99 { 100 .modalias = "mmc_spi", 101 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ ··· 144 }; 145 #endif /* spi master and devices */ 146 147 + #if IS_ENABLED(CONFIG_RTC_DRV_BFIN) 148 static struct platform_device rtc_device = { 149 .name = "rtc-bfin", 150 .id = -1, 151 }; 152 #endif 153 154 + #if IS_ENABLED(CONFIG_FB_HITACHI_TX09) 155 static struct platform_device hitachi_fb_device = { 156 .name = "hitachi-tx09", 157 }; 158 #endif 159 160 + #if IS_ENABLED(CONFIG_SMC91X) 161 #include <linux/smc91x.h> 162 163 static struct smc91x_platdata smc91x_info = { ··· 189 }; 190 #endif 191 192 + #if IS_ENABLED(CONFIG_USB_ISP1362_HCD) 193 static struct resource isp1362_hcd_resources[] = { 194 { 195 .start = 0x20308000, ··· 228 }; 229 #endif 230 231 + #if IS_ENABLED(CONFIG_USB_NET2272) 232 static struct resource net2272_bfin_resources[] = { 233 { 234 .start = 0x20300000, ··· 249 }; 250 #endif 251 252 + #if IS_ENABLED(CONFIG_MTD_GPIO_ADDR) 253 static struct mtd_partition cm_partitions[] = { 254 { 255 .name = "bootloader(nor)", ··· 298 }; 299 #endif 300 301 + #if IS_ENABLED(CONFIG_SERIAL_BFIN) 302 #ifdef CONFIG_SERIAL_BFIN_UART0 303 static struct resource bfin_uart0_resources[] = { 304 { ··· 397 #endif 398 #endif 399 400 + #if IS_ENABLED(CONFIG_BFIN_SIR) 401 #ifdef CONFIG_BFIN_SIR0 402 static struct resource bfin_sir0_resources[] = { 403 { ··· 452 #endif 453 #endif 454 455 + #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI) 456 static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; 457 458 static struct resource bfin_twi0_resource[] = { ··· 479 }; 480 #endif 481 482 + #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT) 483 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 484 static struct resource bfin_sport0_uart_resources[] = { 485 { ··· 550 #endif 551 #endif 552 553 + #if IS_ENABLED(CONFIG_BFIN_MAC) 554 #include <linux/bfin_mac.h> 555 static const unsigned short bfin_mac_peripherals[] = P_MII0; 556 ··· 583 }; 584 #endif 585 586 + #if IS_ENABLED(CONFIG_PATA_PLATFORM) 587 #define PATA_INT IRQ_PF14 588 589 static struct pata_platform_info bfin_pata_platform_data = { ··· 651 652 &bfin_dpmc, 653 654 + #if IS_ENABLED(CONFIG_FB_HITACHI_TX09) 655 &hitachi_fb_device, 656 #endif 657 658 + #if IS_ENABLED(CONFIG_RTC_DRV_BFIN) 659 &rtc_device, 660 #endif 661 662 + #if IS_ENABLED(CONFIG_SERIAL_BFIN) 663 #ifdef CONFIG_SERIAL_BFIN_UART0 664 &bfin_uart0_device, 665 #endif ··· 668 #endif 669 #endif 670 671 + #if IS_ENABLED(CONFIG_BFIN_SIR) 672 #ifdef CONFIG_BFIN_SIR0 673 &bfin_sir0_device, 674 #endif ··· 677 #endif 678 #endif 679 680 + #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI) 681 &i2c_bfin_twi_device, 682 #endif 683 684 + #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT) 685 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 686 &bfin_sport0_uart_device, 687 #endif ··· 690 #endif 691 #endif 692 693 + #if IS_ENABLED(CONFIG_USB_ISP1362_HCD) 694 &isp1362_hcd_device, 695 #endif 696 697 + #if IS_ENABLED(CONFIG_SMC91X) 698 &smc91x_device, 699 #endif 700 701 + #if IS_ENABLED(CONFIG_BFIN_MAC) 702 &bfin_mii_bus, 703 &bfin_mac_device, 704 #endif 705 706 + #if IS_ENABLED(CONFIG_USB_NET2272) 707 &net2272_bfin_device, 708 #endif 709 710 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 711 &bfin_spi0_device, 712 #endif 713 714 + #if IS_ENABLED(CONFIG_PATA_PLATFORM) 715 &bfin_pata_device, 716 #endif 717 718 + #if IS_ENABLED(CONFIG_MTD_GPIO_ADDR) 719 &cm_flash_device, 720 #endif 721 }; 722 723 static int __init net2272_init(void) 724 { 725 + #if IS_ENABLED(CONFIG_USB_NET2272) 726 int ret; 727 728 ret = gpio_request(GPIO_PG14, "net2272"); ··· 742 { 743 printk(KERN_INFO "%s(): registering device resources\n", __func__); 744 platform_add_devices(cm_bf537_devices, ARRAY_SIZE(cm_bf537_devices)); 745 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 746 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 747 #endif 748 749 + #if IS_ENABLED(CONFIG_PATA_PLATFORM) 750 irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN); 751 #endif 752
+30 -32
arch/blackfin/mach-bf538/boards/ezkit.c
··· 33 */ 34 35 36 - #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 37 static struct platform_device rtc_device = { 38 .name = "rtc-bfin", 39 .id = -1, 40 }; 41 #endif /* CONFIG_RTC_DRV_BFIN */ 42 43 - #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 44 #ifdef CONFIG_SERIAL_BFIN_UART0 45 static struct resource bfin_uart0_resources[] = { 46 { ··· 199 #endif /* CONFIG_SERIAL_BFIN_UART2 */ 200 #endif /* CONFIG_SERIAL_BFIN */ 201 202 - #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 203 #ifdef CONFIG_BFIN_SIR0 204 static struct resource bfin_sir0_resources[] = { 205 { ··· 277 #endif /* CONFIG_BFIN_SIR2 */ 278 #endif /* CONFIG_BFIN_SIR */ 279 280 - #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 281 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 282 static struct resource bfin_sport0_uart_resources[] = { 283 { ··· 416 #endif /* CONFIG_SERIAL_BFIN_SPORT3_UART */ 417 #endif /* CONFIG_SERIAL_BFIN_SPORT */ 418 419 - #if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) 420 static unsigned short bfin_can_peripherals[] = { 421 P_CAN0_RX, P_CAN0_TX, 0 422 }; ··· 458 * USB-LAN EzExtender board 459 * Driver needs to know address, irq and flag pin. 460 */ 461 - #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 462 #include <linux/smc91x.h> 463 464 static struct smc91x_platdata smc91x_info = { ··· 490 }; 491 #endif /* CONFIG_SMC91X */ 492 493 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 494 /* all SPI peripherals info goes here */ 495 - #if defined(CONFIG_MTD_M25P80) \ 496 - || defined(CONFIG_MTD_M25P80_MODULE) 497 /* SPI flash chip (m25p16) */ 498 static struct mtd_partition bfin_spi_flash_partitions[] = { 499 { ··· 520 #endif /* CONFIG_MTD_M25P80 */ 521 #endif /* CONFIG_SPI_BFIN5XX */ 522 523 - #if defined(CONFIG_TOUCHSCREEN_AD7879) || defined(CONFIG_TOUCHSCREEN_AD7879_MODULE) 524 #include <linux/spi/ad7879.h> 525 static const struct ad7879_platform_data bfin_ad7879_ts_info = { 526 .model = 7879, /* Model = AD7879 */ ··· 537 }; 538 #endif /* CONFIG_TOUCHSCREEN_AD7879 */ 539 540 - #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) 541 #include <asm/bfin-lq035q1.h> 542 543 static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = { ··· 567 #endif /* CONFIG_FB_BFIN_LQ035Q1 */ 568 569 static struct spi_board_info bf538_spi_board_info[] __initdata = { 570 - #if defined(CONFIG_MTD_M25P80) \ 571 - || defined(CONFIG_MTD_M25P80_MODULE) 572 { 573 /* the modalias must be the same as spi device driver name */ 574 .modalias = "m25p80", /* Name of spi_driver for this device */ ··· 579 .mode = SPI_MODE_3, 580 }, 581 #endif /* CONFIG_MTD_M25P80 */ 582 - #if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE) 583 { 584 .modalias = "ad7879", 585 .platform_data = &bfin_ad7879_ts_info, ··· 590 .mode = SPI_CPHA | SPI_CPOL, 591 }, 592 #endif /* CONFIG_TOUCHSCREEN_AD7879_SPI */ 593 - #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) 594 { 595 .modalias = "bfin-lq035q1-spi", 596 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ ··· 599 .mode = SPI_CPHA | SPI_CPOL, 600 }, 601 #endif /* CONFIG_FB_BFIN_LQ035Q1 */ 602 - #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 603 { 604 .modalias = "spidev", 605 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 715 }, 716 }; 717 718 - #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 719 static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; 720 721 static struct resource bfin_twi0_resource[] = { ··· 764 }; 765 #endif /* CONFIG_I2C_BLACKFIN_TWI */ 766 767 - #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 768 #include <linux/gpio_keys.h> 769 770 static struct gpio_keys_button bfin_gpio_keys_table[] = { ··· 812 }, 813 }; 814 815 - #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 816 static struct mtd_partition ezkit_partitions[] = { 817 { 818 .name = "bootloader(nor)", ··· 837 838 static struct resource ezkit_flash_resource = { 839 .start = 0x20000000, 840 - #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 841 .end = 0x202fffff, 842 #else 843 .end = 0x203fffff, ··· 860 861 &bfin_dpmc, 862 863 - #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 864 &rtc_device, 865 #endif 866 867 - #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 868 #ifdef CONFIG_SERIAL_BFIN_UART0 869 &bfin_uart0_device, 870 #endif ··· 876 #endif 877 #endif 878 879 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 880 &bf538_spi_master0, 881 &bf538_spi_master1, 882 &bf538_spi_master2, 883 #endif 884 885 - #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 886 &i2c_bfin_twi0_device, 887 &i2c_bfin_twi1_device, 888 #endif 889 890 - #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 891 #ifdef CONFIG_BFIN_SIR0 892 &bfin_sir0_device, 893 #endif ··· 899 #endif 900 #endif 901 902 - #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 903 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 904 &bfin_sport0_uart_device, 905 #endif ··· 914 #endif 915 #endif 916 917 - #if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) 918 &bfin_can_device, 919 #endif 920 921 - #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 922 &smc91x_device, 923 #endif 924 925 - #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) 926 &bfin_lq035q1_device, 927 #endif 928 929 - #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 930 &bfin_device_gpiokeys, 931 #endif 932 933 - #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 934 &ezkit_flash_device, 935 #endif 936 }; ··· 940 printk(KERN_INFO "%s(): registering device resources\n", __func__); 941 platform_add_devices(cm_bf538_devices, ARRAY_SIZE(cm_bf538_devices)); 942 943 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 944 spi_register_board_info(bf538_spi_board_info, 945 ARRAY_SIZE(bf538_spi_board_info)); 946 #endif
··· 33 */ 34 35 36 + #if IS_ENABLED(CONFIG_RTC_DRV_BFIN) 37 static struct platform_device rtc_device = { 38 .name = "rtc-bfin", 39 .id = -1, 40 }; 41 #endif /* CONFIG_RTC_DRV_BFIN */ 42 43 + #if IS_ENABLED(CONFIG_SERIAL_BFIN) 44 #ifdef CONFIG_SERIAL_BFIN_UART0 45 static struct resource bfin_uart0_resources[] = { 46 { ··· 199 #endif /* CONFIG_SERIAL_BFIN_UART2 */ 200 #endif /* CONFIG_SERIAL_BFIN */ 201 202 + #if IS_ENABLED(CONFIG_BFIN_SIR) 203 #ifdef CONFIG_BFIN_SIR0 204 static struct resource bfin_sir0_resources[] = { 205 { ··· 277 #endif /* CONFIG_BFIN_SIR2 */ 278 #endif /* CONFIG_BFIN_SIR */ 279 280 + #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT) 281 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 282 static struct resource bfin_sport0_uart_resources[] = { 283 { ··· 416 #endif /* CONFIG_SERIAL_BFIN_SPORT3_UART */ 417 #endif /* CONFIG_SERIAL_BFIN_SPORT */ 418 419 + #if IS_ENABLED(CONFIG_CAN_BFIN) 420 static unsigned short bfin_can_peripherals[] = { 421 P_CAN0_RX, P_CAN0_TX, 0 422 }; ··· 458 * USB-LAN EzExtender board 459 * Driver needs to know address, irq and flag pin. 460 */ 461 + #if IS_ENABLED(CONFIG_SMC91X) 462 #include <linux/smc91x.h> 463 464 static struct smc91x_platdata smc91x_info = { ··· 490 }; 491 #endif /* CONFIG_SMC91X */ 492 493 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 494 /* all SPI peripherals info goes here */ 495 + #if IS_ENABLED(CONFIG_MTD_M25P80) 496 /* SPI flash chip (m25p16) */ 497 static struct mtd_partition bfin_spi_flash_partitions[] = { 498 { ··· 521 #endif /* CONFIG_MTD_M25P80 */ 522 #endif /* CONFIG_SPI_BFIN5XX */ 523 524 + #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7879) 525 #include <linux/spi/ad7879.h> 526 static const struct ad7879_platform_data bfin_ad7879_ts_info = { 527 .model = 7879, /* Model = AD7879 */ ··· 538 }; 539 #endif /* CONFIG_TOUCHSCREEN_AD7879 */ 540 541 + #if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1) 542 #include <asm/bfin-lq035q1.h> 543 544 static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = { ··· 568 #endif /* CONFIG_FB_BFIN_LQ035Q1 */ 569 570 static struct spi_board_info bf538_spi_board_info[] __initdata = { 571 + #if IS_ENABLED(CONFIG_MTD_M25P80) 572 { 573 /* the modalias must be the same as spi device driver name */ 574 .modalias = "m25p80", /* Name of spi_driver for this device */ ··· 581 .mode = SPI_MODE_3, 582 }, 583 #endif /* CONFIG_MTD_M25P80 */ 584 + #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7879_SPI) 585 { 586 .modalias = "ad7879", 587 .platform_data = &bfin_ad7879_ts_info, ··· 592 .mode = SPI_CPHA | SPI_CPOL, 593 }, 594 #endif /* CONFIG_TOUCHSCREEN_AD7879_SPI */ 595 + #if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1) 596 { 597 .modalias = "bfin-lq035q1-spi", 598 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ ··· 601 .mode = SPI_CPHA | SPI_CPOL, 602 }, 603 #endif /* CONFIG_FB_BFIN_LQ035Q1 */ 604 + #if IS_ENABLED(CONFIG_SPI_SPIDEV) 605 { 606 .modalias = "spidev", 607 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 717 }, 718 }; 719 720 + #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI) 721 static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; 722 723 static struct resource bfin_twi0_resource[] = { ··· 766 }; 767 #endif /* CONFIG_I2C_BLACKFIN_TWI */ 768 769 + #if IS_ENABLED(CONFIG_KEYBOARD_GPIO) 770 #include <linux/gpio_keys.h> 771 772 static struct gpio_keys_button bfin_gpio_keys_table[] = { ··· 814 }, 815 }; 816 817 + #if IS_ENABLED(CONFIG_MTD_PHYSMAP) 818 static struct mtd_partition ezkit_partitions[] = { 819 { 820 .name = "bootloader(nor)", ··· 839 840 static struct resource ezkit_flash_resource = { 841 .start = 0x20000000, 842 + #if IS_ENABLED(CONFIG_SMC91X) 843 .end = 0x202fffff, 844 #else 845 .end = 0x203fffff, ··· 862 863 &bfin_dpmc, 864 865 + #if IS_ENABLED(CONFIG_RTC_DRV_BFIN) 866 &rtc_device, 867 #endif 868 869 + #if IS_ENABLED(CONFIG_SERIAL_BFIN) 870 #ifdef CONFIG_SERIAL_BFIN_UART0 871 &bfin_uart0_device, 872 #endif ··· 878 #endif 879 #endif 880 881 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 882 &bf538_spi_master0, 883 &bf538_spi_master1, 884 &bf538_spi_master2, 885 #endif 886 887 + #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI) 888 &i2c_bfin_twi0_device, 889 &i2c_bfin_twi1_device, 890 #endif 891 892 + #if IS_ENABLED(CONFIG_BFIN_SIR) 893 #ifdef CONFIG_BFIN_SIR0 894 &bfin_sir0_device, 895 #endif ··· 901 #endif 902 #endif 903 904 + #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT) 905 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 906 &bfin_sport0_uart_device, 907 #endif ··· 916 #endif 917 #endif 918 919 + #if IS_ENABLED(CONFIG_CAN_BFIN) 920 &bfin_can_device, 921 #endif 922 923 + #if IS_ENABLED(CONFIG_SMC91X) 924 &smc91x_device, 925 #endif 926 927 + #if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1) 928 &bfin_lq035q1_device, 929 #endif 930 931 + #if IS_ENABLED(CONFIG_KEYBOARD_GPIO) 932 &bfin_device_gpiokeys, 933 #endif 934 935 + #if IS_ENABLED(CONFIG_MTD_PHYSMAP) 936 &ezkit_flash_device, 937 #endif 938 }; ··· 942 printk(KERN_INFO "%s(): registering device resources\n", __func__); 943 platform_add_devices(cm_bf538_devices, ARRAY_SIZE(cm_bf538_devices)); 944 945 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 946 spi_register_board_info(bf538_spi_board_info, 947 ARRAY_SIZE(bf538_spi_board_info)); 948 #endif
+38 -40
arch/blackfin/mach-bf548/boards/cm_bf548.c
··· 37 * Driver needs to know address, irq and flag pin. 38 */ 39 40 - #if defined(CONFIG_FB_BF54X_LQ043) || defined(CONFIG_FB_BF54X_LQ043_MODULE) 41 42 #include <mach/bf54x-lq043.h> 43 ··· 69 }; 70 #endif 71 72 - #if defined(CONFIG_KEYBOARD_BFIN) || defined(CONFIG_KEYBOARD_BFIN_MODULE) 73 static unsigned int bf548_keymap[] = { 74 KEYVAL(0, 0, KEY_ENTER), 75 KEYVAL(0, 1, KEY_HELP), ··· 119 }; 120 #endif 121 122 - #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 123 static struct platform_device rtc_device = { 124 .name = "rtc-bfin", 125 .id = -1, 126 }; 127 #endif 128 129 - #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 130 #ifdef CONFIG_SERIAL_BFIN_UART0 131 static struct resource bfin_uart0_resources[] = { 132 { ··· 353 #endif 354 #endif 355 356 - #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 357 #ifdef CONFIG_BFIN_SIR0 358 static struct resource bfin_sir0_resources[] = { 359 { ··· 456 #endif 457 #endif 458 459 - #if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) 460 #include <linux/smsc911x.h> 461 462 static struct resource smsc911x_resources[] = { ··· 491 }; 492 #endif 493 494 - #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) 495 static struct resource musb_resources[] = { 496 [0] = { 497 .start = 0xFFC03C00, ··· 553 }; 554 #endif 555 556 - #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 557 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 558 static struct resource bfin_sport0_uart_resources[] = { 559 { ··· 692 #endif 693 #endif 694 695 - #if defined(CONFIG_PATA_BF54X) || defined(CONFIG_PATA_BF54X_MODULE) 696 static struct resource bfin_atapi_resources[] = { 697 { 698 .start = 0xFFC03800, ··· 714 }; 715 #endif 716 717 - #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) 718 static struct mtd_partition partition_info[] = { 719 { 720 .name = "linux kernel(nand)", ··· 760 }; 761 #endif 762 763 - #if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE) 764 static struct bfin_sd_host bfin_sdh_data = { 765 .dma_chan = CH_SDH, 766 .irq_int0 = IRQ_SDH_MASK0, ··· 776 }; 777 #endif 778 779 - #if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) 780 static unsigned short bfin_can_peripherals[] = { 781 P_CAN0_RX, P_CAN0_TX, 0 782 }; ··· 814 }; 815 #endif 816 817 - #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 818 static struct mtd_partition para_partitions[] = { 819 { 820 .name = "bootloader(nor)", ··· 854 }; 855 #endif 856 857 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 858 /* all SPI peripherals info goes here */ 859 - #if defined(CONFIG_MTD_M25P80) \ 860 - || defined(CONFIG_MTD_M25P80_MODULE) 861 /* SPI flash chip (m25p16) */ 862 static struct mtd_partition bfin_spi_flash_partitions[] = { 863 { ··· 883 }; 884 #endif 885 886 - #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 887 static const struct ad7877_platform_data bfin_ad7877_ts_info = { 888 .model = 7877, 889 .vref_delay_usecs = 50, /* internal, no capacitor */ ··· 900 #endif 901 902 static struct spi_board_info bf54x_spi_board_info[] __initdata = { 903 - #if defined(CONFIG_MTD_M25P80) \ 904 - || defined(CONFIG_MTD_M25P80_MODULE) 905 { 906 /* the modalias must be the same as spi device driver name */ 907 .modalias = "m25p80", /* Name of spi_driver for this device */ ··· 912 .mode = SPI_MODE_3, 913 }, 914 #endif 915 - #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 916 { 917 .modalias = "ad7877", 918 .platform_data = &bfin_ad7877_ts_info, ··· 922 .chip_select = 2, 923 }, 924 #endif 925 - #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 926 { 927 .modalias = "spidev", 928 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 1004 }; 1005 #endif /* spi master and devices */ 1006 1007 - #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 1008 static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; 1009 1010 static struct resource bfin_twi0_resource[] = { ··· 1058 #endif 1059 #endif 1060 1061 - #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 1062 #include <linux/gpio_keys.h> 1063 1064 static struct gpio_keys_button bfin_gpio_keys_table[] = { ··· 1110 1111 &bfin_dpmc, 1112 1113 - #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 1114 &rtc_device, 1115 #endif 1116 1117 - #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 1118 #ifdef CONFIG_SERIAL_BFIN_UART0 1119 &bfin_uart0_device, 1120 #endif ··· 1129 #endif 1130 #endif 1131 1132 - #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 1133 #ifdef CONFIG_BFIN_SIR0 1134 &bfin_sir0_device, 1135 #endif ··· 1144 #endif 1145 #endif 1146 1147 - #if defined(CONFIG_FB_BF54X_LQ043) || defined(CONFIG_FB_BF54X_LQ043_MODULE) 1148 &bf54x_lq043_device, 1149 #endif 1150 1151 - #if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) 1152 &smsc911x_device, 1153 #endif 1154 1155 - #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) 1156 &musb_device, 1157 #endif 1158 1159 - #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 1160 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 1161 &bfin_sport0_uart_device, 1162 #endif ··· 1171 #endif 1172 #endif 1173 1174 - #if defined(CONFIG_PATA_BF54X) || defined(CONFIG_PATA_BF54X_MODULE) 1175 &bfin_atapi_device, 1176 #endif 1177 1178 - #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) 1179 &bf5xx_nand_device, 1180 #endif 1181 1182 - #if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE) 1183 &bf54x_sdh_device, 1184 #endif 1185 1186 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 1187 &bf54x_spi_master0, 1188 &bf54x_spi_master1, 1189 #endif 1190 1191 - #if defined(CONFIG_KEYBOARD_BFIN) || defined(CONFIG_KEYBOARD_BFIN_MODULE) 1192 &bf54x_kpad_device, 1193 #endif 1194 1195 - #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 1196 &i2c_bfin_twi0_device, 1197 #if !defined(CONFIG_BF542) 1198 &i2c_bfin_twi1_device, 1199 #endif 1200 #endif 1201 1202 - #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 1203 &bfin_device_gpiokeys, 1204 #endif 1205 1206 - #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 1207 &para_flash_device, 1208 #endif 1209 1210 - #if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) 1211 &bfin_can_device, 1212 #endif 1213 ··· 1218 printk(KERN_INFO "%s(): registering device resources\n", __func__); 1219 platform_add_devices(cm_bf548_devices, ARRAY_SIZE(cm_bf548_devices)); 1220 1221 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 1222 spi_register_board_info(bf54x_spi_board_info, 1223 ARRAY_SIZE(bf54x_spi_board_info)); 1224 #endif
··· 37 * Driver needs to know address, irq and flag pin. 38 */ 39 40 + #if IS_ENABLED(CONFIG_FB_BF54X_LQ043) 41 42 #include <mach/bf54x-lq043.h> 43 ··· 69 }; 70 #endif 71 72 + #if IS_ENABLED(CONFIG_KEYBOARD_BFIN) 73 static unsigned int bf548_keymap[] = { 74 KEYVAL(0, 0, KEY_ENTER), 75 KEYVAL(0, 1, KEY_HELP), ··· 119 }; 120 #endif 121 122 + #if IS_ENABLED(CONFIG_RTC_DRV_BFIN) 123 static struct platform_device rtc_device = { 124 .name = "rtc-bfin", 125 .id = -1, 126 }; 127 #endif 128 129 + #if IS_ENABLED(CONFIG_SERIAL_BFIN) 130 #ifdef CONFIG_SERIAL_BFIN_UART0 131 static struct resource bfin_uart0_resources[] = { 132 { ··· 353 #endif 354 #endif 355 356 + #if IS_ENABLED(CONFIG_BFIN_SIR) 357 #ifdef CONFIG_BFIN_SIR0 358 static struct resource bfin_sir0_resources[] = { 359 { ··· 456 #endif 457 #endif 458 459 + #if IS_ENABLED(CONFIG_SMSC911X) 460 #include <linux/smsc911x.h> 461 462 static struct resource smsc911x_resources[] = { ··· 491 }; 492 #endif 493 494 + #if IS_ENABLED(CONFIG_USB_MUSB_HDRC) 495 static struct resource musb_resources[] = { 496 [0] = { 497 .start = 0xFFC03C00, ··· 553 }; 554 #endif 555 556 + #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT) 557 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 558 static struct resource bfin_sport0_uart_resources[] = { 559 { ··· 692 #endif 693 #endif 694 695 + #if IS_ENABLED(CONFIG_PATA_BF54X) 696 static struct resource bfin_atapi_resources[] = { 697 { 698 .start = 0xFFC03800, ··· 714 }; 715 #endif 716 717 + #if IS_ENABLED(CONFIG_MTD_NAND_BF5XX) 718 static struct mtd_partition partition_info[] = { 719 { 720 .name = "linux kernel(nand)", ··· 760 }; 761 #endif 762 763 + #if IS_ENABLED(CONFIG_SDH_BFIN) 764 static struct bfin_sd_host bfin_sdh_data = { 765 .dma_chan = CH_SDH, 766 .irq_int0 = IRQ_SDH_MASK0, ··· 776 }; 777 #endif 778 779 + #if IS_ENABLED(CONFIG_CAN_BFIN) 780 static unsigned short bfin_can_peripherals[] = { 781 P_CAN0_RX, P_CAN0_TX, 0 782 }; ··· 814 }; 815 #endif 816 817 + #if IS_ENABLED(CONFIG_MTD_PHYSMAP) 818 static struct mtd_partition para_partitions[] = { 819 { 820 .name = "bootloader(nor)", ··· 854 }; 855 #endif 856 857 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 858 /* all SPI peripherals info goes here */ 859 + #if IS_ENABLED(CONFIG_MTD_M25P80) 860 /* SPI flash chip (m25p16) */ 861 static struct mtd_partition bfin_spi_flash_partitions[] = { 862 { ··· 884 }; 885 #endif 886 887 + #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877) 888 static const struct ad7877_platform_data bfin_ad7877_ts_info = { 889 .model = 7877, 890 .vref_delay_usecs = 50, /* internal, no capacitor */ ··· 901 #endif 902 903 static struct spi_board_info bf54x_spi_board_info[] __initdata = { 904 + #if IS_ENABLED(CONFIG_MTD_M25P80) 905 { 906 /* the modalias must be the same as spi device driver name */ 907 .modalias = "m25p80", /* Name of spi_driver for this device */ ··· 914 .mode = SPI_MODE_3, 915 }, 916 #endif 917 + #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877) 918 { 919 .modalias = "ad7877", 920 .platform_data = &bfin_ad7877_ts_info, ··· 924 .chip_select = 2, 925 }, 926 #endif 927 + #if IS_ENABLED(CONFIG_SPI_SPIDEV) 928 { 929 .modalias = "spidev", 930 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 1006 }; 1007 #endif /* spi master and devices */ 1008 1009 + #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI) 1010 static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; 1011 1012 static struct resource bfin_twi0_resource[] = { ··· 1060 #endif 1061 #endif 1062 1063 + #if IS_ENABLED(CONFIG_KEYBOARD_GPIO) 1064 #include <linux/gpio_keys.h> 1065 1066 static struct gpio_keys_button bfin_gpio_keys_table[] = { ··· 1112 1113 &bfin_dpmc, 1114 1115 + #if IS_ENABLED(CONFIG_RTC_DRV_BFIN) 1116 &rtc_device, 1117 #endif 1118 1119 + #if IS_ENABLED(CONFIG_SERIAL_BFIN) 1120 #ifdef CONFIG_SERIAL_BFIN_UART0 1121 &bfin_uart0_device, 1122 #endif ··· 1131 #endif 1132 #endif 1133 1134 + #if IS_ENABLED(CONFIG_BFIN_SIR) 1135 #ifdef CONFIG_BFIN_SIR0 1136 &bfin_sir0_device, 1137 #endif ··· 1146 #endif 1147 #endif 1148 1149 + #if IS_ENABLED(CONFIG_FB_BF54X_LQ043) 1150 &bf54x_lq043_device, 1151 #endif 1152 1153 + #if IS_ENABLED(CONFIG_SMSC911X) 1154 &smsc911x_device, 1155 #endif 1156 1157 + #if IS_ENABLED(CONFIG_USB_MUSB_HDRC) 1158 &musb_device, 1159 #endif 1160 1161 + #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT) 1162 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 1163 &bfin_sport0_uart_device, 1164 #endif ··· 1173 #endif 1174 #endif 1175 1176 + #if IS_ENABLED(CONFIG_PATA_BF54X) 1177 &bfin_atapi_device, 1178 #endif 1179 1180 + #if IS_ENABLED(CONFIG_MTD_NAND_BF5XX) 1181 &bf5xx_nand_device, 1182 #endif 1183 1184 + #if IS_ENABLED(CONFIG_SDH_BFIN) 1185 &bf54x_sdh_device, 1186 #endif 1187 1188 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 1189 &bf54x_spi_master0, 1190 &bf54x_spi_master1, 1191 #endif 1192 1193 + #if IS_ENABLED(CONFIG_KEYBOARD_BFIN) 1194 &bf54x_kpad_device, 1195 #endif 1196 1197 + #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI) 1198 &i2c_bfin_twi0_device, 1199 #if !defined(CONFIG_BF542) 1200 &i2c_bfin_twi1_device, 1201 #endif 1202 #endif 1203 1204 + #if IS_ENABLED(CONFIG_KEYBOARD_GPIO) 1205 &bfin_device_gpiokeys, 1206 #endif 1207 1208 + #if IS_ENABLED(CONFIG_MTD_PHYSMAP) 1209 &para_flash_device, 1210 #endif 1211 1212 + #if IS_ENABLED(CONFIG_CAN_BFIN) 1213 &bfin_can_device, 1214 #endif 1215 ··· 1220 printk(KERN_INFO "%s(): registering device resources\n", __func__); 1221 platform_add_devices(cm_bf548_devices, ARRAY_SIZE(cm_bf548_devices)); 1222 1223 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 1224 spi_register_board_info(bf54x_spi_board_info, 1225 ARRAY_SIZE(bf54x_spi_board_info)); 1226 #endif
+65 -71
arch/blackfin/mach-bf548/boards/ezkit.c
··· 41 * Driver needs to know address, irq and flag pin. 42 */ 43 44 - #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) 45 #include <linux/usb/isp1760.h> 46 static struct resource bfin_isp1760_resources[] = { 47 [0] = { ··· 76 }; 77 #endif 78 79 - #if defined(CONFIG_FB_BF54X_LQ043) || defined(CONFIG_FB_BF54X_LQ043_MODULE) 80 81 #include <mach/bf54x-lq043.h> 82 ··· 108 }; 109 #endif 110 111 - #if defined(CONFIG_KEYBOARD_BFIN) || defined(CONFIG_KEYBOARD_BFIN_MODULE) 112 static const unsigned int bf548_keymap[] = { 113 KEYVAL(0, 0, KEY_ENTER), 114 KEYVAL(0, 1, KEY_HELP), ··· 158 }; 159 #endif 160 161 - #if defined(CONFIG_INPUT_BFIN_ROTARY) || defined(CONFIG_INPUT_BFIN_ROTARY_MODULE) 162 #include <asm/bfin_rotary.h> 163 164 static struct bfin_rotary_platform_data bfin_rotary_data = { ··· 190 }; 191 #endif 192 193 - #if defined(CONFIG_INPUT_ADXL34X) || defined(CONFIG_INPUT_ADXL34X_MODULE) 194 #include <linux/input/adxl34x.h> 195 static const struct adxl34x_platform_data adxl34x_info = { 196 .x_axis_offset = 0, ··· 229 }; 230 #endif 231 232 - #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 233 static struct platform_device rtc_device = { 234 .name = "rtc-bfin", 235 .id = -1, 236 }; 237 #endif 238 239 - #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 240 #ifdef CONFIG_SERIAL_BFIN_UART0 241 static struct resource bfin_uart0_resources[] = { 242 { ··· 491 #endif 492 #endif 493 494 - #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 495 #ifdef CONFIG_BFIN_SIR0 496 static struct resource bfin_sir0_resources[] = { 497 { ··· 594 #endif 595 #endif 596 597 - #if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) 598 #include <linux/smsc911x.h> 599 600 static struct resource smsc911x_resources[] = { ··· 629 }; 630 #endif 631 632 - #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) 633 static struct resource musb_resources[] = { 634 [0] = { 635 .start = 0xFFC03C00, ··· 691 }; 692 #endif 693 694 - #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 695 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 696 static struct resource bfin_sport0_uart_resources[] = { 697 { ··· 830 #endif 831 #endif 832 833 - #if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) 834 835 static unsigned short bfin_can0_peripherals[] = { 836 P_CAN0_RX, P_CAN0_TX, 0 ··· 908 909 #endif 910 911 - #if defined(CONFIG_PATA_BF54X) || defined(CONFIG_PATA_BF54X_MODULE) 912 static struct resource bfin_atapi_resources[] = { 913 { 914 .start = 0xFFC03800, ··· 930 }; 931 #endif 932 933 - #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) 934 static struct mtd_partition partition_info[] = { 935 { 936 .name = "bootloader(nand)", ··· 980 }; 981 #endif 982 983 - #if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE) 984 985 static struct bfin_sd_host bfin_sdh_data = { 986 .dma_chan = CH_SDH, ··· 997 }; 998 #endif 999 1000 - #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 1001 static struct mtd_partition ezkit_partitions[] = { 1002 { 1003 .name = "bootloader(nor)", ··· 1045 }; 1046 #endif 1047 1048 - #if defined(CONFIG_MTD_M25P80) \ 1049 - || defined(CONFIG_MTD_M25P80_MODULE) 1050 /* SPI flash chip (m25p16) */ 1051 static struct mtd_partition bfin_spi_flash_partitions[] = { 1052 { ··· 1072 }; 1073 #endif 1074 1075 - #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 1076 static const struct ad7877_platform_data bfin_ad7877_ts_info = { 1077 .model = 7877, 1078 .vref_delay_usecs = 50, /* internal, no capacitor */ ··· 1494 #endif 1495 1496 static struct spi_board_info bfin_spi_board_info[] __initdata = { 1497 - #if defined(CONFIG_MTD_M25P80) \ 1498 - || defined(CONFIG_MTD_M25P80_MODULE) 1499 { 1500 /* the modalias must be the same as spi device driver name */ 1501 .modalias = "m25p80", /* Name of spi_driver for this device */ ··· 1506 .mode = SPI_MODE_3, 1507 }, 1508 #endif 1509 - #if defined(CONFIG_SND_BF5XX_SOC_AD183X) \ 1510 - || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) 1511 { 1512 .modalias = "ad183x", 1513 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 1514 .chip_select = MAX_CTRL_CS + GPIO_PG6, /* SPI_SSEL2 */ 1515 }, 1516 #endif 1517 - #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 1518 { 1519 .modalias = "ad7877", 1520 .platform_data = &bfin_ad7877_ts_info, ··· 1524 .chip_select = MAX_CTRL_CS + GPIO_PE5, /* SPI_SSEL2 */ 1525 }, 1526 #endif 1527 - #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 1528 { 1529 .modalias = "spidev", 1530 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 1532 .chip_select = MAX_CTRL_CS + GPIO_PE4, /* SPI_SSEL1 */ 1533 }, 1534 #endif 1535 - #if defined(CONFIG_INPUT_ADXL34X_SPI) || defined(CONFIG_INPUT_ADXL34X_SPI_MODULE) 1536 { 1537 .modalias = "adxl34x", 1538 .platform_data = &adxl34x_info, ··· 1544 }, 1545 #endif 1546 }; 1547 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 1548 /* SPI (0) */ 1549 static struct resource bfin_spi0_resource[] = { 1550 [0] = { ··· 1617 }; 1618 #endif /* spi master and devices */ 1619 1620 - #if defined(CONFIG_VIDEO_BLACKFIN_CAPTURE) \ 1621 - || defined(CONFIG_VIDEO_BLACKFIN_CAPTURE_MODULE) 1622 #include <linux/videodev2.h> 1623 #include <media/blackfin/bfin_capture.h> 1624 #include <media/blackfin/ppi.h> ··· 1637 .pin_req = ppi_req, 1638 }; 1639 1640 - #if defined(CONFIG_VIDEO_VS6624) \ 1641 - || defined(CONFIG_VIDEO_VS6624_MODULE) 1642 static struct v4l2_input vs6624_inputs[] = { 1643 { 1644 .index = 0, ··· 1682 }; 1683 #endif 1684 1685 - #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 1686 static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; 1687 1688 static struct resource bfin_twi0_resource[] = { ··· 1737 #endif 1738 1739 static struct i2c_board_info __initdata bfin_i2c_board_info0[] = { 1740 - #if defined(CONFIG_SND_SOC_SSM2602) || defined(CONFIG_SND_SOC_SSM2602_MODULE) 1741 { 1742 I2C_BOARD_INFO("ssm2602", 0x1b), 1743 }, ··· 1746 1747 #if !defined(CONFIG_BF542) /* The BF542 only has 1 TWI */ 1748 static struct i2c_board_info __initdata bfin_i2c_board_info1[] = { 1749 - #if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) 1750 { 1751 I2C_BOARD_INFO("pcf8574_lcd", 0x22), 1752 }, 1753 #endif 1754 - #if defined(CONFIG_INPUT_PCF8574) || defined(CONFIG_INPUT_PCF8574_MODULE) 1755 { 1756 I2C_BOARD_INFO("pcf8574_keypad", 0x27), 1757 .irq = 212, 1758 }, 1759 #endif 1760 - #if defined(CONFIG_INPUT_ADXL34X_I2C) || defined(CONFIG_INPUT_ADXL34X_I2C_MODULE) 1761 { 1762 I2C_BOARD_INFO("adxl34x", 0x53), 1763 .irq = IRQ_PC5, 1764 .platform_data = (void *)&adxl34x_info, 1765 }, 1766 #endif 1767 - #if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) 1768 { 1769 I2C_BOARD_INFO("ad5252", 0x2f), 1770 }, ··· 1772 }; 1773 #endif 1774 1775 - #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 1776 #include <linux/gpio_keys.h> 1777 1778 static struct gpio_keys_button bfin_gpio_keys_table[] = { ··· 1823 }, 1824 }; 1825 1826 - #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) || \ 1827 - defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) 1828 1829 #define SPORT_REQ(x) \ 1830 [x] = {P_SPORT##x##_TFS, P_SPORT##x##_DTPRI, P_SPORT##x##_TSCLK, \ ··· 1884 }; 1885 #endif 1886 1887 - #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 1888 static struct platform_device bfin_i2s_pcm = { 1889 .name = "bfin-i2s-pcm-audio", 1890 .id = -1, 1891 }; 1892 #endif 1893 1894 - #if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) 1895 static struct platform_device bfin_ac97_pcm = { 1896 .name = "bfin-ac97-pcm-audio", 1897 .id = -1, 1898 }; 1899 #endif 1900 1901 - #if defined(CONFIG_SND_BF5XX_SOC_AD73311) || defined(CONFIG_SND_BF5XX_SOC_AD73311_MODULE) 1902 static struct platform_device bfin_ad73311_codec_device = { 1903 .name = "ad73311", 1904 .id = -1, 1905 }; 1906 #endif 1907 1908 - #if defined(CONFIG_SND_BF5XX_SOC_AD1980) || defined(CONFIG_SND_BF5XX_SOC_AD1980_MODULE) 1909 static struct platform_device bfin_ad1980_codec_device = { 1910 .name = "ad1980", 1911 .id = -1, 1912 }; 1913 #endif 1914 1915 - #if defined(CONFIG_SND_BF5XX_SOC_I2S) || defined(CONFIG_SND_BF5XX_SOC_I2S_MODULE) 1916 static struct platform_device bfin_i2s = { 1917 .name = "bfin-i2s", 1918 .id = CONFIG_SND_BF5XX_SPORT_NUM, ··· 1924 }; 1925 #endif 1926 1927 - #if defined(CONFIG_SND_BF5XX_SOC_AC97) || defined(CONFIG_SND_BF5XX_SOC_AC97_MODULE) 1928 static struct platform_device bfin_ac97 = { 1929 .name = "bfin-ac97", 1930 .id = CONFIG_SND_BF5XX_SPORT_NUM, ··· 1957 &bfin_gpj_device, 1958 #endif 1959 1960 - #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 1961 &rtc_device, 1962 #endif 1963 1964 - #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 1965 #ifdef CONFIG_SERIAL_BFIN_UART0 1966 &bfin_uart0_device, 1967 #endif ··· 1976 #endif 1977 #endif 1978 1979 - #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 1980 #ifdef CONFIG_BFIN_SIR0 1981 &bfin_sir0_device, 1982 #endif ··· 1991 #endif 1992 #endif 1993 1994 - #if defined(CONFIG_FB_BF54X_LQ043) || defined(CONFIG_FB_BF54X_LQ043_MODULE) 1995 &bf54x_lq043_device, 1996 #endif 1997 1998 - #if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) 1999 &smsc911x_device, 2000 #endif 2001 2002 - #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) 2003 &musb_device, 2004 #endif 2005 2006 - #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) 2007 &bfin_isp1760_device, 2008 #endif 2009 2010 - #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 2011 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 2012 &bfin_sport0_uart_device, 2013 #endif ··· 2022 #endif 2023 #endif 2024 2025 - #if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) 2026 &bfin_can0_device, 2027 &bfin_can1_device, 2028 #endif 2029 2030 - #if defined(CONFIG_PATA_BF54X) || defined(CONFIG_PATA_BF54X_MODULE) 2031 &bfin_atapi_device, 2032 #endif 2033 2034 - #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) 2035 &bf5xx_nand_device, 2036 #endif 2037 2038 - #if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE) 2039 &bf54x_sdh_device, 2040 #endif 2041 2042 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 2043 &bf54x_spi_master0, 2044 &bf54x_spi_master1, 2045 #endif 2046 - #if defined(CONFIG_VIDEO_BLACKFIN_CAPTURE) \ 2047 - || defined(CONFIG_VIDEO_BLACKFIN_CAPTURE_MODULE) 2048 &bfin_capture_device, 2049 #endif 2050 2051 - #if defined(CONFIG_KEYBOARD_BFIN) || defined(CONFIG_KEYBOARD_BFIN_MODULE) 2052 &bf54x_kpad_device, 2053 #endif 2054 2055 - #if defined(CONFIG_INPUT_BFIN_ROTARY) || defined(CONFIG_INPUT_BFIN_ROTARY_MODULE) 2056 &bfin_rotary_device, 2057 #endif 2058 2059 - #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 2060 &i2c_bfin_twi0_device, 2061 #if !defined(CONFIG_BF542) 2062 &i2c_bfin_twi1_device, 2063 #endif 2064 #endif 2065 2066 - #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 2067 &bfin_device_gpiokeys, 2068 #endif 2069 2070 - #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 2071 &ezkit_flash_device, 2072 #endif 2073 2074 - #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 2075 &bfin_i2s_pcm, 2076 #endif 2077 2078 - #if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) 2079 &bfin_ac97_pcm, 2080 #endif 2081 2082 - #if defined(CONFIG_SND_BF5XX_SOC_AD1980) || defined(CONFIG_SND_BF5XX_SOC_AD1980_MODULE) 2083 &bfin_ad1980_codec_device, 2084 #endif 2085 2086 - #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 2087 &bfin_i2s, 2088 #endif 2089 2090 - #if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) 2091 &bfin_ac97, 2092 #endif 2093 };
··· 41 * Driver needs to know address, irq and flag pin. 42 */ 43 44 + #if IS_ENABLED(CONFIG_USB_ISP1760_HCD) 45 #include <linux/usb/isp1760.h> 46 static struct resource bfin_isp1760_resources[] = { 47 [0] = { ··· 76 }; 77 #endif 78 79 + #if IS_ENABLED(CONFIG_FB_BF54X_LQ043) 80 81 #include <mach/bf54x-lq043.h> 82 ··· 108 }; 109 #endif 110 111 + #if IS_ENABLED(CONFIG_KEYBOARD_BFIN) 112 static const unsigned int bf548_keymap[] = { 113 KEYVAL(0, 0, KEY_ENTER), 114 KEYVAL(0, 1, KEY_HELP), ··· 158 }; 159 #endif 160 161 + #if IS_ENABLED(CONFIG_INPUT_BFIN_ROTARY) 162 #include <asm/bfin_rotary.h> 163 164 static struct bfin_rotary_platform_data bfin_rotary_data = { ··· 190 }; 191 #endif 192 193 + #if IS_ENABLED(CONFIG_INPUT_ADXL34X) 194 #include <linux/input/adxl34x.h> 195 static const struct adxl34x_platform_data adxl34x_info = { 196 .x_axis_offset = 0, ··· 229 }; 230 #endif 231 232 + #if IS_ENABLED(CONFIG_RTC_DRV_BFIN) 233 static struct platform_device rtc_device = { 234 .name = "rtc-bfin", 235 .id = -1, 236 }; 237 #endif 238 239 + #if IS_ENABLED(CONFIG_SERIAL_BFIN) 240 #ifdef CONFIG_SERIAL_BFIN_UART0 241 static struct resource bfin_uart0_resources[] = { 242 { ··· 491 #endif 492 #endif 493 494 + #if IS_ENABLED(CONFIG_BFIN_SIR) 495 #ifdef CONFIG_BFIN_SIR0 496 static struct resource bfin_sir0_resources[] = { 497 { ··· 594 #endif 595 #endif 596 597 + #if IS_ENABLED(CONFIG_SMSC911X) 598 #include <linux/smsc911x.h> 599 600 static struct resource smsc911x_resources[] = { ··· 629 }; 630 #endif 631 632 + #if IS_ENABLED(CONFIG_USB_MUSB_HDRC) 633 static struct resource musb_resources[] = { 634 [0] = { 635 .start = 0xFFC03C00, ··· 691 }; 692 #endif 693 694 + #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT) 695 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 696 static struct resource bfin_sport0_uart_resources[] = { 697 { ··· 830 #endif 831 #endif 832 833 + #if IS_ENABLED(CONFIG_CAN_BFIN) 834 835 static unsigned short bfin_can0_peripherals[] = { 836 P_CAN0_RX, P_CAN0_TX, 0 ··· 908 909 #endif 910 911 + #if IS_ENABLED(CONFIG_PATA_BF54X) 912 static struct resource bfin_atapi_resources[] = { 913 { 914 .start = 0xFFC03800, ··· 930 }; 931 #endif 932 933 + #if IS_ENABLED(CONFIG_MTD_NAND_BF5XX) 934 static struct mtd_partition partition_info[] = { 935 { 936 .name = "bootloader(nand)", ··· 980 }; 981 #endif 982 983 + #if IS_ENABLED(CONFIG_SDH_BFIN) 984 985 static struct bfin_sd_host bfin_sdh_data = { 986 .dma_chan = CH_SDH, ··· 997 }; 998 #endif 999 1000 + #if IS_ENABLED(CONFIG_MTD_PHYSMAP) 1001 static struct mtd_partition ezkit_partitions[] = { 1002 { 1003 .name = "bootloader(nor)", ··· 1045 }; 1046 #endif 1047 1048 + #if IS_ENABLED(CONFIG_MTD_M25P80) 1049 /* SPI flash chip (m25p16) */ 1050 static struct mtd_partition bfin_spi_flash_partitions[] = { 1051 { ··· 1073 }; 1074 #endif 1075 1076 + #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877) 1077 static const struct ad7877_platform_data bfin_ad7877_ts_info = { 1078 .model = 7877, 1079 .vref_delay_usecs = 50, /* internal, no capacitor */ ··· 1495 #endif 1496 1497 static struct spi_board_info bfin_spi_board_info[] __initdata = { 1498 + #if IS_ENABLED(CONFIG_MTD_M25P80) 1499 { 1500 /* the modalias must be the same as spi device driver name */ 1501 .modalias = "m25p80", /* Name of spi_driver for this device */ ··· 1508 .mode = SPI_MODE_3, 1509 }, 1510 #endif 1511 + #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD183X) 1512 { 1513 .modalias = "ad183x", 1514 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 1517 .chip_select = MAX_CTRL_CS + GPIO_PG6, /* SPI_SSEL2 */ 1518 }, 1519 #endif 1520 + #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877) 1521 { 1522 .modalias = "ad7877", 1523 .platform_data = &bfin_ad7877_ts_info, ··· 1527 .chip_select = MAX_CTRL_CS + GPIO_PE5, /* SPI_SSEL2 */ 1528 }, 1529 #endif 1530 + #if IS_ENABLED(CONFIG_SPI_SPIDEV) 1531 { 1532 .modalias = "spidev", 1533 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 1535 .chip_select = MAX_CTRL_CS + GPIO_PE4, /* SPI_SSEL1 */ 1536 }, 1537 #endif 1538 + #if IS_ENABLED(CONFIG_INPUT_ADXL34X_SPI) 1539 { 1540 .modalias = "adxl34x", 1541 .platform_data = &adxl34x_info, ··· 1547 }, 1548 #endif 1549 }; 1550 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 1551 /* SPI (0) */ 1552 static struct resource bfin_spi0_resource[] = { 1553 [0] = { ··· 1620 }; 1621 #endif /* spi master and devices */ 1622 1623 + #if IS_ENABLED(CONFIG_VIDEO_BLACKFIN_CAPTURE) 1624 #include <linux/videodev2.h> 1625 #include <media/blackfin/bfin_capture.h> 1626 #include <media/blackfin/ppi.h> ··· 1641 .pin_req = ppi_req, 1642 }; 1643 1644 + #if IS_ENABLED(CONFIG_VIDEO_VS6624) 1645 static struct v4l2_input vs6624_inputs[] = { 1646 { 1647 .index = 0, ··· 1687 }; 1688 #endif 1689 1690 + #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI) 1691 static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; 1692 1693 static struct resource bfin_twi0_resource[] = { ··· 1742 #endif 1743 1744 static struct i2c_board_info __initdata bfin_i2c_board_info0[] = { 1745 + #if IS_ENABLED(CONFIG_SND_SOC_SSM2602) 1746 { 1747 I2C_BOARD_INFO("ssm2602", 0x1b), 1748 }, ··· 1751 1752 #if !defined(CONFIG_BF542) /* The BF542 only has 1 TWI */ 1753 static struct i2c_board_info __initdata bfin_i2c_board_info1[] = { 1754 + #if IS_ENABLED(CONFIG_BFIN_TWI_LCD) 1755 { 1756 I2C_BOARD_INFO("pcf8574_lcd", 0x22), 1757 }, 1758 #endif 1759 + #if IS_ENABLED(CONFIG_INPUT_PCF8574) 1760 { 1761 I2C_BOARD_INFO("pcf8574_keypad", 0x27), 1762 .irq = 212, 1763 }, 1764 #endif 1765 + #if IS_ENABLED(CONFIG_INPUT_ADXL34X_I2C) 1766 { 1767 I2C_BOARD_INFO("adxl34x", 0x53), 1768 .irq = IRQ_PC5, 1769 .platform_data = (void *)&adxl34x_info, 1770 }, 1771 #endif 1772 + #if IS_ENABLED(CONFIG_BFIN_TWI_LCD) 1773 { 1774 I2C_BOARD_INFO("ad5252", 0x2f), 1775 }, ··· 1777 }; 1778 #endif 1779 1780 + #if IS_ENABLED(CONFIG_KEYBOARD_GPIO) 1781 #include <linux/gpio_keys.h> 1782 1783 static struct gpio_keys_button bfin_gpio_keys_table[] = { ··· 1828 }, 1829 }; 1830 1831 + #if IS_ENABLED(CONFIG_SND_BF5XX_I2S) || \ 1832 + IS_ENABLED(CONFIG_SND_BF5XX_AC97) 1833 1834 #define SPORT_REQ(x) \ 1835 [x] = {P_SPORT##x##_TFS, P_SPORT##x##_DTPRI, P_SPORT##x##_TSCLK, \ ··· 1889 }; 1890 #endif 1891 1892 + #if IS_ENABLED(CONFIG_SND_BF5XX_I2S) 1893 static struct platform_device bfin_i2s_pcm = { 1894 .name = "bfin-i2s-pcm-audio", 1895 .id = -1, 1896 }; 1897 #endif 1898 1899 + #if IS_ENABLED(CONFIG_SND_BF5XX_AC97) 1900 static struct platform_device bfin_ac97_pcm = { 1901 .name = "bfin-ac97-pcm-audio", 1902 .id = -1, 1903 }; 1904 #endif 1905 1906 + #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD73311) 1907 static struct platform_device bfin_ad73311_codec_device = { 1908 .name = "ad73311", 1909 .id = -1, 1910 }; 1911 #endif 1912 1913 + #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD1980) 1914 static struct platform_device bfin_ad1980_codec_device = { 1915 .name = "ad1980", 1916 .id = -1, 1917 }; 1918 #endif 1919 1920 + #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_I2S) 1921 static struct platform_device bfin_i2s = { 1922 .name = "bfin-i2s", 1923 .id = CONFIG_SND_BF5XX_SPORT_NUM, ··· 1929 }; 1930 #endif 1931 1932 + #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AC97) 1933 static struct platform_device bfin_ac97 = { 1934 .name = "bfin-ac97", 1935 .id = CONFIG_SND_BF5XX_SPORT_NUM, ··· 1962 &bfin_gpj_device, 1963 #endif 1964 1965 + #if IS_ENABLED(CONFIG_RTC_DRV_BFIN) 1966 &rtc_device, 1967 #endif 1968 1969 + #if IS_ENABLED(CONFIG_SERIAL_BFIN) 1970 #ifdef CONFIG_SERIAL_BFIN_UART0 1971 &bfin_uart0_device, 1972 #endif ··· 1981 #endif 1982 #endif 1983 1984 + #if IS_ENABLED(CONFIG_BFIN_SIR) 1985 #ifdef CONFIG_BFIN_SIR0 1986 &bfin_sir0_device, 1987 #endif ··· 1996 #endif 1997 #endif 1998 1999 + #if IS_ENABLED(CONFIG_FB_BF54X_LQ043) 2000 &bf54x_lq043_device, 2001 #endif 2002 2003 + #if IS_ENABLED(CONFIG_SMSC911X) 2004 &smsc911x_device, 2005 #endif 2006 2007 + #if IS_ENABLED(CONFIG_USB_MUSB_HDRC) 2008 &musb_device, 2009 #endif 2010 2011 + #if IS_ENABLED(CONFIG_USB_ISP1760_HCD) 2012 &bfin_isp1760_device, 2013 #endif 2014 2015 + #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT) 2016 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 2017 &bfin_sport0_uart_device, 2018 #endif ··· 2027 #endif 2028 #endif 2029 2030 + #if IS_ENABLED(CONFIG_CAN_BFIN) 2031 &bfin_can0_device, 2032 &bfin_can1_device, 2033 #endif 2034 2035 + #if IS_ENABLED(CONFIG_PATA_BF54X) 2036 &bfin_atapi_device, 2037 #endif 2038 2039 + #if IS_ENABLED(CONFIG_MTD_NAND_BF5XX) 2040 &bf5xx_nand_device, 2041 #endif 2042 2043 + #if IS_ENABLED(CONFIG_SDH_BFIN) 2044 &bf54x_sdh_device, 2045 #endif 2046 2047 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 2048 &bf54x_spi_master0, 2049 &bf54x_spi_master1, 2050 #endif 2051 + #if IS_ENABLED(CONFIG_VIDEO_BLACKFIN_CAPTURE) 2052 &bfin_capture_device, 2053 #endif 2054 2055 + #if IS_ENABLED(CONFIG_KEYBOARD_BFIN) 2056 &bf54x_kpad_device, 2057 #endif 2058 2059 + #if IS_ENABLED(CONFIG_INPUT_BFIN_ROTARY) 2060 &bfin_rotary_device, 2061 #endif 2062 2063 + #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI) 2064 &i2c_bfin_twi0_device, 2065 #if !defined(CONFIG_BF542) 2066 &i2c_bfin_twi1_device, 2067 #endif 2068 #endif 2069 2070 + #if IS_ENABLED(CONFIG_KEYBOARD_GPIO) 2071 &bfin_device_gpiokeys, 2072 #endif 2073 2074 + #if IS_ENABLED(CONFIG_MTD_PHYSMAP) 2075 &ezkit_flash_device, 2076 #endif 2077 2078 + #if IS_ENABLED(CONFIG_SND_BF5XX_I2S) 2079 &bfin_i2s_pcm, 2080 #endif 2081 2082 + #if IS_ENABLED(CONFIG_SND_BF5XX_AC97) 2083 &bfin_ac97_pcm, 2084 #endif 2085 2086 + #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD1980) 2087 &bfin_ad1980_codec_device, 2088 #endif 2089 2090 + #if IS_ENABLED(CONFIG_SND_BF5XX_I2S) 2091 &bfin_i2s, 2092 #endif 2093 2094 + #if IS_ENABLED(CONFIG_SND_BF5XX_AC97) 2095 &bfin_ac97, 2096 #endif 2097 };
-30
arch/blackfin/mach-bf548/include/mach/defBF544.h
··· 601 #define GU_TRANS 0xff00 /* Transparent Color - G/U Component */ 602 #define BV_TRANS 0xff0000 /* Transparent Color - B/V Component */ 603 604 - /* Bit masks for HOST_CONTROL */ 605 - 606 - #define HOST_EN 0x1 /* Host Enable */ 607 - #define HOST_END 0x2 /* Host Endianess */ 608 - #define DATA_SIZE 0x4 /* Data Size */ 609 - #define HOST_RST 0x8 /* Host Reset */ 610 - #define HRDY_OVR 0x20 /* Host Ready Override */ 611 - #define INT_MODE 0x40 /* Interrupt Mode */ 612 - #define BT_EN 0x80 /* Bus Timeout Enable */ 613 - #define EHW 0x100 /* Enable Host Write */ 614 - #define EHR 0x200 /* Enable Host Read */ 615 - #define BDR 0x400 /* Burst DMA Requests */ 616 - 617 - /* Bit masks for HOST_STATUS */ 618 - 619 - #define DMA_READY 0x1 /* DMA Ready */ 620 - #define FIFOFULL 0x2 /* FIFO Full */ 621 - #define FIFOEMPTY 0x4 /* FIFO Empty */ 622 - #define DMA_COMPLETE 0x8 /* DMA Complete */ 623 - #define HSHK 0x10 /* Host Handshake */ 624 - #define HSTIMEOUT 0x20 /* Host Timeout */ 625 - #define HIRQ 0x40 /* Host Interrupt Request */ 626 - #define ALLOW_CNFG 0x80 /* Allow New Configuration */ 627 - #define DMA_DIR 0x100 /* DMA Direction */ 628 - #define BTE 0x200 /* Bus Timeout Enabled */ 629 - 630 - /* Bit masks for HOST_TIMEOUT */ 631 - 632 - #define COUNT_TIMEOUT 0x7ff /* Host Timeout count */ 633 - 634 /* Bit masks for TIMER_ENABLE1 */ 635 636 #define TIMEN8 0x1 /* Timer 8 Enable */
··· 601 #define GU_TRANS 0xff00 /* Transparent Color - G/U Component */ 602 #define BV_TRANS 0xff0000 /* Transparent Color - B/V Component */ 603 604 /* Bit masks for TIMER_ENABLE1 */ 605 606 #define TIMEN8 0x1 /* Timer 8 Enable */
-30
arch/blackfin/mach-bf548/include/mach/defBF547.h
··· 581 #define GU_TRANS 0xff00 /* Transparent Color - G/U Component */ 582 #define BV_TRANS 0xff0000 /* Transparent Color - B/V Component */ 583 584 - /* Bit masks for HOST_CONTROL */ 585 - 586 - #define HOST_EN 0x1 /* Host Enable */ 587 - #define HOST_END 0x2 /* Host Endianess */ 588 - #define DATA_SIZE 0x4 /* Data Size */ 589 - #define HOST_RST 0x8 /* Host Reset */ 590 - #define HRDY_OVR 0x20 /* Host Ready Override */ 591 - #define INT_MODE 0x40 /* Interrupt Mode */ 592 - #define BT_EN 0x80 /* Bus Timeout Enable */ 593 - #define EHW 0x100 /* Enable Host Write */ 594 - #define EHR 0x200 /* Enable Host Read */ 595 - #define BDR 0x400 /* Burst DMA Requests */ 596 - 597 - /* Bit masks for HOST_STATUS */ 598 - 599 - #define DMA_READY 0x1 /* DMA Ready */ 600 - #define FIFOFULL 0x2 /* FIFO Full */ 601 - #define FIFOEMPTY 0x4 /* FIFO Empty */ 602 - #define DMA_COMPLETE 0x8 /* DMA Complete */ 603 - #define HSHK 0x10 /* Host Handshake */ 604 - #define HSTIMEOUT 0x20 /* Host Timeout */ 605 - #define HIRQ 0x40 /* Host Interrupt Request */ 606 - #define ALLOW_CNFG 0x80 /* Allow New Configuration */ 607 - #define DMA_DIR 0x100 /* DMA Direction */ 608 - #define BTE 0x200 /* Bus Timeout Enabled */ 609 - 610 - /* Bit masks for HOST_TIMEOUT */ 611 - 612 - #define COUNT_TIMEOUT 0x7ff /* Host Timeout count */ 613 - 614 /* Bit masks for KPAD_CTL */ 615 616 #define KPAD_EN 0x1 /* Keypad Enable */
··· 581 #define GU_TRANS 0xff00 /* Transparent Color - G/U Component */ 582 #define BV_TRANS 0xff0000 /* Transparent Color - B/V Component */ 583 584 /* Bit masks for KPAD_CTL */ 585 586 #define KPAD_EN 0x1 /* Keypad Enable */
+14 -14
arch/blackfin/mach-bf561/boards/acvilon.c
··· 60 */ 61 const char bfin_board_name[] = "Acvilon board"; 62 63 - #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) 64 #include <linux/usb/isp1760.h> 65 static struct resource bfin_isp1760_resources[] = { 66 [0] = { ··· 137 }, 138 }; 139 140 - #if defined(CONFIG_MTD_PLATRAM) || defined(CONFIG_MTD_PLATRAM_MODULE) 141 static struct platdata_mtd_ram mtd_ram_data = { 142 .mapname = "rootfs(RAM)", 143 .bankwidth = 4, ··· 160 }; 161 #endif 162 163 - #if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) 164 #include <linux/smsc911x.h> 165 static struct resource smsc911x_resources[] = { 166 { ··· 194 }; 195 #endif 196 197 - #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 198 #ifdef CONFIG_SERIAL_BFIN_UART0 199 static struct resource bfin_uart0_resources[] = { 200 { ··· 246 #endif 247 #endif 248 249 - #if defined(CONFIG_MTD_NAND_PLATFORM) || defined(CONFIG_MTD_NAND_PLATFORM_MODULE) 250 251 static struct mtd_partition bfin_plat_nand_partitions[] = { 252 { ··· 323 } 324 #endif 325 326 - #if defined(CONFIG_MTD_DATAFLASH) || defined(CONFIG_MTD_DATAFLASH_MODULE) 327 static struct mtd_partition bfin_spi_dataflash_partitions[] = { 328 { 329 .name = "bootloader", ··· 369 }; 370 #endif 371 372 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 373 /* SPI (0) */ 374 static struct resource bfin_spi0_resource[] = { 375 [0] = { ··· 408 #endif 409 410 static struct spi_board_info bfin_spi_board_info[] __initdata = { 411 - #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 412 { 413 .modalias = "spidev", 414 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 416 .chip_select = 3, 417 }, 418 #endif 419 - #if defined(CONFIG_MTD_DATAFLASH) || defined(CONFIG_MTD_DATAFLASH_MODULE) 420 { /* DataFlash chip */ 421 .modalias = "mtd_dataflash", 422 .max_speed_hz = 33250000, /* max spi clock (SCK) speed in HZ */ ··· 472 static struct platform_device *acvilon_devices[] __initdata = { 473 &bfin_dpmc, 474 475 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 476 &bfin_spi0_device, 477 #endif 478 479 - #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 480 #ifdef CONFIG_SERIAL_BFIN_UART0 481 &bfin_uart0_device, 482 #endif ··· 484 485 &bfin_gpios_device, 486 487 - #if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) 488 &smsc911x_device, 489 #endif 490 491 &bfin_i2c_pca_device, 492 493 - #if defined(CONFIG_MTD_NAND_PLATFORM) || defined(CONFIG_MTD_NAND_PLATFORM_MODULE) 494 &bfin_async_nand_device, 495 #endif 496 497 - #if defined(CONFIG_MTD_PLATRAM) || defined(CONFIG_MTD_PLATRAM_MODULE) 498 &mtd_ram_device, 499 #endif 500
··· 60 */ 61 const char bfin_board_name[] = "Acvilon board"; 62 63 + #if IS_ENABLED(CONFIG_USB_ISP1760_HCD) 64 #include <linux/usb/isp1760.h> 65 static struct resource bfin_isp1760_resources[] = { 66 [0] = { ··· 137 }, 138 }; 139 140 + #if IS_ENABLED(CONFIG_MTD_PLATRAM) 141 static struct platdata_mtd_ram mtd_ram_data = { 142 .mapname = "rootfs(RAM)", 143 .bankwidth = 4, ··· 160 }; 161 #endif 162 163 + #if IS_ENABLED(CONFIG_SMSC911X) 164 #include <linux/smsc911x.h> 165 static struct resource smsc911x_resources[] = { 166 { ··· 194 }; 195 #endif 196 197 + #if IS_ENABLED(CONFIG_SERIAL_BFIN) 198 #ifdef CONFIG_SERIAL_BFIN_UART0 199 static struct resource bfin_uart0_resources[] = { 200 { ··· 246 #endif 247 #endif 248 249 + #if IS_ENABLED(CONFIG_MTD_NAND_PLATFORM) 250 251 static struct mtd_partition bfin_plat_nand_partitions[] = { 252 { ··· 323 } 324 #endif 325 326 + #if IS_ENABLED(CONFIG_MTD_DATAFLASH) 327 static struct mtd_partition bfin_spi_dataflash_partitions[] = { 328 { 329 .name = "bootloader", ··· 369 }; 370 #endif 371 372 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 373 /* SPI (0) */ 374 static struct resource bfin_spi0_resource[] = { 375 [0] = { ··· 408 #endif 409 410 static struct spi_board_info bfin_spi_board_info[] __initdata = { 411 + #if IS_ENABLED(CONFIG_SPI_SPIDEV) 412 { 413 .modalias = "spidev", 414 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 416 .chip_select = 3, 417 }, 418 #endif 419 + #if IS_ENABLED(CONFIG_MTD_DATAFLASH) 420 { /* DataFlash chip */ 421 .modalias = "mtd_dataflash", 422 .max_speed_hz = 33250000, /* max spi clock (SCK) speed in HZ */ ··· 472 static struct platform_device *acvilon_devices[] __initdata = { 473 &bfin_dpmc, 474 475 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 476 &bfin_spi0_device, 477 #endif 478 479 + #if IS_ENABLED(CONFIG_SERIAL_BFIN) 480 #ifdef CONFIG_SERIAL_BFIN_UART0 481 &bfin_uart0_device, 482 #endif ··· 484 485 &bfin_gpios_device, 486 487 + #if IS_ENABLED(CONFIG_SMSC911X) 488 &smsc911x_device, 489 #endif 490 491 &bfin_i2c_pca_device, 492 493 + #if IS_ENABLED(CONFIG_MTD_NAND_PLATFORM) 494 &bfin_async_nand_device, 495 #endif 496 497 + #if IS_ENABLED(CONFIG_MTD_PLATRAM) 498 &mtd_ram_device, 499 #endif 500
+28 -28
arch/blackfin/mach-bf561/boards/cm_bf561.c
··· 13 #include <linux/mtd/partitions.h> 14 #include <linux/spi/spi.h> 15 #include <linux/spi/flash.h> 16 - #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 17 #include <linux/usb/isp1362.h> 18 #endif 19 #include <linux/ata_platform.h> ··· 29 */ 30 const char bfin_board_name[] = "Bluetechnix CM BF561"; 31 32 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 33 /* all SPI peripherals info goes here */ 34 35 - #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) 36 static struct mtd_partition bfin_spi_flash_partitions[] = { 37 { 38 .name = "bootloader(spi)", ··· 64 #endif 65 66 static struct spi_board_info bfin_spi_board_info[] __initdata = { 67 - #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) 68 { 69 /* the modalias must be the same as spi device driver name */ 70 .modalias = "m25p80", /* Name of spi_driver for this device */ ··· 77 }, 78 #endif 79 80 - #if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) 81 { 82 .modalias = "ad183x", 83 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 85 .chip_select = 4, 86 }, 87 #endif 88 - #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 89 { 90 .modalias = "mmc_spi", 91 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ ··· 134 #endif /* spi master and devices */ 135 136 137 - #if defined(CONFIG_FB_HITACHI_TX09) || defined(CONFIG_FB_HITACHI_TX09_MODULE) 138 static struct platform_device hitachi_fb_device = { 139 .name = "hitachi-tx09", 140 }; 141 #endif 142 143 144 - #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 145 #include <linux/smc91x.h> 146 147 static struct smc91x_platdata smc91x_info = { ··· 173 }; 174 #endif 175 176 - #if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) 177 #include <linux/smsc911x.h> 178 179 static struct resource smsc911x_resources[] = { ··· 208 }; 209 #endif 210 211 - #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 212 static struct resource net2272_bfin_resources[] = { 213 { 214 .start = 0x24000000, ··· 229 }; 230 #endif 231 232 - #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 233 static struct resource isp1362_hcd_resources[] = { 234 { 235 .start = 0x24008000, ··· 268 }; 269 #endif 270 271 - #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 272 #ifdef CONFIG_SERIAL_BFIN_UART0 273 static struct resource bfin_uart0_resources[] = { 274 { ··· 319 #endif 320 #endif 321 322 - #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 323 #ifdef CONFIG_BFIN_SIR0 324 static struct resource bfin_sir0_resources[] = { 325 { ··· 348 #endif 349 #endif 350 351 - #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 352 #define PATA_INT IRQ_PF46 353 354 static struct pata_platform_info bfin_pata_platform_data = { ··· 385 }; 386 #endif 387 388 - #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 389 static struct mtd_partition para_partitions[] = { 390 { 391 .name = "bootloader(nor)", ··· 456 457 &bfin_dpmc, 458 459 - #if defined(CONFIG_FB_HITACHI_TX09) || defined(CONFIG_FB_HITACHI_TX09_MODULE) 460 &hitachi_fb_device, 461 #endif 462 463 - #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 464 #ifdef CONFIG_SERIAL_BFIN_UART0 465 &bfin_uart0_device, 466 #endif 467 #endif 468 469 - #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 470 #ifdef CONFIG_BFIN_SIR0 471 &bfin_sir0_device, 472 #endif 473 #endif 474 475 - #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 476 &isp1362_hcd_device, 477 #endif 478 479 - #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 480 &smc91x_device, 481 #endif 482 483 - #if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) 484 &smsc911x_device, 485 #endif 486 487 - #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 488 &net2272_bfin_device, 489 #endif 490 491 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 492 &bfin_spi0_device, 493 #endif 494 495 - #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 496 &bfin_pata_device, 497 #endif 498 499 - #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 500 &para_flash_device, 501 #endif 502 }; 503 504 static int __init net2272_init(void) 505 { 506 - #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 507 int ret; 508 509 ret = gpio_request(GPIO_PF46, "net2272"); ··· 523 { 524 printk(KERN_INFO "%s(): registering device resources\n", __func__); 525 platform_add_devices(cm_bf561_devices, ARRAY_SIZE(cm_bf561_devices)); 526 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 527 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 528 #endif 529 530 - #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 531 irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN); 532 #endif 533
··· 13 #include <linux/mtd/partitions.h> 14 #include <linux/spi/spi.h> 15 #include <linux/spi/flash.h> 16 + #if IS_ENABLED(CONFIG_USB_ISP1362_HCD) 17 #include <linux/usb/isp1362.h> 18 #endif 19 #include <linux/ata_platform.h> ··· 29 */ 30 const char bfin_board_name[] = "Bluetechnix CM BF561"; 31 32 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 33 /* all SPI peripherals info goes here */ 34 35 + #if IS_ENABLED(CONFIG_MTD_M25P80) 36 static struct mtd_partition bfin_spi_flash_partitions[] = { 37 { 38 .name = "bootloader(spi)", ··· 64 #endif 65 66 static struct spi_board_info bfin_spi_board_info[] __initdata = { 67 + #if IS_ENABLED(CONFIG_MTD_M25P80) 68 { 69 /* the modalias must be the same as spi device driver name */ 70 .modalias = "m25p80", /* Name of spi_driver for this device */ ··· 77 }, 78 #endif 79 80 + #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD183X) 81 { 82 .modalias = "ad183x", 83 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 85 .chip_select = 4, 86 }, 87 #endif 88 + #if IS_ENABLED(CONFIG_MMC_SPI) 89 { 90 .modalias = "mmc_spi", 91 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ ··· 134 #endif /* spi master and devices */ 135 136 137 + #if IS_ENABLED(CONFIG_FB_HITACHI_TX09) 138 static struct platform_device hitachi_fb_device = { 139 .name = "hitachi-tx09", 140 }; 141 #endif 142 143 144 + #if IS_ENABLED(CONFIG_SMC91X) 145 #include <linux/smc91x.h> 146 147 static struct smc91x_platdata smc91x_info = { ··· 173 }; 174 #endif 175 176 + #if IS_ENABLED(CONFIG_SMSC911X) 177 #include <linux/smsc911x.h> 178 179 static struct resource smsc911x_resources[] = { ··· 208 }; 209 #endif 210 211 + #if IS_ENABLED(CONFIG_USB_NET2272) 212 static struct resource net2272_bfin_resources[] = { 213 { 214 .start = 0x24000000, ··· 229 }; 230 #endif 231 232 + #if IS_ENABLED(CONFIG_USB_ISP1362_HCD) 233 static struct resource isp1362_hcd_resources[] = { 234 { 235 .start = 0x24008000, ··· 268 }; 269 #endif 270 271 + #if IS_ENABLED(CONFIG_SERIAL_BFIN) 272 #ifdef CONFIG_SERIAL_BFIN_UART0 273 static struct resource bfin_uart0_resources[] = { 274 { ··· 319 #endif 320 #endif 321 322 + #if IS_ENABLED(CONFIG_BFIN_SIR) 323 #ifdef CONFIG_BFIN_SIR0 324 static struct resource bfin_sir0_resources[] = { 325 { ··· 348 #endif 349 #endif 350 351 + #if IS_ENABLED(CONFIG_PATA_PLATFORM) 352 #define PATA_INT IRQ_PF46 353 354 static struct pata_platform_info bfin_pata_platform_data = { ··· 385 }; 386 #endif 387 388 + #if IS_ENABLED(CONFIG_MTD_PHYSMAP) 389 static struct mtd_partition para_partitions[] = { 390 { 391 .name = "bootloader(nor)", ··· 456 457 &bfin_dpmc, 458 459 + #if IS_ENABLED(CONFIG_FB_HITACHI_TX09) 460 &hitachi_fb_device, 461 #endif 462 463 + #if IS_ENABLED(CONFIG_SERIAL_BFIN) 464 #ifdef CONFIG_SERIAL_BFIN_UART0 465 &bfin_uart0_device, 466 #endif 467 #endif 468 469 + #if IS_ENABLED(CONFIG_BFIN_SIR) 470 #ifdef CONFIG_BFIN_SIR0 471 &bfin_sir0_device, 472 #endif 473 #endif 474 475 + #if IS_ENABLED(CONFIG_USB_ISP1362_HCD) 476 &isp1362_hcd_device, 477 #endif 478 479 + #if IS_ENABLED(CONFIG_SMC91X) 480 &smc91x_device, 481 #endif 482 483 + #if IS_ENABLED(CONFIG_SMSC911X) 484 &smsc911x_device, 485 #endif 486 487 + #if IS_ENABLED(CONFIG_USB_NET2272) 488 &net2272_bfin_device, 489 #endif 490 491 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 492 &bfin_spi0_device, 493 #endif 494 495 + #if IS_ENABLED(CONFIG_PATA_PLATFORM) 496 &bfin_pata_device, 497 #endif 498 499 + #if IS_ENABLED(CONFIG_MTD_PHYSMAP) 500 &para_flash_device, 501 #endif 502 }; 503 504 static int __init net2272_init(void) 505 { 506 + #if IS_ENABLED(CONFIG_USB_NET2272) 507 int ret; 508 509 ret = gpio_request(GPIO_PF46, "net2272"); ··· 523 { 524 printk(KERN_INFO "%s(): registering device resources\n", __func__); 525 platform_add_devices(cm_bf561_devices, ARRAY_SIZE(cm_bf561_devices)); 526 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 527 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 528 #endif 529 530 + #if IS_ENABLED(CONFIG_PATA_PLATFORM) 531 irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN); 532 #endif 533
+34 -40
arch/blackfin/mach-bf561/boards/ezkit.c
··· 25 */ 26 const char bfin_board_name[] = "ADI BF561-EZKIT"; 27 28 - #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) 29 #include <linux/usb/isp1760.h> 30 static struct resource bfin_isp1760_resources[] = { 31 [0] = { ··· 60 }; 61 #endif 62 63 - #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 64 #include <linux/usb/isp1362.h> 65 66 static struct resource isp1362_hcd_resources[] = { ··· 101 }; 102 #endif 103 104 - #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 105 static struct resource net2272_bfin_resources[] = { 106 { 107 .start = 0x2C000000, ··· 129 * USB-LAN EzExtender board 130 * Driver needs to know address, irq and flag pin. 131 */ 132 - #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 133 #include <linux/smc91x.h> 134 135 static struct smc91x_platdata smc91x_info = { ··· 163 }; 164 #endif 165 166 - #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 167 #ifdef CONFIG_SERIAL_BFIN_UART0 168 static struct resource bfin_uart0_resources[] = { 169 { ··· 214 #endif 215 #endif 216 217 - #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 218 #ifdef CONFIG_BFIN_SIR0 219 static struct resource bfin_sir0_resources[] = { 220 { ··· 243 #endif 244 #endif 245 246 - #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 247 static struct mtd_partition ezkit_partitions[] = { 248 { 249 .name = "bootloader(nor)", ··· 291 }; 292 #endif 293 294 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 295 /* SPI (0) */ 296 static struct resource bfin_spi0_resource[] = { 297 [0] = { ··· 330 #endif 331 332 static struct spi_board_info bfin_spi_board_info[] __initdata = { 333 - #if defined(CONFIG_SND_BF5XX_SOC_AD183X) \ 334 - || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) 335 { 336 .modalias = "ad183x", 337 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 340 .mode = SPI_MODE_3, 341 }, 342 #endif 343 - #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 344 { 345 .modalias = "spidev", 346 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 350 #endif 351 }; 352 353 - #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 354 #include <linux/input.h> 355 #include <linux/gpio_keys.h> 356 ··· 374 }; 375 #endif 376 377 - #if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE) 378 #include <linux/i2c-gpio.h> 379 380 static struct i2c_gpio_platform_data i2c_gpio_data = { ··· 421 }, 422 }; 423 424 - #if defined(CONFIG_VIDEO_BLACKFIN_CAPTURE) \ 425 - || defined(CONFIG_VIDEO_BLACKFIN_CAPTURE_MODULE) 426 #include <linux/videodev2.h> 427 #include <media/blackfin/bfin_capture.h> 428 #include <media/blackfin/ppi.h> ··· 441 .pin_req = ppi_req, 442 }; 443 444 - #if defined(CONFIG_VIDEO_ADV7183) \ 445 - || defined(CONFIG_VIDEO_ADV7183_MODULE) 446 #include <media/adv7183.h> 447 static struct v4l2_input adv7183_inputs[] = { 448 { ··· 512 }; 513 #endif 514 515 - #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 516 static struct platform_device bfin_i2s = { 517 .name = "bfin-i2s", 518 .id = CONFIG_SND_BF5XX_SPORT_NUM, ··· 520 }; 521 #endif 522 523 - #if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) 524 static struct platform_device bfin_ac97 = { 525 .name = "bfin-ac97", 526 .id = CONFIG_SND_BF5XX_SPORT_NUM, ··· 528 }; 529 #endif 530 531 - #if defined(CONFIG_SND_BF5XX_SOC_AD1836) \ 532 - || defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE) 533 static const char * const ad1836_link[] = { 534 "bfin-i2s.0", 535 "spi0.4", ··· 546 547 &bfin_dpmc, 548 549 - #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 550 &smc91x_device, 551 #endif 552 553 - #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 554 &net2272_bfin_device, 555 #endif 556 557 - #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) 558 &bfin_isp1760_device, 559 #endif 560 561 - #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 562 &bfin_spi0_device, 563 #endif 564 565 - #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 566 #ifdef CONFIG_SERIAL_BFIN_UART0 567 &bfin_uart0_device, 568 #endif 569 #endif 570 571 - #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 572 #ifdef CONFIG_BFIN_SIR0 573 &bfin_sir0_device, 574 #endif 575 #endif 576 577 - #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 578 &bfin_device_gpiokeys, 579 #endif 580 581 - #if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE) 582 &i2c_gpio_device, 583 #endif 584 585 - #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 586 &isp1362_hcd_device, 587 #endif 588 589 - #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 590 &ezkit_flash_device, 591 #endif 592 593 - #if defined(CONFIG_VIDEO_BLACKFIN_CAPTURE) \ 594 - || defined(CONFIG_VIDEO_BLACKFIN_CAPTURE_MODULE) 595 &bfin_capture_device, 596 #endif 597 598 - #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 599 &bfin_i2s, 600 #endif 601 602 - #if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) 603 &bfin_ac97, 604 #endif 605 606 - #if defined(CONFIG_SND_BF5XX_SOC_AD1836) || \ 607 - defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE) 608 &bfin_ad1836_machine, 609 #endif 610 }; 611 612 static int __init net2272_init(void) 613 { 614 - #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 615 int ret; 616 617 ret = gpio_request(GPIO_PF11, "net2272"); ··· 635 if (ret < 0) 636 return ret; 637 638 - #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 639 bfin_write_FIO0_DIR(bfin_read_FIO0_DIR() | (1 << 12)); 640 SSYNC(); 641 #endif 642 643 - #if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) 644 bfin_write_FIO0_DIR(bfin_read_FIO0_DIR() | (1 << 15)); 645 bfin_write_FIO0_FLAG_S(1 << 15); 646 SSYNC();
··· 25 */ 26 const char bfin_board_name[] = "ADI BF561-EZKIT"; 27 28 + #if IS_ENABLED(CONFIG_USB_ISP1760_HCD) 29 #include <linux/usb/isp1760.h> 30 static struct resource bfin_isp1760_resources[] = { 31 [0] = { ··· 60 }; 61 #endif 62 63 + #if IS_ENABLED(CONFIG_USB_ISP1362_HCD) 64 #include <linux/usb/isp1362.h> 65 66 static struct resource isp1362_hcd_resources[] = { ··· 101 }; 102 #endif 103 104 + #if IS_ENABLED(CONFIG_USB_NET2272) 105 static struct resource net2272_bfin_resources[] = { 106 { 107 .start = 0x2C000000, ··· 129 * USB-LAN EzExtender board 130 * Driver needs to know address, irq and flag pin. 131 */ 132 + #if IS_ENABLED(CONFIG_SMC91X) 133 #include <linux/smc91x.h> 134 135 static struct smc91x_platdata smc91x_info = { ··· 163 }; 164 #endif 165 166 + #if IS_ENABLED(CONFIG_SERIAL_BFIN) 167 #ifdef CONFIG_SERIAL_BFIN_UART0 168 static struct resource bfin_uart0_resources[] = { 169 { ··· 214 #endif 215 #endif 216 217 + #if IS_ENABLED(CONFIG_BFIN_SIR) 218 #ifdef CONFIG_BFIN_SIR0 219 static struct resource bfin_sir0_resources[] = { 220 { ··· 243 #endif 244 #endif 245 246 + #if IS_ENABLED(CONFIG_MTD_PHYSMAP) 247 static struct mtd_partition ezkit_partitions[] = { 248 { 249 .name = "bootloader(nor)", ··· 291 }; 292 #endif 293 294 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 295 /* SPI (0) */ 296 static struct resource bfin_spi0_resource[] = { 297 [0] = { ··· 330 #endif 331 332 static struct spi_board_info bfin_spi_board_info[] __initdata = { 333 + #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD183X) 334 { 335 .modalias = "ad183x", 336 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 341 .mode = SPI_MODE_3, 342 }, 343 #endif 344 + #if IS_ENABLED(CONFIG_SPI_SPIDEV) 345 { 346 .modalias = "spidev", 347 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 351 #endif 352 }; 353 354 + #if IS_ENABLED(CONFIG_KEYBOARD_GPIO) 355 #include <linux/input.h> 356 #include <linux/gpio_keys.h> 357 ··· 375 }; 376 #endif 377 378 + #if IS_ENABLED(CONFIG_I2C_GPIO) 379 #include <linux/i2c-gpio.h> 380 381 static struct i2c_gpio_platform_data i2c_gpio_data = { ··· 422 }, 423 }; 424 425 + #if IS_ENABLED(CONFIG_VIDEO_BLACKFIN_CAPTURE) 426 #include <linux/videodev2.h> 427 #include <media/blackfin/bfin_capture.h> 428 #include <media/blackfin/ppi.h> ··· 443 .pin_req = ppi_req, 444 }; 445 446 + #if IS_ENABLED(CONFIG_VIDEO_ADV7183) 447 #include <media/adv7183.h> 448 static struct v4l2_input adv7183_inputs[] = { 449 { ··· 515 }; 516 #endif 517 518 + #if IS_ENABLED(CONFIG_SND_BF5XX_I2S) 519 static struct platform_device bfin_i2s = { 520 .name = "bfin-i2s", 521 .id = CONFIG_SND_BF5XX_SPORT_NUM, ··· 523 }; 524 #endif 525 526 + #if IS_ENABLED(CONFIG_SND_BF5XX_AC97) 527 static struct platform_device bfin_ac97 = { 528 .name = "bfin-ac97", 529 .id = CONFIG_SND_BF5XX_SPORT_NUM, ··· 531 }; 532 #endif 533 534 + #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD1836) 535 static const char * const ad1836_link[] = { 536 "bfin-i2s.0", 537 "spi0.4", ··· 550 551 &bfin_dpmc, 552 553 + #if IS_ENABLED(CONFIG_SMC91X) 554 &smc91x_device, 555 #endif 556 557 + #if IS_ENABLED(CONFIG_USB_NET2272) 558 &net2272_bfin_device, 559 #endif 560 561 + #if IS_ENABLED(CONFIG_USB_ISP1760_HCD) 562 &bfin_isp1760_device, 563 #endif 564 565 + #if IS_ENABLED(CONFIG_SPI_BFIN5XX) 566 &bfin_spi0_device, 567 #endif 568 569 + #if IS_ENABLED(CONFIG_SERIAL_BFIN) 570 #ifdef CONFIG_SERIAL_BFIN_UART0 571 &bfin_uart0_device, 572 #endif 573 #endif 574 575 + #if IS_ENABLED(CONFIG_BFIN_SIR) 576 #ifdef CONFIG_BFIN_SIR0 577 &bfin_sir0_device, 578 #endif 579 #endif 580 581 + #if IS_ENABLED(CONFIG_KEYBOARD_GPIO) 582 &bfin_device_gpiokeys, 583 #endif 584 585 + #if IS_ENABLED(CONFIG_I2C_GPIO) 586 &i2c_gpio_device, 587 #endif 588 589 + #if IS_ENABLED(CONFIG_USB_ISP1362_HCD) 590 &isp1362_hcd_device, 591 #endif 592 593 + #if IS_ENABLED(CONFIG_MTD_PHYSMAP) 594 &ezkit_flash_device, 595 #endif 596 597 + #if IS_ENABLED(CONFIG_VIDEO_BLACKFIN_CAPTURE) 598 &bfin_capture_device, 599 #endif 600 601 + #if IS_ENABLED(CONFIG_SND_BF5XX_I2S) 602 &bfin_i2s, 603 #endif 604 605 + #if IS_ENABLED(CONFIG_SND_BF5XX_AC97) 606 &bfin_ac97, 607 #endif 608 609 + #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD1836) 610 &bfin_ad1836_machine, 611 #endif 612 }; 613 614 static int __init net2272_init(void) 615 { 616 + #if IS_ENABLED(CONFIG_USB_NET2272) 617 int ret; 618 619 ret = gpio_request(GPIO_PF11, "net2272"); ··· 641 if (ret < 0) 642 return ret; 643 644 + #if IS_ENABLED(CONFIG_SMC91X) 645 bfin_write_FIO0_DIR(bfin_read_FIO0_DIR() | (1 << 12)); 646 SSYNC(); 647 #endif 648 649 + #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD183X) 650 bfin_write_FIO0_DIR(bfin_read_FIO0_DIR() | (1 << 15)); 651 bfin_write_FIO0_FLAG_S(1 << 15); 652 SSYNC();
+4 -4
arch/blackfin/mach-bf561/boards/tepla.c
··· 42 .resource = smc91x_resources, 43 }; 44 45 - #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 46 #ifdef CONFIG_SERIAL_BFIN_UART0 47 static struct resource bfin_uart0_resources[] = { 48 { ··· 93 #endif 94 #endif 95 96 - #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 97 #ifdef CONFIG_BFIN_SIR0 98 static struct resource bfin_sir0_resources[] = { 99 { ··· 125 static struct platform_device *tepla_devices[] __initdata = { 126 &smc91x_device, 127 128 - #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 129 #ifdef CONFIG_SERIAL_BFIN_UART0 130 &bfin_uart0_device, 131 #endif 132 #endif 133 134 - #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 135 #ifdef CONFIG_BFIN_SIR0 136 &bfin_sir0_device, 137 #endif
··· 42 .resource = smc91x_resources, 43 }; 44 45 + #if IS_ENABLED(CONFIG_SERIAL_BFIN) 46 #ifdef CONFIG_SERIAL_BFIN_UART0 47 static struct resource bfin_uart0_resources[] = { 48 { ··· 93 #endif 94 #endif 95 96 + #if IS_ENABLED(CONFIG_BFIN_SIR) 97 #ifdef CONFIG_BFIN_SIR0 98 static struct resource bfin_sir0_resources[] = { 99 { ··· 125 static struct platform_device *tepla_devices[] __initdata = { 126 &smc91x_device, 127 128 + #if IS_ENABLED(CONFIG_SERIAL_BFIN) 129 #ifdef CONFIG_SERIAL_BFIN_UART0 130 &bfin_uart0_device, 131 #endif 132 #endif 133 134 + #if IS_ENABLED(CONFIG_BFIN_SIR) 135 #ifdef CONFIG_BFIN_SIR0 136 &bfin_sir0_device, 137 #endif
+58 -73
arch/blackfin/mach-bf609/boards/ezkit.c
··· 39 * Driver needs to know address, irq and flag pin. 40 */ 41 42 - #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) 43 #include <linux/usb/isp1760.h> 44 static struct resource bfin_isp1760_resources[] = { 45 [0] = { ··· 74 }; 75 #endif 76 77 - #if defined(CONFIG_INPUT_BFIN_ROTARY) || defined(CONFIG_INPUT_BFIN_ROTARY_MODULE) 78 #include <asm/bfin_rotary.h> 79 80 static struct bfin_rotary_platform_data bfin_rotary_data = { ··· 105 }; 106 #endif 107 108 - #if defined(CONFIG_STMMAC_ETH) || defined(CONFIG_STMMAC_ETH_MODULE) 109 #include <linux/stmmac.h> 110 #include <linux/phy.h> 111 ··· 159 }; 160 #endif 161 162 - #if defined(CONFIG_INPUT_ADXL34X) || defined(CONFIG_INPUT_ADXL34X_MODULE) 163 #include <linux/input/adxl34x.h> 164 static const struct adxl34x_platform_data adxl34x_info = { 165 .x_axis_offset = 0, ··· 198 }; 199 #endif 200 201 - #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 202 static struct platform_device rtc_device = { 203 .name = "rtc-bfin", 204 .id = -1, 205 }; 206 #endif 207 208 - #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 209 #ifdef CONFIG_SERIAL_BFIN_UART0 210 static struct resource bfin_uart0_resources[] = { 211 { ··· 355 #endif 356 #endif 357 358 - #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 359 #ifdef CONFIG_BFIN_SIR0 360 static struct resource bfin_sir0_resources[] = { 361 { ··· 408 #endif 409 #endif 410 411 - #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) 412 static struct resource musb_resources[] = { 413 [0] = { 414 .start = 0xFFCC1000, ··· 464 }; 465 #endif 466 467 - #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 468 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 469 static struct resource bfin_sport0_uart_resources[] = { 470 { ··· 569 #endif 570 #endif 571 572 - #if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) 573 574 static unsigned short bfin_can0_peripherals[] = { 575 P_CAN0_RX, P_CAN0_TX, 0 ··· 610 611 #endif 612 613 - #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) 614 static struct mtd_partition partition_info[] = { 615 { 616 .name = "bootloader(nand)", ··· 660 }; 661 #endif 662 663 - #if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE) 664 665 static struct bfin_sd_host bfin_sdh_data = { 666 .dma_chan = CH_RSI, ··· 677 }; 678 #endif 679 680 - #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 681 static struct mtd_partition ezkit_partitions[] = { 682 { 683 .name = "bootloader(nor)", ··· 741 }; 742 #endif 743 744 - #if defined(CONFIG_MTD_M25P80) \ 745 - || defined(CONFIG_MTD_M25P80_MODULE) 746 /* SPI flash chip (w25q32) */ 747 static struct mtd_partition bfin_spi_flash_partitions[] = { 748 { ··· 772 }; 773 #endif 774 775 - #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 776 static struct bfin_spi3_chip spidev_chip_info = { 777 .enable_dma = true, 778 }; 779 #endif 780 781 - #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 782 static struct platform_device bfin_i2s_pcm = { 783 .name = "bfin-i2s-pcm-audio", 784 .id = -1, 785 }; 786 #endif 787 788 - #if defined(CONFIG_SND_BF6XX_SOC_I2S) || \ 789 - defined(CONFIG_SND_BF6XX_SOC_I2S_MODULE) 790 #include <asm/bfin_sport3.h> 791 static struct resource bfin_snd_resources[] = { 792 { ··· 839 }; 840 #endif 841 842 - #if defined(CONFIG_SND_BF5XX_SOC_AD1836) \ 843 - || defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE) 844 static const char * const ad1836_link[] = { 845 "bfin-i2s.0", 846 "spi0.76", ··· 853 }; 854 #endif 855 856 - #if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1X61) || \ 857 - defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1X61_MODULE) 858 static struct platform_device adau1761_device = { 859 .name = "bfin-eval-adau1x61", 860 }; 861 #endif 862 863 - #if defined(CONFIG_SND_SOC_ADAU1761) || defined(CONFIG_SND_SOC_ADAU1761_MODULE) 864 #include <sound/adau17x1.h> 865 static struct adau1761_platform_data adau1761_info = { 866 .lineout_mode = ADAU1761_OUTPUT_MODE_LINE, ··· 867 }; 868 #endif 869 870 - #if defined(CONFIG_VIDEO_BLACKFIN_CAPTURE) \ 871 - || defined(CONFIG_VIDEO_BLACKFIN_CAPTURE_MODULE) 872 #include <linux/videodev2.h> 873 #include <media/blackfin/bfin_capture.h> 874 #include <media/blackfin/ppi.h> ··· 877 P_PPI0_D4, P_PPI0_D5, P_PPI0_D6, P_PPI0_D7, 878 P_PPI0_D8, P_PPI0_D9, P_PPI0_D10, P_PPI0_D11, 879 P_PPI0_D12, P_PPI0_D13, P_PPI0_D14, P_PPI0_D15, 880 - #if !defined(CONFIG_VIDEO_VS6624) && !defined(CONFIG_VIDEO_VS6624_MODULE) 881 P_PPI0_D16, P_PPI0_D17, P_PPI0_D18, P_PPI0_D19, 882 P_PPI0_D20, P_PPI0_D21, P_PPI0_D22, P_PPI0_D23, 883 #endif ··· 893 .pin_req = ppi_req, 894 }; 895 896 - #if defined(CONFIG_VIDEO_VS6624) \ 897 - || defined(CONFIG_VIDEO_VS6624_MODULE) 898 static struct v4l2_input vs6624_inputs[] = { 899 { 900 .index = 0, ··· 930 }; 931 #endif 932 933 - #if defined(CONFIG_VIDEO_ADV7842) \ 934 - || defined(CONFIG_VIDEO_ADV7842_MODULE) 935 #include <media/adv7842.h> 936 937 static struct v4l2_input adv7842_inputs[] = { ··· 1060 }; 1061 #endif 1062 1063 - #if defined(CONFIG_VIDEO_BLACKFIN_DISPLAY) \ 1064 - || defined(CONFIG_VIDEO_BLACKFIN_DISPLAY_MODULE) 1065 #include <linux/videodev2.h> 1066 #include <media/blackfin/bfin_display.h> 1067 #include <media/blackfin/ppi.h> ··· 1082 .pin_req = ppi_req_disp, 1083 }; 1084 1085 - #if defined(CONFIG_VIDEO_ADV7511) \ 1086 - || defined(CONFIG_VIDEO_ADV7511_MODULE) 1087 #include <media/adv7511.h> 1088 1089 static struct v4l2_output adv7511_outputs[] = { ··· 1304 }; 1305 #endif 1306 1307 - #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 1308 static const struct ad7877_platform_data bfin_ad7877_ts_info = { 1309 .model = 7877, 1310 .vref_delay_usecs = 50, /* internal, no capacitor */ ··· 1670 1671 #endif 1672 1673 - #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 1674 #include <linux/input.h> 1675 #include <linux/gpio_keys.h> 1676 ··· 1693 #endif 1694 1695 static struct spi_board_info bfin_spi_board_info[] __initdata = { 1696 - #if defined(CONFIG_MTD_M25P80) \ 1697 - || defined(CONFIG_MTD_M25P80_MODULE) 1698 { 1699 /* the modalias must be the same as spi device driver name */ 1700 .modalias = "m25p80", /* Name of spi_driver for this device */ ··· 1705 .mode = SPI_MODE_3, 1706 }, 1707 #endif 1708 - #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 1709 { 1710 .modalias = "ad7877", 1711 .platform_data = &bfin_ad7877_ts_info, ··· 1715 .chip_select = MAX_CTRL_CS + GPIO_PC15, /* SPI_SSEL4 */ 1716 }, 1717 #endif 1718 - #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 1719 { 1720 .modalias = "spidev", 1721 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 1724 .controller_data = &spidev_chip_info, 1725 }, 1726 #endif 1727 - #if defined(CONFIG_INPUT_ADXL34X_SPI) || defined(CONFIG_INPUT_ADXL34X_SPI_MODULE) 1728 { 1729 .modalias = "adxl34x", 1730 .platform_data = &adxl34x_info, ··· 1808 }; 1809 #endif /* spi master and devices */ 1810 1811 - #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 1812 static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; 1813 1814 static struct resource bfin_twi0_resource[] = { ··· 1861 #endif 1862 1863 static struct i2c_board_info __initdata bfin_i2c_board_info0[] = { 1864 - #if defined(CONFIG_INPUT_ADXL34X_I2C) || defined(CONFIG_INPUT_ADXL34X_I2C_MODULE) 1865 { 1866 I2C_BOARD_INFO("adxl34x", 0x53), 1867 .irq = IRQ_PC5, 1868 .platform_data = (void *)&adxl34x_info, 1869 }, 1870 #endif 1871 - #if defined(CONFIG_SND_SOC_ADAU1761) || defined(CONFIG_SND_SOC_ADAU1761_MODULE) 1872 { 1873 I2C_BOARD_INFO("adau1761", 0x38), 1874 .platform_data = (void *)&adau1761_info 1875 }, 1876 #endif 1877 - #if defined(CONFIG_SND_SOC_SSM2602) || defined(CONFIG_SND_SOC_SSM2602_MODULE) 1878 { 1879 I2C_BOARD_INFO("ssm2602", 0x1b), 1880 }, ··· 1932 &bfin_gpg_device, 1933 #endif 1934 1935 - #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 1936 &rtc_device, 1937 #endif 1938 1939 - #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 1940 #ifdef CONFIG_SERIAL_BFIN_UART0 1941 &bfin_uart0_device, 1942 #endif ··· 1945 #endif 1946 #endif 1947 1948 - #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 1949 #ifdef CONFIG_BFIN_SIR0 1950 &bfin_sir0_device, 1951 #endif ··· 1954 #endif 1955 #endif 1956 1957 - #if defined(CONFIG_STMMAC_ETH) || defined(CONFIG_STMMAC_ETH_MODULE) 1958 &bfin_eth_device, 1959 #endif 1960 1961 - #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) 1962 &musb_device, 1963 #endif 1964 1965 - #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) 1966 &bfin_isp1760_device, 1967 #endif 1968 1969 - #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 1970 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 1971 &bfin_sport0_uart_device, 1972 #endif ··· 1978 #endif 1979 #endif 1980 1981 - #if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) 1982 &bfin_can0_device, 1983 #endif 1984 1985 - #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) 1986 &bfin_nand_device, 1987 #endif 1988 1989 - #if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE) 1990 &bfin_sdh_device, 1991 #endif 1992 ··· 1995 &bf60x_spi_master1, 1996 #endif 1997 1998 - #if defined(CONFIG_INPUT_BFIN_ROTARY) || defined(CONFIG_INPUT_BFIN_ROTARY_MODULE) 1999 &bfin_rotary_device, 2000 #endif 2001 2002 - #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 2003 &i2c_bfin_twi0_device, 2004 #if !defined(CONFIG_BF542) 2005 &i2c_bfin_twi1_device, ··· 2014 &bfin_crypto_crc_device, 2015 #endif 2016 2017 - #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 2018 &bfin_device_gpiokeys, 2019 #endif 2020 2021 - #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 2022 &ezkit_flash_device, 2023 #endif 2024 - #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 2025 &bfin_i2s_pcm, 2026 #endif 2027 - #if defined(CONFIG_SND_BF6XX_SOC_I2S) || \ 2028 - defined(CONFIG_SND_BF6XX_SOC_I2S_MODULE) 2029 &bfin_i2s, 2030 #endif 2031 - #if defined(CONFIG_SND_BF5XX_SOC_AD1836) || \ 2032 - defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE) 2033 &bfin_ad1836_machine, 2034 #endif 2035 - #if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1X61) || \ 2036 - defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1X61_MODULE) 2037 &adau1761_device, 2038 #endif 2039 - #if defined(CONFIG_VIDEO_BLACKFIN_CAPTURE) \ 2040 - || defined(CONFIG_VIDEO_BLACKFIN_CAPTURE_MODULE) 2041 &bfin_capture_device, 2042 #endif 2043 - #if defined(CONFIG_VIDEO_BLACKFIN_DISPLAY) \ 2044 - || defined(CONFIG_VIDEO_BLACKFIN_DISPLAY_MODULE) 2045 &bfin_display_device, 2046 #endif 2047 ··· 2060 PIN_MAP_MUX_GROUP_DEFAULT("physmap-flash.0", "pinctrl-adi2.0", NULL, "smc0"), 2061 PIN_MAP_MUX_GROUP_DEFAULT("bf609_nl8048.2", "pinctrl-adi2.0", NULL, "ppi2_16b"), 2062 PIN_MAP_MUX_GROUP_DEFAULT("bfin_display.0", "pinctrl-adi2.0", NULL, "ppi0_16b"), 2063 - #if defined(CONFIG_VIDEO_MT9M114) || defined(CONFIG_VIDEO_MT9M114_MODULE) 2064 PIN_MAP_MUX_GROUP_DEFAULT("bfin_capture.0", "pinctrl-adi2.0", NULL, "ppi0_8b"), 2065 - #elif defined(CONFIG_VIDEO_VS6624) || defined(CONFIG_VIDEO_VS6624_MODULE) 2066 PIN_MAP_MUX_GROUP_DEFAULT("bfin_capture.0", "pinctrl-adi2.0", NULL, "ppi0_16b"), 2067 #else 2068 PIN_MAP_MUX_GROUP_DEFAULT("bfin_capture.0", "pinctrl-adi2.0", NULL, "ppi0_24b"),
··· 39 * Driver needs to know address, irq and flag pin. 40 */ 41 42 + #if IS_ENABLED(CONFIG_USB_ISP1760_HCD) 43 #include <linux/usb/isp1760.h> 44 static struct resource bfin_isp1760_resources[] = { 45 [0] = { ··· 74 }; 75 #endif 76 77 + #if IS_ENABLED(CONFIG_INPUT_BFIN_ROTARY) 78 #include <asm/bfin_rotary.h> 79 80 static struct bfin_rotary_platform_data bfin_rotary_data = { ··· 105 }; 106 #endif 107 108 + #if IS_ENABLED(CONFIG_STMMAC_ETH) 109 #include <linux/stmmac.h> 110 #include <linux/phy.h> 111 ··· 159 }; 160 #endif 161 162 + #if IS_ENABLED(CONFIG_INPUT_ADXL34X) 163 #include <linux/input/adxl34x.h> 164 static const struct adxl34x_platform_data adxl34x_info = { 165 .x_axis_offset = 0, ··· 198 }; 199 #endif 200 201 + #if IS_ENABLED(CONFIG_RTC_DRV_BFIN) 202 static struct platform_device rtc_device = { 203 .name = "rtc-bfin", 204 .id = -1, 205 }; 206 #endif 207 208 + #if IS_ENABLED(CONFIG_SERIAL_BFIN) 209 #ifdef CONFIG_SERIAL_BFIN_UART0 210 static struct resource bfin_uart0_resources[] = { 211 { ··· 355 #endif 356 #endif 357 358 + #if IS_ENABLED(CONFIG_BFIN_SIR) 359 #ifdef CONFIG_BFIN_SIR0 360 static struct resource bfin_sir0_resources[] = { 361 { ··· 408 #endif 409 #endif 410 411 + #if IS_ENABLED(CONFIG_USB_MUSB_HDRC) 412 static struct resource musb_resources[] = { 413 [0] = { 414 .start = 0xFFCC1000, ··· 464 }; 465 #endif 466 467 + #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT) 468 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 469 static struct resource bfin_sport0_uart_resources[] = { 470 { ··· 569 #endif 570 #endif 571 572 + #if IS_ENABLED(CONFIG_CAN_BFIN) 573 574 static unsigned short bfin_can0_peripherals[] = { 575 P_CAN0_RX, P_CAN0_TX, 0 ··· 610 611 #endif 612 613 + #if IS_ENABLED(CONFIG_MTD_NAND_BF5XX) 614 static struct mtd_partition partition_info[] = { 615 { 616 .name = "bootloader(nand)", ··· 660 }; 661 #endif 662 663 + #if IS_ENABLED(CONFIG_SDH_BFIN) 664 665 static struct bfin_sd_host bfin_sdh_data = { 666 .dma_chan = CH_RSI, ··· 677 }; 678 #endif 679 680 + #if IS_ENABLED(CONFIG_MTD_PHYSMAP) 681 static struct mtd_partition ezkit_partitions[] = { 682 { 683 .name = "bootloader(nor)", ··· 741 }; 742 #endif 743 744 + #if IS_ENABLED(CONFIG_MTD_M25P80) 745 /* SPI flash chip (w25q32) */ 746 static struct mtd_partition bfin_spi_flash_partitions[] = { 747 { ··· 773 }; 774 #endif 775 776 + #if IS_ENABLED(CONFIG_SPI_SPIDEV) 777 static struct bfin_spi3_chip spidev_chip_info = { 778 .enable_dma = true, 779 }; 780 #endif 781 782 + #if IS_ENABLED(CONFIG_SND_BF5XX_I2S) 783 static struct platform_device bfin_i2s_pcm = { 784 .name = "bfin-i2s-pcm-audio", 785 .id = -1, 786 }; 787 #endif 788 789 + #if IS_ENABLED(CONFIG_SND_BF6XX_SOC_I2S) 790 #include <asm/bfin_sport3.h> 791 static struct resource bfin_snd_resources[] = { 792 { ··· 841 }; 842 #endif 843 844 + #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD1836) 845 static const char * const ad1836_link[] = { 846 "bfin-i2s.0", 847 "spi0.76", ··· 856 }; 857 #endif 858 859 + #if IS_ENABLED(CONFIG_SND_SOC_BFIN_EVAL_ADAU1X61) 860 static struct platform_device adau1761_device = { 861 .name = "bfin-eval-adau1x61", 862 }; 863 #endif 864 865 + #if IS_ENABLED(CONFIG_SND_SOC_ADAU1761) 866 #include <sound/adau17x1.h> 867 static struct adau1761_platform_data adau1761_info = { 868 .lineout_mode = ADAU1761_OUTPUT_MODE_LINE, ··· 871 }; 872 #endif 873 874 + #if IS_ENABLED(CONFIG_VIDEO_BLACKFIN_CAPTURE) 875 #include <linux/videodev2.h> 876 #include <media/blackfin/bfin_capture.h> 877 #include <media/blackfin/ppi.h> ··· 882 P_PPI0_D4, P_PPI0_D5, P_PPI0_D6, P_PPI0_D7, 883 P_PPI0_D8, P_PPI0_D9, P_PPI0_D10, P_PPI0_D11, 884 P_PPI0_D12, P_PPI0_D13, P_PPI0_D14, P_PPI0_D15, 885 + #if !IS_ENABLED(CONFIG_VIDEO_VS6624) 886 P_PPI0_D16, P_PPI0_D17, P_PPI0_D18, P_PPI0_D19, 887 P_PPI0_D20, P_PPI0_D21, P_PPI0_D22, P_PPI0_D23, 888 #endif ··· 898 .pin_req = ppi_req, 899 }; 900 901 + #if IS_ENABLED(CONFIG_VIDEO_VS6624) 902 static struct v4l2_input vs6624_inputs[] = { 903 { 904 .index = 0, ··· 936 }; 937 #endif 938 939 + #if IS_ENABLED(CONFIG_VIDEO_ADV7842) 940 #include <media/adv7842.h> 941 942 static struct v4l2_input adv7842_inputs[] = { ··· 1067 }; 1068 #endif 1069 1070 + #if IS_ENABLED(CONFIG_VIDEO_BLACKFIN_DISPLAY) 1071 #include <linux/videodev2.h> 1072 #include <media/blackfin/bfin_display.h> 1073 #include <media/blackfin/ppi.h> ··· 1090 .pin_req = ppi_req_disp, 1091 }; 1092 1093 + #if IS_ENABLED(CONFIG_VIDEO_ADV7511) 1094 #include <media/adv7511.h> 1095 1096 static struct v4l2_output adv7511_outputs[] = { ··· 1313 }; 1314 #endif 1315 1316 + #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877) 1317 static const struct ad7877_platform_data bfin_ad7877_ts_info = { 1318 .model = 7877, 1319 .vref_delay_usecs = 50, /* internal, no capacitor */ ··· 1679 1680 #endif 1681 1682 + #if IS_ENABLED(CONFIG_KEYBOARD_GPIO) 1683 #include <linux/input.h> 1684 #include <linux/gpio_keys.h> 1685 ··· 1702 #endif 1703 1704 static struct spi_board_info bfin_spi_board_info[] __initdata = { 1705 + #if IS_ENABLED(CONFIG_MTD_M25P80) 1706 { 1707 /* the modalias must be the same as spi device driver name */ 1708 .modalias = "m25p80", /* Name of spi_driver for this device */ ··· 1715 .mode = SPI_MODE_3, 1716 }, 1717 #endif 1718 + #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877) 1719 { 1720 .modalias = "ad7877", 1721 .platform_data = &bfin_ad7877_ts_info, ··· 1725 .chip_select = MAX_CTRL_CS + GPIO_PC15, /* SPI_SSEL4 */ 1726 }, 1727 #endif 1728 + #if IS_ENABLED(CONFIG_SPI_SPIDEV) 1729 { 1730 .modalias = "spidev", 1731 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ ··· 1734 .controller_data = &spidev_chip_info, 1735 }, 1736 #endif 1737 + #if IS_ENABLED(CONFIG_INPUT_ADXL34X_SPI) 1738 { 1739 .modalias = "adxl34x", 1740 .platform_data = &adxl34x_info, ··· 1818 }; 1819 #endif /* spi master and devices */ 1820 1821 + #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI) 1822 static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; 1823 1824 static struct resource bfin_twi0_resource[] = { ··· 1871 #endif 1872 1873 static struct i2c_board_info __initdata bfin_i2c_board_info0[] = { 1874 + #if IS_ENABLED(CONFIG_INPUT_ADXL34X_I2C) 1875 { 1876 I2C_BOARD_INFO("adxl34x", 0x53), 1877 .irq = IRQ_PC5, 1878 .platform_data = (void *)&adxl34x_info, 1879 }, 1880 #endif 1881 + #if IS_ENABLED(CONFIG_SND_SOC_ADAU1761) 1882 { 1883 I2C_BOARD_INFO("adau1761", 0x38), 1884 .platform_data = (void *)&adau1761_info 1885 }, 1886 #endif 1887 + #if IS_ENABLED(CONFIG_SND_SOC_SSM2602) 1888 { 1889 I2C_BOARD_INFO("ssm2602", 0x1b), 1890 }, ··· 1942 &bfin_gpg_device, 1943 #endif 1944 1945 + #if IS_ENABLED(CONFIG_RTC_DRV_BFIN) 1946 &rtc_device, 1947 #endif 1948 1949 + #if IS_ENABLED(CONFIG_SERIAL_BFIN) 1950 #ifdef CONFIG_SERIAL_BFIN_UART0 1951 &bfin_uart0_device, 1952 #endif ··· 1955 #endif 1956 #endif 1957 1958 + #if IS_ENABLED(CONFIG_BFIN_SIR) 1959 #ifdef CONFIG_BFIN_SIR0 1960 &bfin_sir0_device, 1961 #endif ··· 1964 #endif 1965 #endif 1966 1967 + #if IS_ENABLED(CONFIG_STMMAC_ETH) 1968 &bfin_eth_device, 1969 #endif 1970 1971 + #if IS_ENABLED(CONFIG_USB_MUSB_HDRC) 1972 &musb_device, 1973 #endif 1974 1975 + #if IS_ENABLED(CONFIG_USB_ISP1760_HCD) 1976 &bfin_isp1760_device, 1977 #endif 1978 1979 + #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT) 1980 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 1981 &bfin_sport0_uart_device, 1982 #endif ··· 1988 #endif 1989 #endif 1990 1991 + #if IS_ENABLED(CONFIG_CAN_BFIN) 1992 &bfin_can0_device, 1993 #endif 1994 1995 + #if IS_ENABLED(CONFIG_MTD_NAND_BF5XX) 1996 &bfin_nand_device, 1997 #endif 1998 1999 + #if IS_ENABLED(CONFIG_SDH_BFIN) 2000 &bfin_sdh_device, 2001 #endif 2002 ··· 2005 &bf60x_spi_master1, 2006 #endif 2007 2008 + #if IS_ENABLED(CONFIG_INPUT_BFIN_ROTARY) 2009 &bfin_rotary_device, 2010 #endif 2011 2012 + #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI) 2013 &i2c_bfin_twi0_device, 2014 #if !defined(CONFIG_BF542) 2015 &i2c_bfin_twi1_device, ··· 2024 &bfin_crypto_crc_device, 2025 #endif 2026 2027 + #if IS_ENABLED(CONFIG_KEYBOARD_GPIO) 2028 &bfin_device_gpiokeys, 2029 #endif 2030 2031 + #if IS_ENABLED(CONFIG_MTD_PHYSMAP) 2032 &ezkit_flash_device, 2033 #endif 2034 + #if IS_ENABLED(CONFIG_SND_BF5XX_I2S) 2035 &bfin_i2s_pcm, 2036 #endif 2037 + #if IS_ENABLED(CONFIG_SND_BF6XX_SOC_I2S) 2038 &bfin_i2s, 2039 #endif 2040 + #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD1836) 2041 &bfin_ad1836_machine, 2042 #endif 2043 + #if IS_ENABLED(CONFIG_SND_SOC_BFIN_EVAL_ADAU1X61) 2044 &adau1761_device, 2045 #endif 2046 + #if IS_ENABLED(CONFIG_VIDEO_BLACKFIN_CAPTURE) 2047 &bfin_capture_device, 2048 #endif 2049 + #if IS_ENABLED(CONFIG_VIDEO_BLACKFIN_DISPLAY) 2050 &bfin_display_device, 2051 #endif 2052 ··· 2075 PIN_MAP_MUX_GROUP_DEFAULT("physmap-flash.0", "pinctrl-adi2.0", NULL, "smc0"), 2076 PIN_MAP_MUX_GROUP_DEFAULT("bf609_nl8048.2", "pinctrl-adi2.0", NULL, "ppi2_16b"), 2077 PIN_MAP_MUX_GROUP_DEFAULT("bfin_display.0", "pinctrl-adi2.0", NULL, "ppi0_16b"), 2078 + #if IS_ENABLED(CONFIG_VIDEO_MT9M114) 2079 PIN_MAP_MUX_GROUP_DEFAULT("bfin_capture.0", "pinctrl-adi2.0", NULL, "ppi0_8b"), 2080 + #elif IS_ENABLED(CONFIG_VIDEO_VS6624) 2081 PIN_MAP_MUX_GROUP_DEFAULT("bfin_capture.0", "pinctrl-adi2.0", NULL, "ppi0_16b"), 2082 #else 2083 PIN_MAP_MUX_GROUP_DEFAULT("bfin_capture.0", "pinctrl-adi2.0", NULL, "ppi0_24b"),
-18
arch/blackfin/mach-bf609/clock.c
··· 73 bfin_write32(reg, val2); 74 } 75 76 - static void clk_reg_set_bits(u32 reg, uint32_t mask) 77 - { 78 - u32 val; 79 - 80 - val = bfin_read32(reg); 81 - val |= mask; 82 - bfin_write32(reg, val); 83 - } 84 - 85 - static void clk_reg_clear_bits(u32 reg, uint32_t mask) 86 - { 87 - u32 val; 88 - 89 - val = bfin_read32(reg); 90 - val &= ~mask; 91 - bfin_write32(reg, val); 92 - } 93 - 94 int wait_for_pll_align(void) 95 { 96 int i = 10000;
··· 73 bfin_write32(reg, val2); 74 } 75 76 int wait_for_pll_align(void) 77 { 78 int i = 10000;
+1 -1
arch/blackfin/mach-bf609/pm.c
··· 210 211 #ifdef CONFIG_PM_BFIN_WAKE_PB15 212 wakeup |= PB15WE; 213 - # if CONFIG_PM_BFIN_WAKE_PA15_POL 214 wakeup_pol |= PB15WE; 215 # endif 216 #endif
··· 210 211 #ifdef CONFIG_PM_BFIN_WAKE_PB15 212 wakeup |= PB15WE; 213 + # if CONFIG_PM_BFIN_WAKE_PB15_POL 214 wakeup_pol |= PB15WE; 215 # endif 216 #endif