Blackfin arch: Use GPIO_BANKSIZE macro to replace const number 16 for GPIO_BANK_NUM...
authorBryan Wu <cooloney@kernel.org>
Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)
committerBryan Wu <cooloney@kernel.org>
Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)
Signed-off-by: Bryan Wu <cooloney@kernel.org>
arch/blackfin/include/asm/gpio.h
arch/blackfin/include/asm/processor.h

index f8fe33b8bca6450138c0714492d44a77545e48a5..ec2ab465709e59a9c510b49c75b4d9b0a8a2c787 100644 (file)
@@ -87,9 +87,9 @@
 #define gpio_bank(x)   ((x) >> 4)
 #define gpio_bit(x)    (1<<((x) & 0xF))
 #define gpio_sub_n(x)  ((x) & 0xF)
-#define GPIO_BANK_NUM  DIV_ROUND_UP(MAX_BLACKFIN_GPIOS, 16)
 
-#define GPIO_BANKSIZE 16
+#define GPIO_BANKSIZE  16
+#define GPIO_BANK_NUM  DIV_ROUND_UP(MAX_BLACKFIN_GPIOS, GPIO_BANKSIZE)
 
 #define        GPIO_0  0
 #define        GPIO_1  1
index 30703c75030c42388cebe52b778aece3e14e86ac..2cb0b8711fa4dc250396670fc359fbf224632865 100644 (file)
@@ -159,6 +159,8 @@ static inline uint32_t __pure bfin_compiled_revid(void)
        return 4;
 #elif defined(CONFIG_BF_REV_0_5)
        return 5;
+#elif defined(CONFIG_BF_REV_0_6)
+       return 6;
 #elif defined(CONFIG_BF_REV_ANY)
        return 0xffff;
 #else