aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpio
diff options
context:
space:
mode:
authorMarkus Mayer <markus.mayer@linaro.org>2014-01-21 16:10:04 -0800
committerAlex Elder <elder@linaro.org>2014-03-31 08:01:01 -0500
commit97c83aae19f136659fe372627d4afc98f0906a6a (patch)
tree9b35e852f85f75bb841792e4b41c443584794420 /drivers/gpio
parent4cd924cea9ed2e6be536376f56f102ac3a8d2fab (diff)
gpio: bcm281xx: Fix parameter name for GPIO_CONTROL macro
The GPIO_CONTROL macro returns the control register offset when given a GPIO number. Update the argument name in the macro to reflect that it takes in a GPIO number and not a bank. Signed-off-by: Markus Mayer <markus.mayer@linaro.org> Reviewed-by: Tim Kryger <tim.kryger@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> (cherry picked from commit 3232139236a10207967330267ef5fd62d98803df)
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/gpio-bcm-kona.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-bcm-kona.c b/drivers/gpio/gpio-bcm-kona.c
index f32357e2d78..f1094f49251 100644
--- a/drivers/gpio/gpio-bcm-kona.c
+++ b/drivers/gpio/gpio-bcm-kona.c
@@ -28,6 +28,10 @@
#define GPIO_BANK(gpio) ((gpio) >> 5)
#define GPIO_BIT(gpio) ((gpio) & (GPIO_PER_BANK - 1))
+/* There is a GPIO control register for each GPIO */
+#define GPIO_CONTROL(gpio) (0x00000100 + ((gpio) << 2))
+
+/* The remaining registers are per GPIO bank */
#define GPIO_OUT_STATUS(bank) (0x00000000 + ((bank) << 2))
#define GPIO_IN_STATUS(bank) (0x00000020 + ((bank) << 2))
#define GPIO_OUT_SET(bank) (0x00000040 + ((bank) << 2))
@@ -35,7 +39,6 @@
#define GPIO_INT_STATUS(bank) (0x00000080 + ((bank) << 2))
#define GPIO_INT_MASK(bank) (0x000000a0 + ((bank) << 2))
#define GPIO_INT_MSKCLR(bank) (0x000000c0 + ((bank) << 2))
-#define GPIO_CONTROL(bank) (0x00000100 + ((bank) << 2))
#define GPIO_PWD_STATUS(bank) (0x00000500 + ((bank) << 2))
#define GPIO_GPPWR_OFFSET 0x00000520