From 30fc7ebe848fe088969b7a4d26db8f86503d2b90 Mon Sep 17 00:00:00 2001 From: Paul Bolle Date: Wed, 20 Mar 2013 00:33:21 +0100 Subject: blackfin: bf60x: fix typo "CONFIG_PM_BFIN_WAKE_PA15_POL" Signed-off-by: Paul Bolle Signed-off-by: Steven Miao --- arch/blackfin/mach-bf609/pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/blackfin/mach-bf609/pm.c b/arch/blackfin/mach-bf609/pm.c index ad505d9db4a8..0cdd6955c7be 100644 --- a/arch/blackfin/mach-bf609/pm.c +++ b/arch/blackfin/mach-bf609/pm.c @@ -210,7 +210,7 @@ void bf609_cpu_pm_enter(suspend_state_t state) #ifdef CONFIG_PM_BFIN_WAKE_PB15 wakeup |= PB15WE; -# if CONFIG_PM_BFIN_WAKE_PA15_POL +# if CONFIG_PM_BFIN_WAKE_PB15_POL wakeup_pol |= PB15WE; # endif #endif -- cgit v1.2.3 From e8fac6334d205ebe7b4923b141384b105685a226 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Sun, 23 Feb 2014 21:40:13 +0000 Subject: blackfin:Use generic /proc/interrupts implementation There is nothing special in that blackfin code. Use the core implementation. Signed-off-by: Thomas Gleixner Cc: Steven Miao Cc: bfin --- arch/blackfin/Kconfig | 1 + arch/blackfin/kernel/irqchip.c | 39 +++++++++------------------------------ 2 files changed, 10 insertions(+), 30 deletions(-) diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig index 9ceccef9c649..f936ee6f5688 100644 --- a/arch/blackfin/Kconfig +++ b/arch/blackfin/Kconfig @@ -34,6 +34,7 @@ config BLACKFIN select ARCH_WANT_IPC_PARSE_VERSION select GENERIC_ATOMIC64 select GENERIC_IRQ_PROBE + select GENERIC_IRQ_SHOW select HAVE_NMI_WATCHDOG if NMI_WATCHDOG select GENERIC_SMP_IDLE_THREAD select ARCH_USES_GETTIMEOFFSET if !GENERIC_CLOCKEVENTS diff --git a/arch/blackfin/kernel/irqchip.c b/arch/blackfin/kernel/irqchip.c index ff3d747154ac..0ba25764b8c0 100644 --- a/arch/blackfin/kernel/irqchip.c +++ b/arch/blackfin/kernel/irqchip.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -33,37 +34,15 @@ static struct irq_desc bad_irq_desc = { #endif #ifdef CONFIG_PROC_FS -int show_interrupts(struct seq_file *p, void *v) +int arch_show_interrupts(struct seq_file *p, int prec) { - int i = *(loff_t *) v, j; - struct irqaction *action; - unsigned long flags; - - if (i < NR_IRQS) { - struct irq_desc *desc = irq_to_desc(i); - - raw_spin_lock_irqsave(&desc->lock, flags); - action = desc->action; - if (!action) - goto skip; - seq_printf(p, "%3d: ", i); - for_each_online_cpu(j) - seq_printf(p, "%10u ", kstat_irqs_cpu(i, j)); - seq_printf(p, " %8s", irq_desc_get_chip(desc)->name); - seq_printf(p, " %s", action->name); - for (action = action->next; action; action = action->next) - seq_printf(p, " %s", action->name); - - seq_putc(p, '\n'); - skip: - raw_spin_unlock_irqrestore(&desc->lock, flags); - } else if (i == NR_IRQS) { - seq_printf(p, "NMI: "); - for_each_online_cpu(j) - seq_printf(p, "%10u ", cpu_pda[j].__nmi_count); - seq_printf(p, " CORE Non Maskable Interrupt\n"); - seq_printf(p, "Err: %10u\n", atomic_read(&irq_err_count)); - } + int j; + + seq_printf(p, "%*s: ", prec, "NMI"); + for_each_online_cpu(j) + seq_printf(p, "%10u ", cpu_pda[j].__nmi_count); + seq_printf(p, " CORE Non Maskable Interrupt\n"); + seq_printf(p, "%*s: %10u\n", prec, "ERR", atomic_read(&irq_err_count)); return 0; } #endif -- cgit v1.2.3 From 41f8fd926e5d28587281a2bc449f8a2f7876903a Mon Sep 17 00:00:00 2001 From: Paul Bolle Date: Wed, 12 Feb 2014 11:54:37 +0100 Subject: blackfin: Remove GENERIC_GPIO config option again The Kconfig symbol GENERIC_GPIO was removed in v3.10. Nothing cares about it anymore. It popped up somehow in v3.13, so it can be removed again. Signed-off-by: Paul Bolle --- arch/blackfin/Kconfig | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig index f936ee6f5688..5ae0aa77aff6 100644 --- a/arch/blackfin/Kconfig +++ b/arch/blackfin/Kconfig @@ -52,9 +52,6 @@ config GENERIC_BUG config ZONE_DMA def_bool y -config GENERIC_GPIO - def_bool y - config FORCE_MAX_ZONEORDER int default "14" -- cgit v1.2.3 From fa730d6277a10109d31a8968acc2cbf4f2a0f78e Mon Sep 17 00:00:00 2001 From: Paul Bolle Date: Thu, 21 Mar 2013 21:50:06 +0100 Subject: Blackfin: remove "config IP_CHECKSUM_L1" The only user of Kconfig symbol IP_CHECKSUM_L1 got removed in v2.6.33, with commit ddf9ddacef0989fdeb22e182212a232488f0f3ad ("Blackfin: convert to generic checksum code"). We can remove the Kconfig entry for this unused symbol now. Signed-off-by: Paul Bolle --- arch/blackfin/Kconfig | 8 -------- 1 file changed, 8 deletions(-) diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig index 5ae0aa77aff6..f81e7b989fff 100644 --- a/arch/blackfin/Kconfig +++ b/arch/blackfin/Kconfig @@ -868,14 +868,6 @@ config SYS_BFIN_SPINLOCK_L1 If enabled, sys_bfin_spinlock function is linked into L1 instruction memory. (less latency) -config IP_CHECKSUM_L1 - bool "Locate IP Checksum function in L1 Memory" - default n - depends on !SMP - help - If enabled, the IP Checksum function is linked - into L1 instruction memory. (less latency) - config CACHELINE_ALIGNED_L1 bool "Locate cacheline_aligned data to L1 Data Memory" default y if !BF54x -- cgit v1.2.3 From a0c1fb2ea74dedecd303fb0388e21ca869239db2 Mon Sep 17 00:00:00 2001 From: Steven Miao Date: Mon, 17 Mar 2014 13:36:51 +0800 Subject: blackfin: portmux: cleanup head file drop unused head file change pinmux request/free macro for backward compatiblity add function declaration Signed-off-by: Steven Miao --- arch/blackfin/include/asm/portmux.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/arch/blackfin/include/asm/portmux.h b/arch/blackfin/include/asm/portmux.h index 7aa20436e799..c8f0939419be 100644 --- a/arch/blackfin/include/asm/portmux.h +++ b/arch/blackfin/include/asm/portmux.h @@ -18,16 +18,14 @@ #define P_DONTCARE 0x1000 #ifdef CONFIG_PINCTRL -#include +int bfin_internal_set_wake(unsigned int irq, unsigned int state); #define gpio_pint_regs bfin_pint_regs #define adi_internal_set_wake bfin_internal_set_wake -#define peripheral_request(per, label) 0 +#define peripheral_request(per, label) (0) #define peripheral_free(per) -#define peripheral_request_list(per, label) \ - (pdev ? (IS_ERR(devm_pinctrl_get_select_default(&pdev->dev)) \ - ? -EINVAL : 0) : 0) +#define peripheral_request_list(per, label) (0) #define peripheral_free_list(per) #else int peripheral_request(unsigned short per, const char *label); @@ -39,7 +37,7 @@ void peripheral_free_list(const unsigned short per[]); #include #include #include -#include +#include #ifndef P_SPORT2_TFS #define P_SPORT2_TFS P_UNDEF -- cgit v1.2.3 From ba3b6d75046b266ded31c8f91ce558c7c819fc80 Mon Sep 17 00:00:00 2001 From: Steven Miao Date: Mon, 17 Mar 2014 14:49:26 +0800 Subject: bf54x: drop unuesd HOST status,control,timeout registers bit define macros Signed-off-by: Steven Miao --- arch/blackfin/mach-bf548/include/mach/defBF544.h | 30 ------------------------ arch/blackfin/mach-bf548/include/mach/defBF547.h | 30 ------------------------ 2 files changed, 60 deletions(-) diff --git a/arch/blackfin/mach-bf548/include/mach/defBF544.h b/arch/blackfin/mach-bf548/include/mach/defBF544.h index 329b2c58228b..018ebfc27f5a 100644 --- a/arch/blackfin/mach-bf548/include/mach/defBF544.h +++ b/arch/blackfin/mach-bf548/include/mach/defBF544.h @@ -601,36 +601,6 @@ #define GU_TRANS 0xff00 /* Transparent Color - G/U Component */ #define BV_TRANS 0xff0000 /* Transparent Color - B/V Component */ -/* Bit masks for HOST_CONTROL */ - -#define HOST_EN 0x1 /* Host Enable */ -#define HOST_END 0x2 /* Host Endianess */ -#define DATA_SIZE 0x4 /* Data Size */ -#define HOST_RST 0x8 /* Host Reset */ -#define HRDY_OVR 0x20 /* Host Ready Override */ -#define INT_MODE 0x40 /* Interrupt Mode */ -#define BT_EN 0x80 /* Bus Timeout Enable */ -#define EHW 0x100 /* Enable Host Write */ -#define EHR 0x200 /* Enable Host Read */ -#define BDR 0x400 /* Burst DMA Requests */ - -/* Bit masks for HOST_STATUS */ - -#define DMA_READY 0x1 /* DMA Ready */ -#define FIFOFULL 0x2 /* FIFO Full */ -#define FIFOEMPTY 0x4 /* FIFO Empty */ -#define DMA_COMPLETE 0x8 /* DMA Complete */ -#define HSHK 0x10 /* Host Handshake */ -#define HSTIMEOUT 0x20 /* Host Timeout */ -#define HIRQ 0x40 /* Host Interrupt Request */ -#define ALLOW_CNFG 0x80 /* Allow New Configuration */ -#define DMA_DIR 0x100 /* DMA Direction */ -#define BTE 0x200 /* Bus Timeout Enabled */ - -/* Bit masks for HOST_TIMEOUT */ - -#define COUNT_TIMEOUT 0x7ff /* Host Timeout count */ - /* Bit masks for TIMER_ENABLE1 */ #define TIMEN8 0x1 /* Timer 8 Enable */ diff --git a/arch/blackfin/mach-bf548/include/mach/defBF547.h b/arch/blackfin/mach-bf548/include/mach/defBF547.h index e18de212ba1a..d55dcc0f5324 100644 --- a/arch/blackfin/mach-bf548/include/mach/defBF547.h +++ b/arch/blackfin/mach-bf548/include/mach/defBF547.h @@ -581,36 +581,6 @@ #define GU_TRANS 0xff00 /* Transparent Color - G/U Component */ #define BV_TRANS 0xff0000 /* Transparent Color - B/V Component */ -/* Bit masks for HOST_CONTROL */ - -#define HOST_EN 0x1 /* Host Enable */ -#define HOST_END 0x2 /* Host Endianess */ -#define DATA_SIZE 0x4 /* Data Size */ -#define HOST_RST 0x8 /* Host Reset */ -#define HRDY_OVR 0x20 /* Host Ready Override */ -#define INT_MODE 0x40 /* Interrupt Mode */ -#define BT_EN 0x80 /* Bus Timeout Enable */ -#define EHW 0x100 /* Enable Host Write */ -#define EHR 0x200 /* Enable Host Read */ -#define BDR 0x400 /* Burst DMA Requests */ - -/* Bit masks for HOST_STATUS */ - -#define DMA_READY 0x1 /* DMA Ready */ -#define FIFOFULL 0x2 /* FIFO Full */ -#define FIFOEMPTY 0x4 /* FIFO Empty */ -#define DMA_COMPLETE 0x8 /* DMA Complete */ -#define HSHK 0x10 /* Host Handshake */ -#define HSTIMEOUT 0x20 /* Host Timeout */ -#define HIRQ 0x40 /* Host Interrupt Request */ -#define ALLOW_CNFG 0x80 /* Allow New Configuration */ -#define DMA_DIR 0x100 /* DMA Direction */ -#define BTE 0x200 /* Bus Timeout Enabled */ - -/* Bit masks for HOST_TIMEOUT */ - -#define COUNT_TIMEOUT 0x7ff /* Host Timeout count */ - /* Bit masks for KPAD_CTL */ #define KPAD_EN 0x1 /* Keypad Enable */ -- cgit v1.2.3 From 3356c99ea392cb903ab84a7cf1ef804e117f88a3 Mon Sep 17 00:00:00 2001 From: Sonic Zhang Date: Thu, 27 Mar 2014 16:34:31 +0800 Subject: bfin_crc: Move architecture independant crc header file out of the blackfin folder. Signed-off-by: Sonic Zhang Signed-off-by: Steven Miao --- arch/blackfin/include/asm/bfin_crc.h | 125 ----------------------------------- 1 file changed, 125 deletions(-) delete mode 100644 arch/blackfin/include/asm/bfin_crc.h diff --git a/arch/blackfin/include/asm/bfin_crc.h b/arch/blackfin/include/asm/bfin_crc.h deleted file mode 100644 index 75cef4dc85a1..000000000000 --- a/arch/blackfin/include/asm/bfin_crc.h +++ /dev/null @@ -1,125 +0,0 @@ -/* - * bfin_crc.h - interface to Blackfin CRC controllers - * - * Copyright 2012 Analog Devices Inc. - * - * Licensed under the GPL-2 or later. - */ - -#ifndef __BFIN_CRC_H__ -#define __BFIN_CRC_H__ - -/* Function driver which use hardware crc must initialize the structure */ -struct crc_info { - /* Input data address */ - unsigned char *in_addr; - /* Output data address */ - unsigned char *out_addr; - /* Input or output bytes */ - unsigned long datasize; - union { - /* CRC to compare with that of input buffer */ - unsigned long crc_compare; - /* Value to compare with input data */ - unsigned long val_verify; - /* Value to fill */ - unsigned long val_fill; - }; - /* Value to program the 32b CRC Polynomial */ - unsigned long crc_poly; - union { - /* CRC calculated from the input data */ - unsigned long crc_result; - /* First failed position to verify input data */ - unsigned long pos_verify; - }; - /* CRC mirror flags */ - unsigned int bitmirr:1; - unsigned int bytmirr:1; - unsigned int w16swp:1; - unsigned int fdsel:1; - unsigned int rsltmirr:1; - unsigned int polymirr:1; - unsigned int cmpmirr:1; -}; - -/* Userspace interface */ -#define CRC_IOC_MAGIC 'C' -#define CRC_IOC_CALC_CRC _IOWR('C', 0x01, unsigned int) -#define CRC_IOC_MEMCPY_CRC _IOWR('C', 0x02, unsigned int) -#define CRC_IOC_VERIFY_VAL _IOWR('C', 0x03, unsigned int) -#define CRC_IOC_FILL_VAL _IOWR('C', 0x04, unsigned int) - - -#ifdef __KERNEL__ - -#include -#include -#include - -struct crc_register { - u32 control; - u32 datacnt; - u32 datacntrld; - u32 __pad_1[2]; - u32 compare; - u32 fillval; - u32 datafifo; - u32 intren; - u32 intrenset; - u32 intrenclr; - u32 poly; - u32 __pad_2[4]; - u32 status; - u32 datacntcap; - u32 __pad_3; - u32 result; - u32 curresult; - u32 __pad_4[3]; - u32 revid; -}; - -/* CRC_STATUS Masks */ -#define CMPERR 0x00000002 /* Compare error */ -#define DCNTEXP 0x00000010 /* datacnt register expired */ -#define IBR 0x00010000 /* Input buffer ready */ -#define OBR 0x00020000 /* Output buffer ready */ -#define IRR 0x00040000 /* Immediate result readt */ -#define LUTDONE 0x00080000 /* Look-up table generation done */ -#define FSTAT 0x00700000 /* FIFO status */ -#define MAX_FIFO 4 /* Max fifo size */ - -/* CRC_CONTROL Masks */ -#define BLKEN 0x00000001 /* Block enable */ -#define OPMODE 0x000000F0 /* Operation mode */ -#define OPMODE_OFFSET 4 /* Operation mode mask offset*/ -#define MODE_DMACPY_CRC 1 /* MTM CRC compute and compare */ -#define MODE_DATA_FILL 2 /* MTM data fill */ -#define MODE_CALC_CRC 3 /* MSM CRC compute and compare */ -#define MODE_DATA_VERIFY 4 /* MSM data verify */ -#define AUTOCLRZ 0x00000100 /* Auto clear to zero */ -#define AUTOCLRF 0x00000200 /* Auto clear to one */ -#define OBRSTALL 0x00001000 /* Stall on output buffer ready */ -#define IRRSTALL 0x00002000 /* Stall on immediate result ready */ -#define BITMIRR 0x00010000 /* Mirror bits within each byte of 32-bit input data */ -#define BITMIRR_OFFSET 16 /* Mirror bits offset */ -#define BYTMIRR 0x00020000 /* Mirror bytes of 32-bit input data */ -#define BYTMIRR_OFFSET 17 /* Mirror bytes offset */ -#define W16SWP 0x00040000 /* Mirror uppper and lower 16-bit word of 32-bit input data */ -#define W16SWP_OFFSET 18 /* Mirror 16-bit word offset */ -#define FDSEL 0x00080000 /* FIFO is written after input data is mirrored */ -#define FDSEL_OFFSET 19 /* Mirror FIFO offset */ -#define RSLTMIRR 0x00100000 /* CRC result registers are mirrored. */ -#define RSLTMIRR_OFFSET 20 /* Mirror CRC result offset. */ -#define POLYMIRR 0x00200000 /* CRC poly register is mirrored. */ -#define POLYMIRR_OFFSET 21 /* Mirror CRC poly offset. */ -#define CMPMIRR 0x00400000 /* CRC compare register is mirrored. */ -#define CMPMIRR_OFFSET 22 /* Mirror CRC compare offset. */ - -/* CRC_INTREN Masks */ -#define CMPERRI 0x02 /* CRC_ERROR_INTR */ -#define DCNTEXPI 0x10 /* CRC_STATUS_INTR */ - -#endif - -#endif -- cgit v1.2.3 From 3def9074f981761d0eb449a68a4c21618a70ab29 Mon Sep 17 00:00:00 2001 From: Sonic Zhang Date: Wed, 2 Apr 2014 16:57:23 +0800 Subject: blackfin: dma: current count mmr is read only Signed-off-by: Sonic Zhang --- arch/blackfin/include/asm/dma.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/blackfin/include/asm/dma.h b/arch/blackfin/include/asm/dma.h index 40e9c2bbc6e3..8d1e4c2d2c36 100644 --- a/arch/blackfin/include/asm/dma.h +++ b/arch/blackfin/include/asm/dma.h @@ -316,8 +316,6 @@ static inline void disable_dma(unsigned int channel) } static inline void enable_dma(unsigned int channel) { - dma_ch[channel].regs->curr_x_count = 0; - dma_ch[channel].regs->curr_y_count = 0; dma_ch[channel].regs->cfg |= DMAEN; } int set_dma_callback(unsigned int channel, irq_handler_t callback, void *data); -- cgit v1.2.3 From cb8f05f74f7e8dda92095e2f9d400f799a8d1846 Mon Sep 17 00:00:00 2001 From: Paul Bolle Date: Fri, 8 Mar 2013 13:06:13 +0100 Subject: blackfin: bf537: fix typo "CONFIG_SND_SOC_ADV80X_MODULE" There's a (rather subtle) typo in "CONFIG_SND_SOC_ADV80X_MODULE". Fix it once and for all by using IS_ENABLED(), which is designed to avoid issues like this. Signed-off-by: Paul Bolle --- arch/blackfin/mach-bf537/boards/stamp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c index 44fd1d4682ac..50c2b0a52475 100644 --- a/arch/blackfin/mach-bf537/boards/stamp.c +++ b/arch/blackfin/mach-bf537/boards/stamp.c @@ -986,7 +986,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { }, #endif -#if defined(CONFIG_SND_SOC_ADAV80X) || defined(CONFIG_SND_SOC_ADV80X_MODULE) +#if IS_ENABLED(CONFIG_SND_SOC_ADAV80X) { .modalias = "adav801", .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ -- cgit v1.2.3 From 6ffe34638e54d792e3d58633008891c2f3619d64 Mon Sep 17 00:00:00 2001 From: Paul Bolle Date: Thu, 4 Apr 2013 13:02:10 +0200 Subject: Blackfin: bf537: rename ad2s120x ->ad2s1200 In v3.2 the Analog Devices ad2s1200/ad2s1205 driver was renamed from ad2s120x to ad2s1200. But it apparently forgot to rename the references to this driver in the BF537-STAMP code. Rename these now, and use the IS_ENABLED() macro, while we're at it. Signed-off-by: Paul Bolle --- arch/blackfin/mach-bf537/boards/stamp.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c index 50c2b0a52475..60ce59891495 100644 --- a/arch/blackfin/mach-bf537/boards/stamp.c +++ b/arch/blackfin/mach-bf537/boards/stamp.c @@ -655,13 +655,13 @@ static struct bfin5xx_spi_chip ad2s90_spi_chip_info = { }; #endif -#if defined(CONFIG_AD2S120X) || defined(CONFIG_AD2S120X_MODULE) -static unsigned short ad2s120x_platform_data[] = { +#if IS_ENABLED(CONFIG_AD2S1200) +static unsigned short ad2s1200_platform_data[] = { /* used as SAMPLE and RDVEL */ GPIO_PF5, GPIO_PF6, 0 }; -static struct bfin5xx_spi_chip ad2s120x_spi_chip_info = { +static struct bfin5xx_spi_chip ad2s1200_spi_chip_info = { .enable_dma = 0, }; #endif @@ -1019,13 +1019,13 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { }, #endif -#if defined(CONFIG_AD2S120X) || defined(CONFIG_AD2S120X_MODULE) +#if IS_ENABLED(CONFIG_AD2S1200) { - .modalias = "ad2s120x", + .modalias = "ad2s1200", .bus_num = 0, .chip_select = 4, /* CS, change it for your board */ - .platform_data = ad2s120x_platform_data, - .controller_data = &ad2s120x_spi_chip_info, + .platform_data = ad2s1200_platform_data, + .controller_data = &ad2s1200_spi_chip_info, }, #endif -- cgit v1.2.3 From e3dd192956b17aed83f19487aa4caa009ad15006 Mon Sep 17 00:00:00 2001 From: Paul Bolle Date: Thu, 4 Apr 2013 12:08:25 +0200 Subject: Blackfin: bf537: rename "CONFIG_AD7314" In v3.2 the Analog Devices AD7314 temperature sensor driver was removed as an IIO driver and added as a HWMON driver. But it was apparently overlooked to rename two references to CONFIG_AD7314 to CONFIG_SENSORS_AD7314. Do so now. Use the IS_ENABLED() macro, while we're at it. Signed-off-by: Paul Bolle --- arch/blackfin/mach-bf537/boards/stamp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c index 60ce59891495..de2187f40f02 100644 --- a/arch/blackfin/mach-bf537/boards/stamp.c +++ b/arch/blackfin/mach-bf537/boards/stamp.c @@ -682,7 +682,7 @@ static struct bfin5xx_spi_chip ad2s1210_spi_chip_info = { }; #endif -#if defined(CONFIG_AD7314) || defined(CONFIG_AD7314_MODULE) +#if IS_ENABLED(CONFIG_SENSORS_AD7314) static struct bfin5xx_spi_chip ad7314_spi_chip_info = { .enable_dma = 0, }; @@ -1040,7 +1040,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { }, #endif -#if defined(CONFIG_AD7314) || defined(CONFIG_AD7314_MODULE) +#if IS_ENABLED(CONFIG_SENSORS_AD7314) { .modalias = "ad7314", .max_speed_hz = 1000000, -- cgit v1.2.3 From f57ac8a744db2fcda47d13e6b54d2d2ed2624d6a Mon Sep 17 00:00:00 2001 From: Paul Bolle Date: Thu, 4 Apr 2013 12:31:06 +0200 Subject: Blackfin: bf537: rename "CONFIG_ADT75" In v3.2 the Analog Devices ADT75 temperature sensor driver was removed as an IIO driver and support for it was added to the LM75 HWMON driver. But it was apparently overlooked to rename one reference to CONFIG_ADT75 to CONFIG_SENSORS_LM75. Do so now. Use the IS_ENABLED() macro, while we're at it. Signed-off-by: Paul Bolle --- arch/blackfin/mach-bf537/boards/stamp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c index de2187f40f02..c403369e8945 100644 --- a/arch/blackfin/mach-bf537/boards/stamp.c +++ b/arch/blackfin/mach-bf537/boards/stamp.c @@ -2222,7 +2222,7 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = { }, #endif -#if defined(CONFIG_ADT75) || defined(CONFIG_ADT75_MODULE) +#if IS_ENABLED(CONFIG_SENSORS_LM75) { I2C_BOARD_INFO("adt75", 0x9), .irq = IRQ_PG5, -- cgit v1.2.3 From f8ef77d9389f9b52fe80de4f1b236af3391420b8 Mon Sep 17 00:00:00 2001 From: Steven Miao Date: Fri, 11 Apr 2014 23:54:25 +0800 Subject: bf609: clock: drop unused clock bit set/clear functions Signed-off-by: Steven Miao --- arch/blackfin/mach-bf609/clock.c | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/arch/blackfin/mach-bf609/clock.c b/arch/blackfin/mach-bf609/clock.c index 13644ed25489..56200f37cfc8 100644 --- a/arch/blackfin/mach-bf609/clock.c +++ b/arch/blackfin/mach-bf609/clock.c @@ -73,24 +73,6 @@ static void clk_reg_write_mask(u32 reg, uint32_t val, uint32_t mask) bfin_write32(reg, val2); } -static void clk_reg_set_bits(u32 reg, uint32_t mask) -{ - u32 val; - - val = bfin_read32(reg); - val |= mask; - bfin_write32(reg, val); -} - -static void clk_reg_clear_bits(u32 reg, uint32_t mask) -{ - u32 val; - - val = bfin_read32(reg); - val &= ~mask; - bfin_write32(reg, val); -} - int wait_for_pll_align(void) { int i = 10000; -- cgit v1.2.3 From c4a2c58d20953ff1080f50f705cdd952f6d301b2 Mon Sep 17 00:00:00 2001 From: Steven Miao Date: Sat, 12 Apr 2014 02:07:27 +0800 Subject: blackfin: cleanup board files using IS_ENABLED() macro instead of defined(CONFIG_XXX) || defined(CONFIG_XXX_MODULE) Signed-off-by: Steven Miao --- arch/blackfin/mach-bf518/boards/ezbrd.c | 87 +++--- arch/blackfin/mach-bf518/boards/tcm-bf518.c | 64 +++-- arch/blackfin/mach-bf527/boards/ad7160eval.c | 71 +++-- arch/blackfin/mach-bf527/boards/cm_bf527.c | 91 +++--- arch/blackfin/mach-bf527/boards/ezbrd.c | 76 +++-- arch/blackfin/mach-bf527/boards/ezkit.c | 139 +++++---- arch/blackfin/mach-bf527/boards/tll6527m.c | 91 +++--- arch/blackfin/mach-bf533/boards/H8606.c | 46 +-- arch/blackfin/mach-bf533/boards/blackstamp.c | 44 +-- arch/blackfin/mach-bf533/boards/cm_bf533.c | 54 ++-- arch/blackfin/mach-bf533/boards/ezkit.c | 56 ++-- arch/blackfin/mach-bf533/boards/ip0x.c | 26 +- arch/blackfin/mach-bf533/boards/stamp.c | 118 ++++---- arch/blackfin/mach-bf537/boards/cm_bf537e.c | 82 +++--- arch/blackfin/mach-bf537/boards/cm_bf537u.c | 70 ++--- arch/blackfin/mach-bf537/boards/dnp5370.c | 32 +-- arch/blackfin/mach-bf537/boards/minotaur.c | 50 ++-- arch/blackfin/mach-bf537/boards/pnav10.c | 55 ++-- arch/blackfin/mach-bf537/boards/stamp.c | 403 ++++++++++++--------------- arch/blackfin/mach-bf537/boards/tcm_bf537.c | 70 ++--- arch/blackfin/mach-bf538/boards/ezkit.c | 62 ++--- arch/blackfin/mach-bf548/boards/cm_bf548.c | 78 +++--- arch/blackfin/mach-bf548/boards/ezkit.c | 136 +++++---- arch/blackfin/mach-bf561/boards/acvilon.c | 28 +- arch/blackfin/mach-bf561/boards/cm_bf561.c | 56 ++-- arch/blackfin/mach-bf561/boards/ezkit.c | 74 +++-- arch/blackfin/mach-bf561/boards/tepla.c | 8 +- arch/blackfin/mach-bf609/boards/ezkit.c | 131 ++++----- 28 files changed, 1089 insertions(+), 1209 deletions(-) diff --git a/arch/blackfin/mach-bf518/boards/ezbrd.c b/arch/blackfin/mach-bf518/boards/ezbrd.c index f8047ca3b339..d022112927c2 100644 --- a/arch/blackfin/mach-bf518/boards/ezbrd.c +++ b/arch/blackfin/mach-bf518/boards/ezbrd.c @@ -36,7 +36,7 @@ const char bfin_board_name[] = "ADI BF518F-EZBRD"; * Driver needs to know address, irq and flag pin. */ -#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) +#if IS_ENABLED(CONFIG_MTD_PHYSMAP) static struct mtd_partition ezbrd_partitions[] = { { .name = "bootloader(nor)", @@ -61,7 +61,7 @@ static struct physmap_flash_data ezbrd_flash_data = { static struct resource ezbrd_flash_resource = { .start = 0x20000000, -#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) +#if IS_ENABLED(CONFIG_SPI_BFIN5XX) .end = 0x202fffff, #else .end = 0x203fffff, @@ -80,14 +80,14 @@ static struct platform_device ezbrd_flash_device = { }; #endif -#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) +#if IS_ENABLED(CONFIG_RTC_DRV_BFIN) static struct platform_device rtc_device = { .name = "rtc-bfin", .id = -1, }; #endif -#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) +#if IS_ENABLED(CONFIG_BFIN_MAC) #include static const unsigned short bfin_mac_peripherals[] = { P_MII0_ETxD0, @@ -105,7 +105,7 @@ static const unsigned short bfin_mac_peripherals[] = { static struct bfin_phydev_platform_data bfin_phydev_data[] = { { -#if defined(CONFIG_NET_DSA_KSZ8893M) || defined(CONFIG_NET_DSA_KSZ8893M_MODULE) +#if IS_ENABLED(CONFIG_NET_DSA_KSZ8893M) .addr = 3, #else .addr = 1, @@ -119,7 +119,7 @@ static struct bfin_mii_bus_platform_data bfin_mii_bus_data = { .phydev_data = bfin_phydev_data, .phy_mode = PHY_INTERFACE_MODE_MII, .mac_peripherals = bfin_mac_peripherals, -#if defined(CONFIG_NET_DSA_KSZ8893M) || defined(CONFIG_NET_DSA_KSZ8893M_MODULE) +#if IS_ENABLED(CONFIG_NET_DSA_KSZ8893M) .phy_mask = 0xfff7, /* Only probe the port phy connect to the on chip MAC */ #endif .vlan1_mask = 1, @@ -140,7 +140,7 @@ static struct platform_device bfin_mac_device = { } }; -#if defined(CONFIG_NET_DSA_KSZ8893M) || defined(CONFIG_NET_DSA_KSZ8893M_MODULE) +#if IS_ENABLED(CONFIG_NET_DSA_KSZ8893M) static struct dsa_chip_data ksz8893m_switch_chip_data = { .mii_bus = &bfin_mii_bus.dev, .port_names = { @@ -165,8 +165,7 @@ static struct platform_device ksz8893m_switch_device = { #endif #endif -#if defined(CONFIG_MTD_M25P80) \ - || defined(CONFIG_MTD_M25P80_MODULE) +#if IS_ENABLED(CONFIG_MTD_M25P80) static struct mtd_partition bfin_spi_flash_partitions[] = { { .name = "bootloader(spi)", @@ -193,13 +192,13 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = { }; #endif -#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) +#if IS_ENABLED(CONFIG_MMC_SPI) static struct bfin5xx_spi_chip mmc_spi_chip_info = { .enable_dma = 0, }; #endif -#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) +#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877) static const struct ad7877_platform_data bfin_ad7877_ts_info = { .model = 7877, .vref_delay_usecs = 50, /* internal, no capacitor */ @@ -216,8 +215,7 @@ static const struct ad7877_platform_data bfin_ad7877_ts_info = { #endif static struct spi_board_info bfin_spi_board_info[] __initdata = { -#if defined(CONFIG_MTD_M25P80) \ - || defined(CONFIG_MTD_M25P80_MODULE) +#if IS_ENABLED(CONFIG_MTD_M25P80) { /* the modalias must be the same as spi device driver name */ .modalias = "m25p80", /* Name of spi_driver for this device */ @@ -230,9 +228,8 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { }, #endif -#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) -#if defined(CONFIG_NET_DSA_KSZ8893M) \ - || defined(CONFIG_NET_DSA_KSZ8893M_MODULE) +#if IS_ENABLED(CONFIG_BFIN_MAC) +#if IS_ENABLED(CONFIG_NET_DSA_KSZ8893M) { .modalias = "ksz8893m", .max_speed_hz = 5000000, @@ -244,7 +241,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { #endif #endif -#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) +#if IS_ENABLED(CONFIG_MMC_SPI) { .modalias = "mmc_spi", .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ @@ -254,7 +251,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { .mode = SPI_MODE_3, }, #endif -#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) +#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877) { .modalias = "ad7877", .platform_data = &bfin_ad7877_ts_info, @@ -264,7 +261,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { .chip_select = 2, }, #endif -#if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ +#if IS_ENABLED(CONFIG_SND_SOC_WM8731) \ && defined(CONFIG_SND_SOC_WM8731_SPI) { .modalias = "wm8731", @@ -274,7 +271,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { .mode = SPI_MODE_0, }, #endif -#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) +#if IS_ENABLED(CONFIG_SPI_SPIDEV) { .modalias = "spidev", .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ @@ -282,7 +279,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { .chip_select = 1, }, #endif -#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) +#if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1) { .modalias = "bfin-lq035q1-spi", .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ @@ -294,7 +291,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { }; /* SPI controller data */ -#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) +#if IS_ENABLED(CONFIG_SPI_BFIN5XX) /* SPI (0) */ static struct bfin5xx_spi_master bfin_spi0_info = { .num_chipselect = 6, @@ -366,7 +363,7 @@ static struct platform_device bfin_spi1_device = { }; #endif /* spi master and devices */ -#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) +#if IS_ENABLED(CONFIG_SERIAL_BFIN) #ifdef CONFIG_SERIAL_BFIN_UART0 static struct resource bfin_uart0_resources[] = { { @@ -465,7 +462,7 @@ static struct platform_device bfin_uart1_device = { #endif #endif -#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) +#if IS_ENABLED(CONFIG_BFIN_SIR) #ifdef CONFIG_BFIN_SIR0 static struct resource bfin_sir0_resources[] = { { @@ -520,7 +517,7 @@ static struct platform_device bfin_sir1_device = { #endif #endif -#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) +#if IS_ENABLED(CONFIG_SND_BF5XX_I2S) static struct platform_device bfin_i2s = { .name = "bfin-i2s", .id = CONFIG_SND_BF5XX_SPORT_NUM, @@ -528,7 +525,7 @@ static struct platform_device bfin_i2s = { }; #endif -#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) +#if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI) static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; static struct resource bfin_twi0_resource[] = { @@ -556,25 +553,25 @@ static struct platform_device i2c_bfin_twi_device = { #endif static struct i2c_board_info __initdata bfin_i2c_board_info[] = { -#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) +#if IS_ENABLED(CONFIG_BFIN_TWI_LCD) { I2C_BOARD_INFO("pcf8574_lcd", 0x22), }, #endif -#if defined(CONFIG_INPUT_PCF8574) || defined(CONFIG_INPUT_PCF8574_MODULE) +#if IS_ENABLED(CONFIG_INPUT_PCF8574) { I2C_BOARD_INFO("pcf8574_keypad", 0x27), .irq = IRQ_PF8, }, #endif -#if defined(CONFIG_SND_SOC_SSM2602) || defined(CONFIG_SND_SOC_SSM2602_MODULE) +#if IS_ENABLED(CONFIG_SND_SOC_SSM2602) { I2C_BOARD_INFO("ssm2602", 0x1b), }, #endif }; -#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) +#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT) #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART static struct resource bfin_sport0_uart_resources[] = { { @@ -645,7 +642,7 @@ static struct platform_device bfin_sport1_uart_device = { #endif #endif -#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) +#if IS_ENABLED(CONFIG_KEYBOARD_GPIO) #include #include @@ -667,7 +664,7 @@ static struct platform_device bfin_device_gpiokeys = { }; #endif -#if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE) +#if IS_ENABLED(CONFIG_SDH_BFIN) static struct bfin_sd_host bfin_sdh_data = { .dma_chan = CH_RSI, @@ -710,24 +707,24 @@ static struct platform_device *stamp_devices[] __initdata = { &bfin_dpmc, -#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) +#if IS_ENABLED(CONFIG_RTC_DRV_BFIN) &rtc_device, #endif -#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) +#if IS_ENABLED(CONFIG_BFIN_MAC) &bfin_mii_bus, &bfin_mac_device, -#if defined(CONFIG_NET_DSA_KSZ8893M) || defined(CONFIG_NET_DSA_KSZ8893M_MODULE) +#if IS_ENABLED(CONFIG_NET_DSA_KSZ8893M) &ksz8893m_switch_device, #endif #endif -#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) +#if IS_ENABLED(CONFIG_SPI_BFIN5XX) &bfin_spi0_device, &bfin_spi1_device, #endif -#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) +#if IS_ENABLED(CONFIG_SERIAL_BFIN) #ifdef CONFIG_SERIAL_BFIN_UART0 &bfin_uart0_device, #endif @@ -736,7 +733,7 @@ static struct platform_device *stamp_devices[] __initdata = { #endif #endif -#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) +#if IS_ENABLED(CONFIG_BFIN_SIR) #ifdef CONFIG_BFIN_SIR0 &bfin_sir0_device, #endif @@ -745,15 +742,15 @@ static struct platform_device *stamp_devices[] __initdata = { #endif #endif -#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) +#if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI) &i2c_bfin_twi_device, #endif -#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) +#if IS_ENABLED(CONFIG_SND_BF5XX_I2S) &bfin_i2s, #endif -#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) +#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT) #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART &bfin_sport0_uart_device, #endif @@ -762,15 +759,15 @@ static struct platform_device *stamp_devices[] __initdata = { #endif #endif -#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) +#if IS_ENABLED(CONFIG_KEYBOARD_GPIO) &bfin_device_gpiokeys, #endif -#if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE) +#if IS_ENABLED(CONFIG_SDH_BFIN) &bf51x_sdh_device, #endif -#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) +#if IS_ENABLED(CONFIG_MTD_PHYSMAP) &ezbrd_flash_device, #endif }; @@ -784,7 +781,7 @@ static int __init ezbrd_init(void) spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); /* setup BF518-EZBRD GPIO pin PG11 to AMS2, PG15 to AMS3. */ peripheral_request(P_AMS2, "ParaFlash"); -#if !defined(CONFIG_SPI_BFIN5XX) && !defined(CONFIG_SPI_BFIN5XX_MODULE) +#if !IS_ENABLED(CONFIG_SPI_BFIN5XX) peripheral_request(P_AMS3, "ParaFlash"); #endif return 0; diff --git a/arch/blackfin/mach-bf518/boards/tcm-bf518.c b/arch/blackfin/mach-bf518/boards/tcm-bf518.c index 0bedc737566b..240d5cb1f02c 100644 --- a/arch/blackfin/mach-bf518/boards/tcm-bf518.c +++ b/arch/blackfin/mach-bf518/boards/tcm-bf518.c @@ -36,7 +36,7 @@ const char bfin_board_name[] = "Bluetechnix TCM-BF518"; * Driver needs to know address, irq and flag pin. */ -#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) +#if IS_ENABLED(CONFIG_MTD_PHYSMAP) static struct mtd_partition tcm_partitions[] = { { .name = "bootloader(nor)", @@ -73,14 +73,14 @@ static struct platform_device tcm_flash_device = { }; #endif -#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) +#if IS_ENABLED(CONFIG_RTC_DRV_BFIN) static struct platform_device rtc_device = { .name = "rtc-bfin", .id = -1, }; #endif -#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) +#if IS_ENABLED(CONFIG_BFIN_MAC) #include static const unsigned short bfin_mac_peripherals[] = P_MII0; @@ -113,8 +113,7 @@ static struct platform_device bfin_mac_device = { }; #endif -#if defined(CONFIG_MTD_M25P80) \ - || defined(CONFIG_MTD_M25P80_MODULE) +#if IS_ENABLED(CONFIG_MTD_M25P80) static struct mtd_partition bfin_spi_flash_partitions[] = { { .name = "bootloader(spi)", @@ -141,13 +140,13 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = { }; #endif -#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) +#if IS_ENABLED(CONFIG_MMC_SPI) static struct bfin5xx_spi_chip mmc_spi_chip_info = { .enable_dma = 0, }; #endif -#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) +#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877) static const struct ad7877_platform_data bfin_ad7877_ts_info = { .model = 7877, .vref_delay_usecs = 50, /* internal, no capacitor */ @@ -164,8 +163,7 @@ static const struct ad7877_platform_data bfin_ad7877_ts_info = { #endif static struct spi_board_info bfin_spi_board_info[] __initdata = { -#if defined(CONFIG_MTD_M25P80) \ - || defined(CONFIG_MTD_M25P80_MODULE) +#if IS_ENABLED(CONFIG_MTD_M25P80) { /* the modalias must be the same as spi device driver name */ .modalias = "m25p80", /* Name of spi_driver for this device */ @@ -178,7 +176,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { }, #endif -#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) +#if IS_ENABLED(CONFIG_MMC_SPI) { .modalias = "mmc_spi", .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ @@ -188,7 +186,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { .mode = SPI_MODE_3, }, #endif -#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) +#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877) { .modalias = "ad7877", .platform_data = &bfin_ad7877_ts_info, @@ -198,7 +196,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { .chip_select = 2, }, #endif -#if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ +#if IS_ENABLED(CONFIG_SND_SOC_WM8731) \ && defined(CONFIG_SND_SOC_WM8731_SPI) { .modalias = "wm8731", @@ -208,7 +206,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { .mode = SPI_MODE_0, }, #endif -#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) +#if IS_ENABLED(CONFIG_SPI_SPIDEV) { .modalias = "spidev", .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ @@ -216,7 +214,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { .chip_select = 1, }, #endif -#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) +#if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1) { .modalias = "bfin-lq035q1-spi", .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ @@ -228,7 +226,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { }; /* SPI controller data */ -#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) +#if IS_ENABLED(CONFIG_SPI_BFIN5XX) /* SPI (0) */ static struct bfin5xx_spi_master bfin_spi0_info = { .num_chipselect = 6, @@ -300,7 +298,7 @@ static struct platform_device bfin_spi1_device = { }; #endif /* spi master and devices */ -#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) +#if IS_ENABLED(CONFIG_SERIAL_BFIN) #ifdef CONFIG_SERIAL_BFIN_UART0 static struct resource bfin_uart0_resources[] = { { @@ -399,7 +397,7 @@ static struct platform_device bfin_uart1_device = { #endif #endif -#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) +#if IS_ENABLED(CONFIG_BFIN_SIR) #ifdef CONFIG_BFIN_SIR0 static struct resource bfin_sir0_resources[] = { { @@ -454,7 +452,7 @@ static struct platform_device bfin_sir1_device = { #endif #endif -#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) +#if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI) static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; static struct resource bfin_twi0_resource[] = { @@ -482,12 +480,12 @@ static struct platform_device i2c_bfin_twi_device = { #endif static struct i2c_board_info __initdata bfin_i2c_board_info[] = { -#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) +#if IS_ENABLED(CONFIG_BFIN_TWI_LCD) { I2C_BOARD_INFO("pcf8574_lcd", 0x22), }, #endif -#if defined(CONFIG_INPUT_PCF8574) || defined(CONFIG_INPUT_PCF8574_MODULE) +#if IS_ENABLED(CONFIG_INPUT_PCF8574) { I2C_BOARD_INFO("pcf8574_keypad", 0x27), .irq = IRQ_PF8, @@ -495,7 +493,7 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = { #endif }; -#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) +#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT) #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART static struct resource bfin_sport0_uart_resources[] = { { @@ -566,7 +564,7 @@ static struct platform_device bfin_sport1_uart_device = { #endif #endif -#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) +#if IS_ENABLED(CONFIG_KEYBOARD_GPIO) #include #include @@ -588,7 +586,7 @@ static struct platform_device bfin_device_gpiokeys = { }; #endif -#if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE) +#if IS_ENABLED(CONFIG_SDH_BFIN) static struct bfin_sd_host bfin_sdh_data = { .dma_chan = CH_RSI, @@ -631,21 +629,21 @@ static struct platform_device *tcm_devices[] __initdata = { &bfin_dpmc, -#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) +#if IS_ENABLED(CONFIG_RTC_DRV_BFIN) &rtc_device, #endif -#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) +#if IS_ENABLED(CONFIG_BFIN_MAC) &bfin_mii_bus, &bfin_mac_device, #endif -#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) +#if IS_ENABLED(CONFIG_SPI_BFIN5XX) &bfin_spi0_device, &bfin_spi1_device, #endif -#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) +#if IS_ENABLED(CONFIG_SERIAL_BFIN) #ifdef CONFIG_SERIAL_BFIN_UART0 &bfin_uart0_device, #endif @@ -654,7 +652,7 @@ static struct platform_device *tcm_devices[] __initdata = { #endif #endif -#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) +#if IS_ENABLED(CONFIG_BFIN_SIR) #ifdef CONFIG_BFIN_SIR0 &bfin_sir0_device, #endif @@ -663,11 +661,11 @@ static struct platform_device *tcm_devices[] __initdata = { #endif #endif -#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) +#if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI) &i2c_bfin_twi_device, #endif -#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) +#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT) #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART &bfin_sport0_uart_device, #endif @@ -676,15 +674,15 @@ static struct platform_device *tcm_devices[] __initdata = { #endif #endif -#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) +#if IS_ENABLED(CONFIG_KEYBOARD_GPIO) &bfin_device_gpiokeys, #endif -#if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE) +#if IS_ENABLED(CONFIG_SDH_BFIN) &bf51x_sdh_device, #endif -#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) +#if IS_ENABLED(CONFIG_MTD_PHYSMAP) &tcm_flash_device, #endif }; diff --git a/arch/blackfin/mach-bf527/boards/ad7160eval.c b/arch/blackfin/mach-bf527/boards/ad7160eval.c index 1e7be62fccb6..9501bd8d9cd1 100644 --- a/arch/blackfin/mach-bf527/boards/ad7160eval.c +++ b/arch/blackfin/mach-bf527/boards/ad7160eval.c @@ -37,7 +37,7 @@ const char bfin_board_name[] = "ADI BF527-AD7160EVAL"; * Driver needs to know address, irq and flag pin. */ -#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) +#if IS_ENABLED(CONFIG_USB_MUSB_HDRC) static struct resource musb_resources[] = { [0] = { .start = 0xffc03800, @@ -97,7 +97,7 @@ static struct platform_device musb_device = { }; #endif -#if defined(CONFIG_FB_BFIN_RA158Z) || defined(CONFIG_FB_BFIN_RA158Z_MODULE) +#if IS_ENABLED(CONFIG_FB_BFIN_RA158Z) static struct resource bf52x_ra158z_resources[] = { { .start = IRQ_PPI_ERROR, @@ -114,7 +114,7 @@ static struct platform_device bf52x_ra158z_device = { }; #endif -#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) +#if IS_ENABLED(CONFIG_MTD_PHYSMAP) static struct mtd_partition ad7160eval_partitions[] = { { .name = "bootloader(nor)", @@ -154,7 +154,7 @@ static struct platform_device ad7160eval_flash_device = { }; #endif -#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) +#if IS_ENABLED(CONFIG_MTD_NAND_BF5XX) static struct mtd_partition partition_info[] = { { .name = "linux kernel(nand)", @@ -200,14 +200,14 @@ static struct platform_device bf5xx_nand_device = { }; #endif -#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) +#if IS_ENABLED(CONFIG_RTC_DRV_BFIN) static struct platform_device rtc_device = { .name = "rtc-bfin", .id = -1, }; #endif -#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) +#if IS_ENABLED(CONFIG_BFIN_MAC) #include static const unsigned short bfin_mac_peripherals[] = P_RMII0; @@ -241,8 +241,7 @@ static struct platform_device bfin_mac_device = { #endif -#if defined(CONFIG_MTD_M25P80) \ - || defined(CONFIG_MTD_M25P80_MODULE) +#if IS_ENABLED(CONFIG_MTD_M25P80) static struct mtd_partition bfin_spi_flash_partitions[] = { { .name = "bootloader(spi)", @@ -269,13 +268,13 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = { }; #endif -#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) +#if IS_ENABLED(CONFIG_MMC_SPI) static struct bfin5xx_spi_chip mmc_spi_chip_info = { .enable_dma = 0, }; #endif -#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) +#if IS_ENABLED(CONFIG_SND_BF5XX_I2S) static struct platform_device bfin_i2s = { .name = "bfin-i2s", .id = CONFIG_SND_BF5XX_SPORT_NUM, @@ -284,8 +283,7 @@ static struct platform_device bfin_i2s = { #endif static struct spi_board_info bfin_spi_board_info[] __initdata = { -#if defined(CONFIG_MTD_M25P80) \ - || defined(CONFIG_MTD_M25P80_MODULE) +#if IS_ENABLED(CONFIG_MTD_M25P80) { /* the modalias must be the same as spi device driver name */ .modalias = "m25p80", /* Name of spi_driver for this device */ @@ -297,8 +295,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { .mode = SPI_MODE_3, }, #endif -#if defined(CONFIG_SND_BF5XX_SOC_AD183X) \ - || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) +#if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD183X) { .modalias = "ad183x", .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ @@ -306,7 +303,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { .chip_select = 4, }, #endif -#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) +#if IS_ENABLED(CONFIG_MMC_SPI) { .modalias = "mmc_spi", .max_speed_hz = 30000000, /* max spi clock (SCK) speed in HZ */ @@ -316,7 +313,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { .mode = SPI_MODE_3, }, #endif -#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) +#if IS_ENABLED(CONFIG_SPI_SPIDEV) { .modalias = "spidev", .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ @@ -326,7 +323,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { #endif }; -#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) +#if IS_ENABLED(CONFIG_SPI_BFIN5XX) /* SPI controller data */ static struct bfin5xx_spi_master bfin_spi0_info = { .num_chipselect = MAX_CTRL_CS + MAX_BLACKFIN_GPIOS, @@ -364,7 +361,7 @@ static struct platform_device bfin_spi0_device = { }; #endif /* spi master and devices */ -#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) +#if IS_ENABLED(CONFIG_SERIAL_BFIN) #ifdef CONFIG_SERIAL_BFIN_UART0 static struct resource bfin_uart0_resources[] = { { @@ -475,7 +472,7 @@ static struct platform_device bfin_uart1_device = { #endif #endif -#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) +#if IS_ENABLED(CONFIG_BFIN_SIR) #ifdef CONFIG_BFIN_SIR0 static struct resource bfin_sir0_resources[] = { { @@ -530,7 +527,7 @@ static struct platform_device bfin_sir1_device = { #endif #endif -#if defined(CONFIG_TOUCHSCREEN_AD7160) || defined(CONFIG_TOUCHSCREEN_AD7160_MODULE) +#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7160) #include static const struct ad7160_platform_data bfin_ad7160_ts_info = { .sensor_x_res = 854, @@ -560,7 +557,7 @@ static const struct ad7160_platform_data bfin_ad7160_ts_info = { }; #endif -#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) +#if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI) static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; static struct resource bfin_twi0_resource[] = { @@ -588,7 +585,7 @@ static struct platform_device i2c_bfin_twi_device = { #endif static struct i2c_board_info __initdata bfin_i2c_board_info[] = { -#if defined(CONFIG_TOUCHSCREEN_AD7160) || defined(CONFIG_TOUCHSCREEN_AD7160_MODULE) +#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7160) { I2C_BOARD_INFO("ad7160", 0x33), .irq = IRQ_PH1, @@ -597,7 +594,7 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = { #endif }; -#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) +#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT) #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART static struct resource bfin_sport0_uart_resources[] = { { @@ -668,7 +665,7 @@ static struct platform_device bfin_sport1_uart_device = { #endif #endif -#if defined(CONFIG_INPUT_BFIN_ROTARY) || defined(CONFIG_INPUT_BFIN_ROTARY_MODULE) +#if IS_ENABLED(CONFIG_INPUT_BFIN_ROTARY) #include static struct bfin_rotary_platform_data bfin_rotary_data = { @@ -725,28 +722,28 @@ static struct platform_device *stamp_devices[] __initdata = { &bfin_dpmc, -#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) +#if IS_ENABLED(CONFIG_MTD_NAND_BF5XX) &bf5xx_nand_device, #endif -#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) +#if IS_ENABLED(CONFIG_RTC_DRV_BFIN) &rtc_device, #endif -#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) +#if IS_ENABLED(CONFIG_USB_MUSB_HDRC) &musb_device, #endif -#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) +#if IS_ENABLED(CONFIG_BFIN_MAC) &bfin_mii_bus, &bfin_mac_device, #endif -#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) +#if IS_ENABLED(CONFIG_SPI_BFIN5XX) &bfin_spi0_device, #endif -#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) +#if IS_ENABLED(CONFIG_SERIAL_BFIN) #ifdef CONFIG_SERIAL_BFIN_UART0 &bfin_uart0_device, #endif @@ -755,11 +752,11 @@ static struct platform_device *stamp_devices[] __initdata = { #endif #endif -#if defined(CONFIG_FB_BFIN_RA158Z) || defined(CONFIG_FB_BFIN_RA158Z_MODULE) +#if IS_ENABLED(CONFIG_FB_BFIN_RA158Z) &bf52x_ra158z_device, #endif -#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) +#if IS_ENABLED(CONFIG_BFIN_SIR) #ifdef CONFIG_BFIN_SIR0 &bfin_sir0_device, #endif @@ -768,11 +765,11 @@ static struct platform_device *stamp_devices[] __initdata = { #endif #endif -#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) +#if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI) &i2c_bfin_twi_device, #endif -#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) +#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT) #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART &bfin_sport0_uart_device, #endif @@ -781,15 +778,15 @@ static struct platform_device *stamp_devices[] __initdata = { #endif #endif -#if defined(CONFIG_INPUT_BFIN_ROTARY) || defined(CONFIG_INPUT_BFIN_ROTARY_MODULE) +#if IS_ENABLED(CONFIG_INPUT_BFIN_ROTARY) &bfin_rotary_device, #endif -#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) +#if IS_ENABLED(CONFIG_MTD_PHYSMAP) &ad7160eval_flash_device, #endif -#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) +#if IS_ENABLED(CONFIG_SND_BF5XX_I2S) &bfin_i2s, #endif }; diff --git a/arch/blackfin/mach-bf527/boards/cm_bf527.c b/arch/blackfin/mach-bf527/boards/cm_bf527.c index 413d0132b66f..b1004b35db36 100644 --- a/arch/blackfin/mach-bf527/boards/cm_bf527.c +++ b/arch/blackfin/mach-bf527/boards/cm_bf527.c @@ -37,7 +37,7 @@ const char bfin_board_name[] = "Bluetechnix CM-BF527"; * Driver needs to know address, irq and flag pin. */ -#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) +#if IS_ENABLED(CONFIG_USB_ISP1760_HCD) #include static struct resource bfin_isp1760_resources[] = { [0] = { @@ -72,7 +72,7 @@ static struct platform_device bfin_isp1760_device = { }; #endif -#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) +#if IS_ENABLED(CONFIG_USB_MUSB_HDRC) static struct resource musb_resources[] = { [0] = { .start = 0xffc03800, @@ -134,7 +134,7 @@ static struct platform_device musb_device = { }; #endif -#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) +#if IS_ENABLED(CONFIG_MTD_NAND_BF5XX) static struct mtd_partition partition_info[] = { { .name = "linux kernel(nand)", @@ -180,7 +180,7 @@ static struct platform_device bf5xx_nand_device = { }; #endif -#if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) +#if IS_ENABLED(CONFIG_BFIN_CFPCMCIA) static struct resource bfin_pcmcia_cf_resources[] = { { .start = 0x20310000, /* IO PORT */ @@ -209,14 +209,14 @@ static struct platform_device bfin_pcmcia_cf_device = { }; #endif -#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) +#if IS_ENABLED(CONFIG_RTC_DRV_BFIN) static struct platform_device rtc_device = { .name = "rtc-bfin", .id = -1, }; #endif -#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) +#if IS_ENABLED(CONFIG_SMC91X) #include static struct smc91x_platdata smc91x_info = { @@ -249,7 +249,7 @@ static struct platform_device smc91x_device = { }; #endif -#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE) +#if IS_ENABLED(CONFIG_DM9000) static struct resource dm9000_resources[] = { [0] = { .start = 0x203FB800, @@ -276,7 +276,7 @@ static struct platform_device dm9000_device = { }; #endif -#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) +#if IS_ENABLED(CONFIG_BFIN_MAC) #include static const unsigned short bfin_mac_peripherals[] = P_RMII0; @@ -309,7 +309,7 @@ static struct platform_device bfin_mac_device = { }; #endif -#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) +#if IS_ENABLED(CONFIG_USB_NET2272) static struct resource net2272_bfin_resources[] = { { .start = 0x20300000, @@ -330,8 +330,7 @@ static struct platform_device net2272_bfin_device = { }; #endif -#if defined(CONFIG_MTD_M25P80) \ - || defined(CONFIG_MTD_M25P80_MODULE) +#if IS_ENABLED(CONFIG_MTD_M25P80) static struct mtd_partition bfin_spi_flash_partitions[] = { { .name = "bootloader(spi)", @@ -358,13 +357,13 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = { }; #endif -#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) +#if IS_ENABLED(CONFIG_MMC_SPI) static struct bfin5xx_spi_chip mmc_spi_chip_info = { .enable_dma = 0, }; #endif -#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) +#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877) static const struct ad7877_platform_data bfin_ad7877_ts_info = { .model = 7877, .vref_delay_usecs = 50, /* internal, no capacitor */ @@ -381,8 +380,7 @@ static const struct ad7877_platform_data bfin_ad7877_ts_info = { #endif static struct spi_board_info bfin_spi_board_info[] __initdata = { -#if defined(CONFIG_MTD_M25P80) \ - || defined(CONFIG_MTD_M25P80_MODULE) +#if IS_ENABLED(CONFIG_MTD_M25P80) { /* the modalias must be the same as spi device driver name */ .modalias = "m25p80", /* Name of spi_driver for this device */ @@ -395,8 +393,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { }, #endif -#if defined(CONFIG_SND_BF5XX_SOC_AD183X) \ - || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) +#if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD183X) { .modalias = "ad183x", .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ @@ -404,7 +401,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { .chip_select = 4, }, #endif -#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) +#if IS_ENABLED(CONFIG_MMC_SPI) { .modalias = "mmc_spi", .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ @@ -414,7 +411,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { .mode = SPI_MODE_3, }, #endif -#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) +#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877) { .modalias = "ad7877", .platform_data = &bfin_ad7877_ts_info, @@ -424,7 +421,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { .chip_select = 2, }, #endif -#if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ +#if IS_ENABLED(CONFIG_SND_SOC_WM8731) \ && defined(CONFIG_SND_SOC_WM8731_SPI) { .modalias = "wm8731", @@ -434,7 +431,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { .mode = SPI_MODE_0, }, #endif -#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) +#if IS_ENABLED(CONFIG_SPI_SPIDEV) { .modalias = "spidev", .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ @@ -444,7 +441,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { #endif }; -#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) +#if IS_ENABLED(CONFIG_SPI_BFIN5XX) /* SPI controller data */ static struct bfin5xx_spi_master bfin_spi0_info = { .num_chipselect = 8, @@ -482,7 +479,7 @@ static struct platform_device bfin_spi0_device = { }; #endif /* spi master and devices */ -#if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE) +#if IS_ENABLED(CONFIG_MTD_GPIO_ADDR) static struct mtd_partition cm_partitions[] = { { .name = "bootloader(nor)", @@ -531,7 +528,7 @@ static struct platform_device cm_flash_device = { }; #endif -#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) +#if IS_ENABLED(CONFIG_SERIAL_BFIN) #ifdef CONFIG_SERIAL_BFIN_UART0 static struct resource bfin_uart0_resources[] = { { @@ -642,7 +639,7 @@ static struct platform_device bfin_uart1_device = { #endif #endif -#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) +#if IS_ENABLED(CONFIG_BFIN_SIR) #ifdef CONFIG_BFIN_SIR0 static struct resource bfin_sir0_resources[] = { { @@ -697,7 +694,7 @@ static struct platform_device bfin_sir1_device = { #endif #endif -#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) +#if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI) static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; static struct resource bfin_twi0_resource[] = { @@ -725,25 +722,25 @@ static struct platform_device i2c_bfin_twi_device = { #endif static struct i2c_board_info __initdata bfin_i2c_board_info[] = { -#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) +#if IS_ENABLED(CONFIG_BFIN_TWI_LCD) { I2C_BOARD_INFO("pcf8574_lcd", 0x22), }, #endif -#if defined(CONFIG_INPUT_PCF8574) || defined(CONFIG_INPUT_PCF8574_MODULE) +#if IS_ENABLED(CONFIG_INPUT_PCF8574) { I2C_BOARD_INFO("pcf8574_keypad", 0x27), .irq = IRQ_PF8, }, #endif -#if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE) +#if IS_ENABLED(CONFIG_FB_BFIN_7393) { I2C_BOARD_INFO("bfin-adv7393", 0x2B), }, #endif }; -#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) +#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT) #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART static struct resource bfin_sport0_uart_resources[] = { { @@ -814,7 +811,7 @@ static struct platform_device bfin_sport1_uart_device = { #endif #endif -#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) +#if IS_ENABLED(CONFIG_KEYBOARD_GPIO) #include #include @@ -861,48 +858,48 @@ static struct platform_device *cmbf527_devices[] __initdata = { &bfin_dpmc, -#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) +#if IS_ENABLED(CONFIG_MTD_NAND_BF5XX) &bf5xx_nand_device, #endif -#if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) +#if IS_ENABLED(CONFIG_BFIN_CFPCMCIA) &bfin_pcmcia_cf_device, #endif -#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) +#if IS_ENABLED(CONFIG_RTC_DRV_BFIN) &rtc_device, #endif -#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) +#if IS_ENABLED(CONFIG_USB_ISP1760_HCD) &bfin_isp1760_device, #endif -#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) +#if IS_ENABLED(CONFIG_USB_MUSB_HDRC) &musb_device, #endif -#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) +#if IS_ENABLED(CONFIG_SMC91X) &smc91x_device, #endif -#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE) +#if IS_ENABLED(CONFIG_DM9000) &dm9000_device, #endif -#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) +#if IS_ENABLED(CONFIG_BFIN_MAC) &bfin_mii_bus, &bfin_mac_device, #endif -#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) +#if IS_ENABLED(CONFIG_USB_NET2272) &net2272_bfin_device, #endif -#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) +#if IS_ENABLED(CONFIG_SPI_BFIN5XX) &bfin_spi0_device, #endif -#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) +#if IS_ENABLED(CONFIG_SERIAL_BFIN) #ifdef CONFIG_SERIAL_BFIN_UART0 &bfin_uart0_device, #endif @@ -911,7 +908,7 @@ static struct platform_device *cmbf527_devices[] __initdata = { #endif #endif -#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) +#if IS_ENABLED(CONFIG_BFIN_SIR) #ifdef CONFIG_BFIN_SIR0 &bfin_sir0_device, #endif @@ -920,11 +917,11 @@ static struct platform_device *cmbf527_devices[] __initdata = { #endif #endif -#if defined(CONFIG_I2C_BLACKFIN_TWI)