]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
mmc: dw_mmc: Add parsing mmc_clk_phase_map support
authorShawn Lin <shawn.lin@rock-chips.com>
Mon, 9 Mar 2026 03:29:01 +0000 (11:29 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 16 Mar 2026 14:43:42 +0000 (15:43 +0100)
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>
drivers/mmc/host/dw_mmc.c
drivers/mmc/host/dw_mmc.h

index edea9f4a46cfc2c0584aa0db6d66733be17c5760..bbdd7594ef01b33809f5758d44230220de4d023f 100644 (file)
@@ -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;
index 9a27d778f362e84d5c4460ecce66c26817c25ae2..42e58be74ce090ec5b37d8864597c161e3e35db1 100644 (file)
@@ -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 */