Skip to content

Commit

Permalink
gpio/omap: _clear_gpio_irqbank: fix flushing of posted write
Browse files Browse the repository at this point in the history
In commit 78a1a6d (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>
  • Loading branch information
Kevin Hilman committed Jun 16, 2011
1 parent 2c53b43 commit df3c851
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/gpio/gpio-omap.c
Original file line number Diff line number Diff line change
Expand Up @@ -700,12 +700,11 @@ static void _clear_gpio_irqbank(struct gpio_bank *bank, int gpio_mask)
else if (cpu_is_omap44xx())
reg = bank->base + OMAP4_GPIO_IRQSTATUS1;

if (cpu_is_omap24xx() || cpu_is_omap34xx() || cpu_is_omap44xx()) {
if (cpu_is_omap24xx() || cpu_is_omap34xx() || cpu_is_omap44xx())
__raw_writel(gpio_mask, reg);

/* Flush posted write for the irq status to avoid spurious interrupts */
__raw_readl(reg);
}
}

static inline void _clear_gpio_irqstatus(struct gpio_bank *bank, int gpio)
Expand Down

0 comments on commit df3c851

Please sign in to comment.