Skip to content

Commit d2332f8

Browse files
Sergei Shtylyovstorulf
authored andcommitted
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: 2a68ea7 ("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>
1 parent 9faf870 commit d2332f8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

drivers/mmc/host/renesas_sdhi_internal_dmac.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,12 @@
4949

5050
/* DM_CM_INFO1 and DM_CM_INFO1_MASK */
5151
#define INFO1_CLEAR 0
52+
#define INFO1_MASK_CLEAR GENMASK_ULL(31, 0)
5253
#define INFO1_DTRANEND1 BIT(17)
5354
#define INFO1_DTRANEND0 BIT(16)
5455

5556
/* DM_CM_INFO2 and DM_CM_INFO2_MASK */
57+
#define INFO2_MASK_CLEAR GENMASK_ULL(31, 0)
5658
#define INFO2_DTRANERR1 BIT(17)
5759
#define INFO2_DTRANERR0 BIT(16)
5860

@@ -252,6 +254,12 @@ renesas_sdhi_internal_dmac_request_dma(struct tmio_mmc_host *host,
252254
{
253255
struct renesas_sdhi *priv = host_to_priv(host);
254256

257+
/* Disable DMAC interrupts, we don't use them */
258+
renesas_sdhi_internal_dmac_dm_write(host, DM_CM_INFO1_MASK,
259+
INFO1_MASK_CLEAR);
260+
renesas_sdhi_internal_dmac_dm_write(host, DM_CM_INFO2_MASK,
261+
INFO2_MASK_CLEAR);
262+
255263
/* Each value is set to non-zero to assume "enabling" each DMA */
256264
host->chan_rx = host->chan_tx = (void *)0xdeadbeaf;
257265

0 commit comments

Comments
 (0)