diff options
author | Dong Aisheng <aisheng.dong@freescale.com> | 2015-05-27 06:13:26 -0400 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2015-06-01 03:07:15 -0400 |
commit | 915be485bdf24f2261b4dc776625c930e1491d7a (patch) | |
tree | b924f8c1585a9d0f85f8bcb22e494e92fd3e2303 | |
parent | b69587e2d5b09a192c45c604ea1f9e8d51f4c3a1 (diff) |
mmc: sdhci-esdhc-imx: merge the same register check into one place
In esdhc_writel_le() function, there's duplicated checking of the same
register as follows:
"if (unlikely(reg == SDHCI_INT_ENABLE || reg == SDHCI_SIGNAL_ENABLE))".
Merge them into one and remove the duplicated one.
Signed-off-by: Dong Aisheng <aisheng.dong@freescale.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-rw-r--r-- | 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 ef290a5b34c4..0c89293ed853 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c | |||
@@ -313,6 +313,11 @@ static void esdhc_writel_le(struct sdhci_host *host, u32 val, int reg) | |||
313 | data |= ESDHC_CTRL_D3CD; | 313 | data |= ESDHC_CTRL_D3CD; |
314 | writel(data, host->ioaddr + SDHCI_HOST_CONTROL); | 314 | writel(data, host->ioaddr + SDHCI_HOST_CONTROL); |
315 | } | 315 | } |
316 | |||
317 | if (val & SDHCI_INT_ADMA_ERROR) { | ||
318 | val &= ~SDHCI_INT_ADMA_ERROR; | ||
319 | val |= ESDHC_INT_VENDOR_SPEC_DMA_ERR; | ||
320 | } | ||
316 | } | 321 | } |
317 | 322 | ||
318 | if (unlikely((imx_data->socdata->flags & ESDHC_FLAG_MULTIBLK_NO_INT) | 323 | if (unlikely((imx_data->socdata->flags & ESDHC_FLAG_MULTIBLK_NO_INT) |
@@ -333,13 +338,6 @@ static void esdhc_writel_le(struct sdhci_host *host, u32 val, int reg) | |||
333 | } | 338 | } |
334 | } | 339 | } |
335 | 340 | ||
336 | if (unlikely(reg == SDHCI_INT_ENABLE || reg == SDHCI_SIGNAL_ENABLE)) { | ||
337 | if (val & SDHCI_INT_ADMA_ERROR) { | ||
338 | val &= ~SDHCI_INT_ADMA_ERROR; | ||
339 | val |= ESDHC_INT_VENDOR_SPEC_DMA_ERR; | ||
340 | } | ||
341 | } | ||
342 | |||
343 | writel(val, host->ioaddr + reg); | 341 | writel(val, host->ioaddr + reg); |
344 | } | 342 | } |
345 | 343 | ||