aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-omap.c
diff options
context:
space:
mode:
authorKevin Hilman <khilman@ti.com>2011-04-21 12:08:15 -0400
committerKevin Hilman <khilman@ti.com>2011-06-16 14:12:42 -0400
commitdf3c851716424fda0c7b14c4cae71cea467a9944 (patch)
treee31edcef24515c461b518fc3d294432fa2db7cbb /drivers/gpio/gpio-omap.c
parent2c53b436a30867eb6b47dd7bab23ba638d1fb0d2 (diff)
gpio/omap: _clear_gpio_irqbank: fix flushing of posted write
In commit 78a1a6d3411de1a8b0dc1cb92754b5f12f251912 (ARM: OMAP4: Update the GPIO support) braces were mistakenly added to included the register read-back inside the cpu_is_* checking. Remove the braces, ensuring that a register read-back is done, even when the IRQSTATUS2 register is not written. Note that the register read-back might be IRQSTATUS1 or IRQSTATUS2 depending on the CPU, but a read-back of any register in that region will cause a flush of the posted writes. Signed-off-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'drivers/gpio/gpio-omap.c')
-rw-r--r--drivers/gpio/gpio-omap.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index 01f74a8459d9..2ca814294c5e 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -700,12 +700,11 @@ static void _clear_gpio_irqbank(struct gpio_bank *bank, int gpio_mask)
700 else if (cpu_is_omap44xx()) 700 else if (cpu_is_omap44xx())
701 reg = bank->base + OMAP4_GPIO_IRQSTATUS1; 701 reg = bank->base + OMAP4_GPIO_IRQSTATUS1;
702 702
703 if (cpu_is_omap24xx() || cpu_is_omap34xx() || cpu_is_omap44xx()) { 703 if (cpu_is_omap24xx() || cpu_is_omap34xx() || cpu_is_omap44xx())
704 __raw_writel(gpio_mask, reg); 704 __raw_writel(gpio_mask, reg);
705 705
706 /* Flush posted write for the irq status to avoid spurious interrupts */ 706 /* Flush posted write for the irq status to avoid spurious interrupts */
707 __raw_readl(reg); 707 __raw_readl(reg);
708 }
709} 708}
710 709
711static inline void _clear_gpio_irqstatus(struct gpio_bank *bank, int gpio) 710static inline void _clear_gpio_irqstatus(struct gpio_bank *bank, int gpio)