bitops: introduce BIT() definition
authorHeiko Schocher <hs@denx.de>
Mon, 7 Sep 2015 11:43:52 +0000 (13:43 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 11 Sep 2015 21:15:32 +0000 (17:15 -0400)
introduce BIT() definition, used in at91_udc gadget
driver.

Signed-off-by: Heiko Schocher <hs@denx.de>
[remove all other occurrences of BIT(x) definition]
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Acked-by: Stefan Roese <sr@denx.de>
Acked-by: Anatolij Gustschin <agust@denx.de>
16 files changed:
arch/arm/include/asm/arch-am33xx/cpu.h
arch/arm/include/asm/arch-hi6220/gpio.h
arch/arm/include/asm/arch-omap5/cpu.h
arch/arm/include/asm/arch-tegra/dc.h
arch/arm/mach-davinci/cpu.c
arch/arm/mach-keystone/include/mach/clock_defs.h
arch/arm/mach-keystone/include/mach/hardware.h
arch/arm/mach-mvebu/include/mach/soc.h
arch/arm/mach-zynq/include/mach/gpio.h
drivers/ddr/marvell/a38x/ddr3_init.h
drivers/mtd/nand/jz4740_nand.c
drivers/spi/davinci_spi.c
drivers/spi/ep93xx_spi.c
drivers/video/anx9804.c
include/fsl-mc/fsl_mc.h
include/linux/bitops.h

index 13a9cad23884ec409d95338d3ce3320d7a72154d..112ac5eacd9148a08691e5bc1d0be856f5174ae6 100644 (file)
@@ -17,7 +17,6 @@
 
 #include <asm/arch/hardware.h>
 
-#define BIT(x)                         (1 << x)
 #define CL_BIT(x)                      (0 << x)
 
 /* Timer register bits */
index 98122a2f707006cd93dec1734b2ce059b2b86fc5..4fafaef5d55c015c27bb46d62e3c0fa7348fafad 100644 (file)
@@ -11,8 +11,6 @@
 #define HI6220_GPIO_BASE(bank) (((bank < 4) ? 0xf8011000 : \
                                0xf7020000 - 0x4000) + (0x1000 * bank))
 
-#define BIT(x)                 (1 << (x))
-
 #define HI6220_GPIO_PER_BANK   8
 #define HI6220_GPIO_DIR                0x400
 
