2020-02-26 08:42:04

by Ludovic Barre

[permalink] [raw]
Subject: [PATCH 0/4] mmc: mmci_sdmmc: fixes and improvements

This patch series fixes some problems:
-dma api debug warning to segment size check.
-dma_unmap_sg missing on not prepared request.
-Clear busyd0end irq flag when a R1B busy is completed.
-Initialize pwr|clk|datactrl_reg with their hardware values at probe.

Ludovic Barre (4):
mmc: mmci_sdmmc: fix DMA API warning max segment size
mmc: mmci_sdmmc: fix DMA API warning overlapping mappings
mmc: mmci_sdmmc: fix clear busyd0end irq flag
mmc: mmci: initialize pwr|clk|datactrl_reg with their hardware values

drivers/mmc/host/mmci.c | 4 ++++
drivers/mmc/host/mmci_stm32_sdmmc.c | 21 +++++++++++++--------
2 files changed, 17 insertions(+), 8 deletions(-)

--
2.17.1


2020-02-26 08:42:19

by Ludovic Barre

[permalink] [raw]
Subject: [PATCH 3/4] mmc: mmci_sdmmc: fix clear busyd0end irq flag

The busyd0 line transition can be very fast. The busy request
may be completed by busy_d0end without wait the busy_d0 steps.
The busyd0end irq flag must be cleared even if no busy_status.

Signed-off-by: Ludovic Barre <[email protected]>
---
drivers/mmc/host/mmci_stm32_sdmmc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/host/mmci_stm32_sdmmc.c b/drivers/mmc/host/mmci_stm32_sdmmc.c
index 7b781c897346..82b88293e742 100644
--- a/drivers/mmc/host/mmci_stm32_sdmmc.c
+++ b/drivers/mmc/host/mmci_stm32_sdmmc.c
@@ -363,11 +363,11 @@ static bool sdmmc_busy_complete(struct mmci_host *host, u32 status, u32 err_msk)
if (host->busy_status) {
writel_relaxed(mask & ~host->variant->busy_detect_mask,
base + MMCIMASK0);
- writel_relaxed(host->variant->busy_detect_mask,
- base + MMCICLEAR);
host->busy_status = 0;
}

+ writel_relaxed(host->variant->busy_detect_mask, base + MMCICLEAR);
+
return true;
}

--
2.17.1