From patchwork Fri May 20 15:14:44 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hilman X-Patchwork-Id: 803922 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p4KFFEgQ009507 for ; Fri, 20 May 2011 15:15:14 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933500Ab1ETPPM (ORCPT ); Fri, 20 May 2011 11:15:12 -0400 Received: from na3sys009aog104.obsmtp.com ([74.125.149.73]:34787 "EHLO na3sys009aog104.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933413Ab1ETPPL (ORCPT ); Fri, 20 May 2011 11:15:11 -0400 Received: from mail-ww0-f46.google.com ([74.125.82.46]) (using TLSv1) by na3sys009aob104.postini.com ([74.125.148.12]) with SMTP ID DSNKTdaFe8vWRqIdlLan0pIYzvuASeg9b8TX@postini.com; Fri, 20 May 2011 08:15:10 PDT Received: by mail-ww0-f46.google.com with SMTP id 28so3109864wwb.27 for ; Fri, 20 May 2011 08:15:04 -0700 (PDT) Received: by 10.227.128.141 with SMTP id k13mr4439918wbs.81.1305904504418; Fri, 20 May 2011 08:15:04 -0700 (PDT) Received: from localhost ([192.91.60.233]) by mx.google.com with ESMTPS id s20sm2353154wbh.23.2011.05.20.08.15.02 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 20 May 2011 08:15:03 -0700 (PDT) From: Kevin Hilman To: linux-omap@vger.kernel.org, Grant Likely , Linus Walleij Cc: linux-arm-kernel@lists.infradead.org Subject: [PATCH 01/14] GPIO: OMAP: _clear_gpio_irqbank: fix flushing of posted write Date: Fri, 20 May 2011 17:14:44 +0200 Message-Id: <1305904497-26013-2-git-send-email-khilman@ti.com> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: <1305904497-26013-1-git-send-email-khilman@ti.com> References: <1305904497-26013-1-git-send-email-khilman@ti.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Fri, 20 May 2011 15:15:14 +0000 (UTC) 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 --- drivers/gpio/gpio_omap.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/gpio/gpio_omap.c b/drivers/gpio/gpio_omap.c index 5d55886..b414644 100644 --- a/drivers/gpio/gpio_omap.c +++ b/drivers/gpio/gpio_omap.c @@ -708,12 +708,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)