diff options
author | Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> | 2018-08-22 21:22:26 +0300 |
---|---|---|
committer | Ryo Kataoka <ryo.kataoka.wt@renesas.com> | 2019-03-22 20:50:19 +0900 |
commit | de7ed565e22883e71c5610c9ea651ceb1aa696a5 (patch) | |
tree | f40ec02394710f7da35279a48e540e85d8a93f5d | |
parent | 06b0b90a4d223c158cd460d430207f823c1ef8b7 (diff) | |
download | renesas-bsp-de7ed565e22883e71c5610c9ea651ceb1aa696a5.tar.gz |
mmc: renesas_sdhi_internal_dmac: mask DMAC interrupts
I have encountered an interrupt storm during the eMMC chip probing (and
the chip finally didn't get detected). It turned out that U-Boot left
the SDHI DMA interrupts enabled while the Linux driver didn't use those.
Masking those interrupts in renesas_sdhi_internal_dmac_request_dma() gets
rid of both issues...
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Fixes: 2a68ea7896e3 ("mmc: renesas-sdhi: add support for R-Car Gen3 SDHI DMAC")
Cc: stable@vger.kernel.org # v4.14+
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
(cherry picked from commit d2332f887ddfba50fee93b8e1736376517c2df0c)
[saito: adjust context.]
Signed-off-by: Takeshi Saito <takeshi.saito.xv@renesas.com>
-rw-r--r-- | drivers/mmc/host/renesas_sdhi_internal_dmac.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/mmc/host/renesas_sdhi_internal_dmac.c b/drivers/mmc/host/renesas_sdhi_internal_dmac.c index a563cead0b3bf..29da88ae257b6 100644 --- a/drivers/mmc/host/renesas_sdhi_internal_dmac.c +++ b/drivers/mmc/host/renesas_sdhi_internal_dmac.c @@ -49,11 +49,13 @@ /* DM_CM_INFO1 and DM_CM_INFO1_MASK */ #define INFO1_CLEAR 0 +#define INFO1_MASK_CLEAR GENMASK_ULL(31, 0) #define INFO1_DTRANEND1_BIT20 BIT(20) #define INFO1_DTRANEND1_BIT17 BIT(17) #define INFO1_DTRANEND0 BIT(16) /* DM_CM_INFO2 and DM_CM_INFO2_MASK */ +#define INFO2_MASK_CLEAR GENMASK_ULL(31, 0) #define INFO2_DTRANERR1 BIT(17) #define INFO2_DTRANERR0 BIT(16) @@ -266,6 +268,12 @@ renesas_sdhi_internal_dmac_request_dma(struct tmio_mmc_host *host, { struct renesas_sdhi *priv = host_to_priv(host); + /* Disable DMAC interrupts, we don't use them */ + renesas_sdhi_internal_dmac_dm_write(host, DM_CM_INFO1_MASK, + INFO1_MASK_CLEAR); + renesas_sdhi_internal_dmac_dm_write(host, DM_CM_INFO2_MASK, + INFO2_MASK_CLEAR); + /* Each value is set to non-zero to assume "enabling" each DMA */ host->chan_rx = host->chan_tx = (void *)0xdeadbeaf; |