summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShawn Lin <shawn.lin@rock-chips.com>2026-03-09 11:29:01 +0800
committerUlf Hansson <ulf.hansson@linaro.org>2026-03-16 15:43:42 +0100
commit0d944576c99ebaacadb07ceb7e34bfbcc67a32d6 (patch)
treed90152b07379530392a662f33ece09fbbd637d85
parent9652a49a17bf6d5978259318bc8c7bb91f3fb6c9 (diff)
downloadlinux-next-0d944576c99ebaacadb07ceb7e34bfbcc67a32d6.tar.gz
linux-next-0d944576c99ebaacadb07ceb7e34bfbcc67a32d6.zip
mmc: dw_mmc: Add parsing mmc_clk_phase_map support
The dw_mmc library already assists in invoking mmc_of_parse() to provide unified parsing for variant drivers. We can also call mmc_of_parse_clk_phase() to help variant drivers achieve unified parsing. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-rw-r--r--drivers/mmc/host/dw_mmc.c2
-rw-r--r--drivers/mmc/host/dw_mmc.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index edea9f4a46cf..bbdd7594ef01 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -2866,6 +2866,8 @@ static int dw_mci_init_host(struct dw_mci *host)
if (ret)
return ret;
+ mmc_of_parse_clk_phase(host->dev, &host->phase_map);
+
ret = dw_mci_init_host_caps(host);
if (ret)
return ret;
diff --git a/drivers/mmc/host/dw_mmc.h b/drivers/mmc/host/dw_mmc.h
index 9a27d778f362..42e58be74ce0 100644
--- a/drivers/mmc/host/dw_mmc.h
+++ b/drivers/mmc/host/dw_mmc.h
@@ -130,6 +130,7 @@ struct dw_mci_dma_slave {
* @pdev: platform_device registered
* @rstc: Reset controller for this host.
* @detect_delay_ms: Delay in mS before detecting cards after interrupt.
+ * @phase_map: The map for recording in and out phases for each timing
*
* Locking
* =======
@@ -250,6 +251,7 @@ struct dw_mci {
struct platform_device *pdev;
struct reset_control *rstc;
u32 detect_delay_ms;
+ struct mmc_clk_phase_map phase_map;
};
/* DMA ops for Internal/External DMAC interface */