index 6109b92777c9b8c184e553f2003c847af55a393b..b1513e9aaf468751178c4525a258aca6cea4d885 100644 (file)
@@ -56,8 +56,6 @@ struct watchdog {
 #endif /* __ASSEMBLY__ */
 #endif /* __KERNEL_STRICT_NAMES */
 
-#define BIT(x)                         (1 << (x))
-
 #define WD_UNLOCK1             0xAAAA
 #define WD_UNLOCK2             0x5555
 
index 6ffb4683959e92d206fe9f4600d496595a3d7330..3a87f0b9566a227a0e0da920aa2e77f55b13d5e6 100644 (file)
@@ -364,8 +364,6 @@ struct dc_ctlr {
        struct dc_winbuf_reg winbuf;    /* WINBUF A/B/C 0x800 ~ 0x80d */
 };
 
-#define BIT(pos)       (1U << pos)
-
 /* DC_CMD_DISPLAY_COMMAND 0x032 */
 #define CTRL_MODE_SHIFT                5
 #define CTRL_MODE_MASK         (0x3 << CTRL_MODE_SHIFT)
index ff6114775728cfd5f2a066765de73186c27bed0b..74c3d5d936c2a7c83cc643239120d9ce010ce684 100644 (file)
@@ -28,8 +28,6 @@ DECLARE_GLOBAL_DATA_PTR;
 #define PLLC_PLLDIV8   0x170
 #define PLLC_PLLDIV9   0x174
 
-#define BIT(x)         (1 << (x))
-
 /* SOC-specific pll info */
 #ifdef CONFIG_SOC_DM355
 #define ARM_PLLDIV     PLLC_PLLDIV1
index 8ad371f43d27c18752419d8ffce86846d4c2b51b..f8d61d6ef1f2f82f20527ad5976e4786c94e1e73 100644 (file)
@@ -11,8 +11,6 @@
 
 #include <asm/arch/hardware.h>
 
-#define BIT(x)                 (1 << (x))
-
 /* PLL Control Registers */
 struct pllctl_regs {
        u32     ctl;            /* 00 */
index 53f28ec8daf1712e37497ba55f3b6141bc917da7..f98a24eb5738cdd7cd76e27239ccadfbe370e0ec 100644 (file)
@@ -24,8 +24,6 @@ typedef volatile unsigned int   *dv_reg_p;
 
 #endif
 
-#define                BIT(x)  (1 << (x))
-
 #define KS2_DDRPHY_PIR_OFFSET           0x04
 #define KS2_DDRPHY_PGCR0_OFFSET         0x08
 #define KS2_DDRPHY_PGCR1_OFFSET         0x0C
index a8a6b27d802b7c4e4dc9caa512e49b9daaf72c87..02c21bcdeddde02389003048975b97e268804f52 100644 (file)
@@ -11,8 +11,6 @@
 #ifndef _MVEBU_SOC_H
 #define _MVEBU_SOC_H
 
-#define BIT(x)                 (1 << (x))
-
 #define SOC_MV78460_ID         0x7846
 #define SOC_88F6810_ID         0x6810
 #define SOC_88F6820_ID         0x6820
index 9e1e7da2037a85dd0c000a974163eb9a48a1e665..0789c497368db44d9b3fc588cde872c8b51540ef 100644 (file)
@@ -71,6 +71,4 @@
 /* GPIO upper 16 bit mask */
 #define ZYNQ_GPIO_UPPER_MASK 0xFFFF0000
 
-#define BIT(x) (1<<x)
-
 #endif /* _ZYNQ_GPIO_H */
index e2ff040b001c8a4acdd8199fc840cac4f1472e3b..cb3fb24416e243b18fa1aa66a2a873ff3393c056 100644 (file)
@@ -32,8 +32,6 @@
  */
 #define MV_DEBUG_INIT
 
-#define BIT(x)                         (1 << (x))
-
 #ifdef MV_DEBUG_INIT
 #define DEBUG_INIT_S(s)                        puts(s)
 #define DEBUG_INIT_D(d, l)             printf("%x", d)
index 7a62cc33613c1f9e4eaac33da19e2b8c27bd74a3..abcedc210211f94d0dd0698a31a528f96d29092f 100644 (file)
@@ -16,7 +16,6 @@
 #define JZ_NAND_CMD_ADDR (JZ_NAND_DATA_ADDR + 0x8000)
 #define JZ_NAND_ADDR_ADDR (JZ_NAND_DATA_ADDR + 0x10000)
 
-#define BIT(x) (1 << (x))
 #define JZ_NAND_ECC_CTRL_ENCODING      BIT(3)
 #define JZ_NAND_ECC_CTRL_RS            BIT(2)
 #define JZ_NAND_ECC_CTRL_RESET         BIT(1)
index 0a036ccb009a81093069b5377b62c0baa9592e11..0bd4f88926f142bd264625a8ede2f84128f554d7 100644 (file)
@@ -15,8 +15,6 @@
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
 
-#define BIT(x)                 (1 << (x))
-
 /* SPIGCR0 */
 #define SPIGCR0_SPIENA_MASK    0x1
 #define SPIGCR0_SPIRST_MASK    0x0
index 235557ea3c53404253e31393b794d8cf7fe6ac91..cb682ddda48a5735c00e175972e01f9ec43910b4 100644 (file)
@@ -16,8 +16,6 @@
 
 #include <asm/arch/ep93xx.h>
 
-
-#define BIT(x)                 (1<<(x))
 #define SSPBASE                        SPI_BASE
 
 #define SSPCR0                 0x0000
index 83d60d672dd6732f0758a56fe59e35042848b413..37ad69a039c8f50860f0bd7db02a630a8080f80a 100755 (executable)
@@ -14,8 +14,6 @@
 #include <i2c.h>
 #include "anx9804.h"
 
-#define BIT(x) (1 << (x))
-
 /* Registers at i2c address 0x38 */
 
 #define ANX9804_HDCP_CONTROL_0_REG                             0x01
index 9106f25f683573736f2e38e42f003c0f44122836..9517a4a7b5d753ba2beb49b8f14a00f04794244f 100644 (file)
@@ -12,7 +12,6 @@
 #define MC_CCSR_BASE_ADDR \
        ((struct mc_ccsr_registers __iomem *)0x8340000)
 
-#define BIT(x)                 (1 << (x))
 #define GCR1_P1_STOP           BIT(31)
 #define GCR1_P2_STOP           BIT(30)
 #define GCR1_P1_DE_RST         BIT(23)
index e724310298610bb7c1230ecff1c8d158df28c6d4..7d30ace41fcb29fe14f83c8db7332b5f6262697a 100644 (file)
@@ -3,6 +3,8 @@
 
 #include <asm/types.h>
 
+#define BIT(nr)                (1UL << (nr))
+
 /*
  * ffs: find first bit set. This is defined the same way as
  * the libc and compiler builtin ffs routines, therefore