linux/arch/blackfin
Bryan Wu 397861cd80 Blackfin arch: fix bug - gpio_bank() macros messed up bank number caculating with positioning a gpio
The whole story:

Before BF51x merged, all the MAX_BLACKFIN_GPIOS are integral multiple of GPIO_BANKSIZE (= 16).
But BF51x provides MAX_BLACKFIN_GPIOS = 40 which includes 3 banks and the 3rd bank has only 8
GPIO pins.

Therefore, gpio_bank() macros is correct when you try to find a GPIO in which bank (GPIO_35 is
in bank 2). But on BF51x gpio_bank(MAX_BLACKFIN_GPIOS) only gives out 2 banks instead of 3
banks for some static array initialization.

This patch add a new macros gpio_bank_n() and GPIO_BANK_NUM to do bank number caculating and
remain the gpio_bank() macros for positioning a gpio in which bank.

Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-11-18 17:48:22 +08:00
..
boot kbuild: use KECHO convenience echo 2008-12-03 21:32:01 +01:00
configs Blackfin arch: update defconfig file for all boards 2008-11-18 17:48:22 +08:00
include/asm Blackfin arch: fix bug - gpio_bank() macros messed up bank number caculating with positioning a gpio 2008-11-18 17:48:22 +08:00
kernel Blackfin arch: fix bug - gpio_bank() macros messed up bank number caculating with positioning a gpio 2008-11-18 17:48:22 +08:00
lib Blackfin arch: move EXPORT_SYMBOL to the place where it is actually defined 2008-10-28 11:07:15 +08:00
mach-bf518 Blackfin arch: add support for Blackfin latest processor family BF51x 2008-11-18 17:48:21 +08:00
mach-bf527 Blackfin arch: Enable ISP1760 USB Host Driver in platform device initialization code. 2008-11-18 17:48:22 +08:00
mach-bf533 Blackfin arch: update anomaly lists to match latest sheets 2008-10-28 16:22:41 +08:00
mach-bf537 Blackfin arch: Enable ISP1760 USB Host Driver in platform device initialization code. 2008-11-18 17:48:22 +08:00
mach-bf538 Blackfin arch: update anomaly lists to match latest sheets 2008-10-28 16:22:41 +08:00
mach-bf548 Blackfin arch: enable i2c_bfin_twi0_device in cm_bf548 board 2008-11-18 17:48:22 +08:00
mach-bf561 Blackfin arch: Enable ISP1760 USB Host Driver in platform device initialization code. 2008-11-18 17:48:22 +08:00
mach-common Blackfin arch: fix bug - gpio_bank() macros messed up bank number caculating with positioning a gpio 2008-11-18 17:48:22 +08:00
mm Blackfin arch: fix bug - shared lib function in L2 failed be called 2008-10-28 15:57:49 +08:00
oprofile [Blackfin] arch: __FUNCTION__ is gcc-specific, use __func__ 2008-04-23 09:39:01 +08:00
Kconfig Blackfin arch: add support for Blackfin latest processor family BF51x 2008-11-18 17:48:21 +08:00
Kconfig.debug Blackfin arch: Add optional verbose debug 2008-10-10 18:13:21 +08:00
Makefile Blackfin arch: add support for Blackfin latest processor family BF51x 2008-11-18 17:48:21 +08:00