ARM: plat-nomadik: move NMK_GPIO_PER_CHIP into gpio-nomadik.h
authorPatrice Chotard <patrice.chotard@stericsson.com>
Mon, 8 Oct 2012 14:35:09 +0000 (16:35 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Sun, 28 Oct 2012 20:16:15 +0000 (21:16 +0100)
Move NMK_GPIO_PER_CHIP to gpio-nomadik.h and define it with a
shift operator.

Signed-off-by: Patrice Chotard <patrice.chotard@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
arch/arm/plat-nomadik/include/plat/gpio-nomadik.h
drivers/pinctrl/pinctrl-nomadik.c

index cf81111b79a6b01d72c8266a1d67a392f07ef89f..a74999438de458d400a01ad8b059254936247b54 100644 (file)
@@ -18,6 +18,9 @@
  * the "gpio" namespace for generic and cross-machine functions
  */
 
+#define GPIO_BLOCK_SHIFT 5
+#define NMK_GPIO_PER_CHIP (1 << GPIO_BLOCK_SHIFT)
+
 /* Register in the logic block */
 #define NMK_GPIO_DAT   0x00
 #define NMK_GPIO_DATS  0x04
index cf82d9ce4deeccc8c19c6104103fee84854c945a..f5c0da1f3b30fcab52c3ac282d8cdb59d5dd739c 100644 (file)
@@ -60,8 +60,6 @@ static inline void prcmu_write_masked(unsigned int reg, u32 mask, u32 value) {}
  * Symbols in this file are called "nmk_gpio" for "nomadik gpio"
  */
 
-#define NMK_GPIO_PER_CHIP      32
-
 struct nmk_gpio_chip {
        struct gpio_chip chip;
        struct irq_domain *domain;
This page took 0.027482 seconds and 5 git commands to generate.