Skip to content

Commit

Permalink
mmc: tmio: when resetting, reset DMA controller, too
Browse files Browse the repository at this point in the history
When applying a revert, the assumption that DMA only needs to be cleared
in specific cases was wrong. We want to reset the DMA controller every
time the rest of the HW gets reset, too.

Fixes: 34e3211 ("Revert "mmc: tmio: fix reset operation"")
Reported-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Tested-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Link: https://lore.kernel.org/r/20201106072549.1495-2-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
  • Loading branch information
Wolfram Sang authored and Ulf Hansson committed Nov 10, 2020
1 parent 71b0532 commit 1023e29
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/mmc/host/tmio_mmc_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ static void tmio_mmc_reset(struct tmio_mmc_host *host)
if (host->reset)
host->reset(host);

tmio_mmc_abort_dma(host);

if (host->pdata->flags & TMIO_MMC_SDIO_IRQ) {
sd_ctrl_write16(host, CTL_SDIO_IRQ_MASK, host->sdio_irq_mask);
sd_ctrl_write16(host, CTL_TRANSACTION_CTL, 0x0001);
Expand Down Expand Up @@ -223,8 +225,6 @@ static void tmio_mmc_reset_work(struct work_struct *work)

/* Ready for new calls */
host->mrq = NULL;

tmio_mmc_abort_dma(host);
mmc_request_done(host->mmc, mrq);
}

Expand Down

0 comments on commit 1023e29

Please sign in to comment.