linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dong Aisheng <b29396@freescale.com>
To: linux-mmc@vger.kernel.org
Cc: ulf.hansson@linaro.org, chris@printf.net, shawn.guo@linaro.org,
	b29396@freescale.com, linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/7] mmc: sdhci-esdhc-imx: remove duplicated lines
Date: Wed, 3 Sep 2014 20:04:57 +0800	[thread overview]
Message-ID: <1409745903-26550-2-git-send-email-b29396@freescale.com> (raw)
In-Reply-To: <1409745903-26550-1-git-send-email-b29396@freescale.com>

There is already the same register check above, no need the later one.
Move them into one place and delete the later one.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
---
 drivers/mmc/host/sdhci-esdhc-imx.c |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index 587ee0e..256c901 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -315,6 +315,11 @@ static void esdhc_writel_le(struct sdhci_host *host, u32 val, int reg)
 			data |= ESDHC_CTRL_D3CD;
 			writel(data, host->ioaddr + SDHCI_HOST_CONTROL);
 		}
+
+		if (val & SDHCI_INT_ADMA_ERROR) {
+			val &= ~SDHCI_INT_ADMA_ERROR;
+			val |= ESDHC_INT_VENDOR_SPEC_DMA_ERR;
+		}
 	}
 
 	if (unlikely((imx_data->socdata->flags & ESDHC_FLAG_MULTIBLK_NO_INT)
@@ -335,13 +340,6 @@ static void esdhc_writel_le(struct sdhci_host *host, u32 val, int reg)
 			}
 	}
 
-	if (unlikely(reg == SDHCI_INT_ENABLE || reg == SDHCI_SIGNAL_ENABLE)) {
-		if (val & SDHCI_INT_ADMA_ERROR) {
-			val &= ~SDHCI_INT_ADMA_ERROR;
-			val |= ESDHC_INT_VENDOR_SPEC_DMA_ERR;
-		}
-	}
-
 	writel(val, host->ioaddr + reg);
 }
 
-- 
1.7.8


  reply	other threads:[~2014-09-03 12:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-03 12:04 [PATCH 0/7] mmc: sdhci/imx: a few clean up and fixes Dong Aisheng
2014-09-03 12:04 ` Dong Aisheng [this message]
2014-09-03 12:04 ` [PATCH 2/7] mmc: sdhci-esdhc-imx: usdhc does not have missing card interrupt issue Dong Aisheng
2014-09-03 12:04 ` [PATCH 3/7] mmc: sdhci-esdhc-imx: add ADMA Length Mismatch errata fix Dong Aisheng
2014-09-03 12:05 ` [PATCH 4/7] mmc: sdhci: do not enable card detect interrupt for gpio cd type Dong Aisheng
2014-09-03 12:05 ` [PATCH 5/7] mmc: sdhci: do not enable card cd wakeup for gpio case Dong Aisheng
2014-09-03 12:05 ` [PATCH 6/7] mmc: sdhci-esdhc-imx: add imx6sx support Dong Aisheng
2014-09-17 22:29   ` Ulf Hansson
2014-09-18  5:35     ` Dong Aisheng
2014-09-19 17:54       ` Ulf Hansson
2014-09-03 12:05 ` [PATCH 7/7] mmc: sdhci-esdhc-imx: add quirk SDHCI_QUIRK2_BROKEN_HS200 for imx6qdl Dong Aisheng
2014-09-03 12:34 ` [PATCH 0/7] mmc: sdhci/imx: a few clean up and fixes Fabio Estevam
2014-09-03 12:19   ` Dong Aisheng
2014-09-04  5:07 ` Shawn Guo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1409745903-26550-2-git-send-email-b29396@freescale.com \
    --to=b29396@freescale.com \
    --cc=chris@printf.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=shawn.guo@linaro.org \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).