OMAP: GPIO: fix _set_gpio_triggering() for OMAP2+
Subsystems (2)
PATCH 1/1 OMAP: GPIO: fix _set_gpio_triggering() for OMAP2+
In case on OMAP2+ we call set_24xx_gpio_triggering() instead of updating reg and l values. However, at the end of the function we perform a write:
__raw_writel(l, reg);
So on OMAP2+ we end up writing 0 to the bank->base which is not correct (typically this points to GPIO_REVISION register).
Fix this by returning immediately after call toset_24xx_gpio_triggering().
--- arch/arm/plat-omap/gpio.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/plat-omap/gpio.c +1 -1
@@ -867,7 +867,7 @@ static int _set_gpio_triggering(struct gpio_bank *bank, int gpio, int trigger)case METHOD_GPIO_24XX :case METHOD_GPIO_44XX :set_24xx_gpio_triggering (bank, gpio, trigger); -break ; +return 0 ;#endif default : goto bad;
Signature · 1 line
1.7.3.2
PATCH 1/1 OMAP: GPIO: fix _set_gpio_triggering() for OMAP2+
Quoted 6 lines · Mika Westerberg
In case on OMAP2+ we call
set_24xx_gpio_triggering()instead of updating reg and l values. However, at the end of the function we perform a write:__raw_writel(l, reg);
Quoted 7 lines
So on OMAP2+ we end up writing 0 to the
bank->basewhich is not correct (typically this points toGPIO_REVISIONregister).Fix this by returning immediately after call to
set_24xx_gpio_triggering().Signed-off-by Mika Westerberg <[email protected]>
Tony, this should be added to omap-for-linus as it fixes a problem in the recently merged GPIO omap_device/hwmod conversion.
Thanks,
Kevin
Quoted 17 lines
--- arch/arm/plat-omap/gpio.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)arch/arm/plat-omap/gpio.c +1
-1@@ -867,7 +867,7 @@ static int _set_gpio_triggering(struct gpio_bank *bank, int gpio, int trigger)case METHOD_GPIO_24XX :case METHOD_GPIO_44XX :set_24xx_gpio_triggering (bank, gpio, trigger); -break ; +return 0 ;#endif default : goto bad;
PATCH 1/1 OMAP: GPIO: fix _set_gpio_triggering() for OMAP2+
Quoted 14 lines · Kevin Hilman
Quoted 12 lines · Mika Westerberg
In case on OMAP2+ we call
set_24xx_gpio_triggering()instead of updating reg and l values. However, at the end of the function we perform a write:__raw_writel(l, reg);So on OMAP2+ we end up writing 0 to the
bank->basewhich is not correct (typically this points toGPIO_REVISIONregister).Fix this by returning immediately after call to
set_24xx_gpio_triggering().
Quoted 6 lines
Quoted 1 line
Signed-off-by Mika Westerberg <[email protected]>Acked-by Kevin Hilman <[email protected]>Tony, this should be added to omap-for-linus as it fixes a problem in the recently merged GPIO omap_device/hwmod conversion.
On second thought, it's a bit late for the main 2.6.38 window, so will queue this in my pm-fixes branch for the .38-rc cycle.
Kevin
PATCH 1/1 OMAP: GPIO: fix _set_gpio_triggering() for OMAP2+
Quoted 17 lines · Kevin Hilman
Quoted 16 lines · Kevin Hilman
Quoted 13 lines · Mika Westerberg
In case on OMAP2+ we call
set_24xx_gpio_triggering()instead of updating reg and l values. However, at the end of the function we perform a write:__raw_writel(l, reg);So on OMAP2+ we end up writing 0 to the
bank->basewhich is not correct (typically this points toGPIO_REVISIONregister).Fix this by returning immediately after call to
set_24xx_gpio_triggering().Signed-off-by Mika Westerberg <[email protected]>
Quoted 7 lines
Quoted 4 lines
Acked-by Kevin Hilman <[email protected]>Tony, this should be added to omap-for-linus as it fixes a problem in the recently merged GPIO omap_device/hwmod conversion.
On second thought, it's a bit late for the main 2.6.38 window, so will queue this in my pm-fixes branch for the .38-rc cycle.
Yeah let's not mess with omap-for-linus right now, but instead start queueing up fixes for -rc1.
Tony
PATCH 1/1 OMAP: GPIO: fix _set_gpio_triggering() for OMAP2+
Kevin,
Quoted 16 lines · Tony Lindgren
Quoted 15 lines · Kevin Hilman
Quoted 14 lines · Kevin Hilman
Quoted 12 lines · Mika Westerberg
In case on OMAP2+ we call
set_24xx_gpio_triggering()instead of updating reg and l values. However, at the end of the function we perform a write:?
__raw_writel(l, reg);So on OMAP2+ we end up writing 0 to the
bank->basewhich is not correct (typically this points toGPIO_REVISIONregister).Fix this by returning immediately after call to
set_24xx_gpio_triggering().
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 1 line
Signed-off-by Mika Westerberg <[email protected]>Acked-by Kevin Hilman <[email protected]>Tony, this should be added to omap-for-linus as it fixes a problem in the recently merged GPIO omap_device/hwmod conversion.
One clarification - This problem should be existing since the following commit 92105bb70634abacc08bbe12bf6f888fbd7dad38
which was introduced on Sep 7, 2005
FYI, this part of the code remained untouched during GPIO omap_device/hwmod conversion.
-V Charulatha
Quoted 8 lines
Quoted 3 lines
On second thought, it's a bit late for the main 2.6.38 window, so will queue this in my pm-fixes branch for the .38-rc cycle.
Yeah let's not mess with omap-for-linus right now, but instead start queueing up fixes for -rc1.
Tony
PATCH 1/1 OMAP: GPIO: fix _set_gpio_triggering() for OMAP2+
Hi Charu,
Quoted 24 lines · Charulatha
Quoted 16 lines · Tony Lindgren
Quoted 15 lines · Kevin Hilman
Quoted 14 lines · Kevin Hilman
Quoted 12 lines · Mika Westerberg
In case on OMAP2+ we call
set_24xx_gpio_triggering()instead of updating reg and l values. However, at the end of the function we perform a write:?
__raw_writel(l, reg);So on OMAP2+ we end up writing 0 to the
bank->basewhich is not correct (typically this points toGPIO_REVISIONregister).Fix this by returning immediately after call to
set_24xx_gpio_triggering().Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 1 line
Signed-off-by Mika Westerberg <[email protected]>Acked-by Kevin Hilman <[email protected]>Tony, this should be added to omap-for-linus as it fixes a problem in the recently merged GPIO omap_device/hwmod conversion.
Quoted 7 lines
One clarification - This problem should be existing since the following commit
92105bb70634abacc08bbe12bf6f888fbd7dad38
which was introduced on Sep 7, 2005FYI, this part of the code remained untouched during GPIO omap_device/hwmod conversion.
OK, thanks for the clarification.
I had assumed it was recent changes since the patch didn't apply cleanly, but am glad to be wrong. :)
Kevin
PATCH 1/1 OMAP: GPIO: fix _set_gpio_triggering() for OMAP2+
Hi Kevin,
Quoted 3 lines · Kevin Hilman
I had assumed it was recent changes since the patch didn't apply cleanly, but am glad to be wrong. :)
The patch should apply cleanly on the latest mainline. Do you want me to rebase it against some other tree and resend?
Thanks,
MW
PATCH 1/1 OMAP: GPIO: fix _set_gpio_triggering() for OMAP2+
Quoted 9 lines · Mika Westerberg
Hi Kevin,
Quoted 3 lines · Kevin Hilman
I had assumed it was recent changes since the patch didn't apply cleanly, but am glad to be wrong. :)
The patch should apply cleanly on the latest mainline. Do you want me to rebase it against some other tree and resend?
No, it's fine. I'll be queueing it for .38-rc2 and it's in my 'fixes-for-tony' branch.
Kevin