diff options
author | Tom Rini <trini@konsulko.com> | 2021-10-04 11:27:55 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-10-04 11:28:16 -0400 |
commit | 50c84208ad50a27382c64af911abba4510a8b608 (patch) | |
tree | 1b79a2e167ca4094d4adc80ab1195f42e792e309 /drivers/mmc/rockchip_dw_mmc.c | |
parent | d80bb749fab53da72c4a0e09b8c2d2aaa3103c91 (diff) | |
parent | e17cbdd050f7127737988997f4a01583b34f7c96 (diff) |
Merge branch 'next'
Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'drivers/mmc/rockchip_dw_mmc.c')
-rw-r--r-- | drivers/mmc/rockchip_dw_mmc.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/mmc/rockchip_dw_mmc.c b/drivers/mmc/rockchip_dw_mmc.c index d7d5361fd50..7f8dea1e343 100644 --- a/drivers/mmc/rockchip_dw_mmc.c +++ b/drivers/mmc/rockchip_dw_mmc.c @@ -52,10 +52,12 @@ static uint rockchip_dwmmc_get_mmc_clk(struct dwmci_host *host, uint freq) static int rockchip_dwmmc_of_to_plat(struct udevice *dev) { -#if !CONFIG_IS_ENABLED(OF_PLATDATA) struct rockchip_dwmmc_priv *priv = dev_get_priv(dev); struct dwmci_host *host = &priv->host; + if (!CONFIG_IS_ENABLED(OF_REAL)) + return 0; + host->name = dev->name; host->ioaddr = dev_read_addr_ptr(dev); host->buswidth = dev_read_u32_default(dev, "bus-width", 4); @@ -95,7 +97,7 @@ static int rockchip_dwmmc_of_to_plat(struct udevice *dev) debug("%s: 'clock-freq-min-max' property was deprecated.\n", __func__); } -#endif + return 0; } @@ -121,7 +123,7 @@ static int rockchip_dwmmc_probe(struct udevice *dev) priv->minmax[0] = 400000; /* 400 kHz */ priv->minmax[1] = dtplat->max_frequency; - ret = clk_get_by_driver_info(dev, dtplat->clocks, &priv->clk); + ret = clk_get_by_phandle(dev, dtplat->clocks, &priv->clk); if (ret < 0) return ret; #else |