diff options
Diffstat (limited to 'arch/blackfin/include')
-rw-r--r-- | arch/blackfin/include/asm/gpio.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/blackfin/include/asm/gpio.h b/arch/blackfin/include/asm/gpio.h index d8485624006a..2a5e846a5382 100644 --- a/arch/blackfin/include/asm/gpio.h +++ b/arch/blackfin/include/asm/gpio.h | |||
@@ -85,10 +85,12 @@ | |||
85 | #define __ARCH_BLACKFIN_GPIO_H__ | 85 | #define __ARCH_BLACKFIN_GPIO_H__ |
86 | 86 | ||
87 | #define gpio_bank(x) ((x) >> 4) | 87 | #define gpio_bank(x) ((x) >> 4) |
88 | #define gpio_bank_n(x) ((x) & 0xF ? ((x) >> 4) + 1 : (x) >> 4) | ||
88 | #define gpio_bit(x) (1<<((x) & 0xF)) | 89 | #define gpio_bit(x) (1<<((x) & 0xF)) |
89 | #define gpio_sub_n(x) ((x) & 0xF) | 90 | #define gpio_sub_n(x) ((x) & 0xF) |
90 | 91 | ||
91 | #define GPIO_BANKSIZE 16 | 92 | #define GPIO_BANKSIZE 16 |
93 | #define GPIO_BANK_NUM gpio_bank_n(MAX_BLACKFIN_GPIOS) | ||
92 | 94 | ||
93 | #define GPIO_0 0 | 95 | #define GPIO_0 0 |
94 | #define GPIO_1 1 | 96 | #define GPIO_1 1 |