From patchwork Fri Aug 17 18:52:27 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Venkatraman S X-Patchwork-Id: 1339431 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 14AEADF280 for ; Fri, 17 Aug 2012 18:54:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932475Ab2HQSx7 (ORCPT ); Fri, 17 Aug 2012 14:53:59 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:55057 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932379Ab2HQSx6 (ORCPT ); Fri, 17 Aug 2012 14:53:58 -0400 Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id q7HIrvct028101; Fri, 17 Aug 2012 13:53:57 -0500 Received: from DLEE74.ent.ti.com (dlee74.ent.ti.com [157.170.170.8]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id q7HIrvUC023172; Fri, 17 Aug 2012 13:53:57 -0500 Received: from dlelxv23.itg.ti.com (172.17.1.198) by DLEE74.ent.ti.com (157.170.170.8) with Microsoft SMTP Server id 14.1.323.3; Fri, 17 Aug 2012 13:53:56 -0500 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dlelxv23.itg.ti.com (8.13.8/8.13.8) with ESMTP id q7HIrvH0017067; Fri, 17 Aug 2012 13:53:57 -0500 Received: from localhost (h83-3.vpn.ti.com [172.24.83.3]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id q7HIrsr11064; Fri, 17 Aug 2012 13:53:54 -0500 (CDT) From: Venkatraman S To: , CC: , , , Venkatraman S Subject: [PATCH 07/10] mmc: omap_hsmmc: consolidate flush posted writes for HSMMC IRQs Date: Sat, 18 Aug 2012 00:22:27 +0530 Message-ID: <1345229550-8672-8-git-send-email-svenkatr@ti.com> X-Mailer: git-send-email 1.7.11.1.25.g0e18bef In-Reply-To: <1345229550-8672-1-git-send-email-svenkatr@ti.com> References: <1345229550-8672-1-git-send-email-svenkatr@ti.com> MIME-Version: 1.0 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org Flushing spurious IRQs from HSMMC IP is done twice in omap_hsmmc_irq and omap_hsmmc_do_irq. Consolidate them to one location. Signed-off-by: Venkatraman S --- drivers/mmc/host/omap_hsmmc.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 4bc55ac..20453c8 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -969,15 +969,6 @@ static void omap_hsmmc_do_irq(struct omap_hsmmc_host *host, int status) struct mmc_data *data; int end_cmd = 0, end_trans = 0; - if (!host->req_in_progress) { - do { - OMAP_HSMMC_WRITE(host->base, STAT, status); - /* Flush posted write */ - status = OMAP_HSMMC_READ(host->base, STAT); - } while (status & INT_EN_MASK); - return; - } - data = host->data; dev_vdbg(mmc_dev(host->mmc), "IRQ Status is %x\n", status); @@ -1028,8 +1019,6 @@ static void omap_hsmmc_do_irq(struct omap_hsmmc_host *host, int status) } } - OMAP_HSMMC_WRITE(host->base, STAT, status); - if (end_cmd || ((status & CC) && host->cmd)) omap_hsmmc_cmd_done(host, host->cmd); if ((end_trans || (status & TC)) && host->mrq) @@ -1045,11 +1034,13 @@ static irqreturn_t omap_hsmmc_irq(int irq, void *dev_id) int status; status = OMAP_HSMMC_READ(host->base, STAT); - do { + while (status & INT_EN_MASK && host->req_in_progress) { omap_hsmmc_do_irq(host, status); + /* Flush posted write */ + OMAP_HSMMC_WRITE(host->base, STAT, status); status = OMAP_HSMMC_READ(host->base, STAT); - } while (status & INT_EN_MASK); + } return IRQ_HANDLED; }