diff options
author | Ćukasz Majewski <l.majewski@samsung.com> | 2012-09-04 21:47:46 +0000 |
---|---|---|
committer | Minkyu Kang <mk7.kang@samsung.com> | 2012-11-15 21:08:18 +0900 |
commit | 822593f02890f10e08c39ed82f926c9a80f7d533 (patch) | |
tree | 07e04295e200d15a18a8d09df807c444200d20de /arch/arm/include/asm/arch-s5pc1xx | |
parent | ccfa398547ce0b579f2e7874e78948246c739237 (diff) | |
download | u-boot-imx-822593f02890f10e08c39ed82f926c9a80f7d533.zip u-boot-imx-822593f02890f10e08c39ed82f926c9a80f7d533.tar.gz u-boot-imx-822593f02890f10e08c39ed82f926c9a80f7d533.tar.bz2 |
gpio:fix: Proper handling of GPIO subsystem parts at Samsung devices
Now proper GPIO parts numbering is handled at Samsung devices.
This fix is necessary for code using GPIO located at other banks
than first.
Test HW:
- Exynos4210 - Trats
- S5PC110 - goni
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Diffstat (limited to 'arch/arm/include/asm/arch-s5pc1xx')
-rw-r--r-- | arch/arm/include/asm/arch-s5pc1xx/gpio.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/arm/include/asm/arch-s5pc1xx/gpio.h b/arch/arm/include/asm/arch-s5pc1xx/gpio.h index 76b901b..00e498d 100644 --- a/arch/arm/include/asm/arch-s5pc1xx/gpio.h +++ b/arch/arm/include/asm/arch-s5pc1xx/gpio.h @@ -143,7 +143,12 @@ static inline unsigned int s5p_gpio_base(int nr) return S5PC110_GPIO_BASE; } -#define s5pc110_gpio_get_nr(bank, pin) \ +static inline unsigned int s5p_gpio_part_max(int nr) +{ + return 0; +} + +#define s5pc110_gpio_get_nr(bank, pin) \ ((((((unsigned int)&(((struct s5pc110_gpio *)S5PC110_GPIO_BASE)->bank))\ - S5PC110_GPIO_BASE) / sizeof(struct s5p_gpio_bank)) \ * GPIO_PER_BANK) + pin) |