summaryrefslogtreecommitdiffstats
path: root/arch/blackfin/include/asm/gpio.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/blackfin/include/asm/gpio.h')
-rw-r--r--arch/blackfin/include/asm/gpio.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/blackfin/include/asm/gpio.h b/arch/blackfin/include/asm/gpio.h
index d8485624006..2a5e846a538 100644
--- a/arch/blackfin/include/asm/gpio.h
+++ b/arch/blackfin/include/asm/gpio.h
@@ -85,10 +85,12 @@
#define __ARCH_BLACKFIN_GPIO_H__
#define gpio_bank(x) ((x) >> 4)
+#define gpio_bank_n(x) ((x) & 0xF ? ((x) >> 4) + 1 : (x) >> 4)
#define gpio_bit(x) (1<<((x) & 0xF))
#define gpio_sub_n(x) ((x) & 0xF)
#define GPIO_BANKSIZE 16
+#define GPIO_BANK_NUM gpio_bank_n(MAX_BLACKFIN_GPIOS)
#define GPIO_0 0
#define GPIO_1 1