diff options
author | Ariel D'Alessandro <ariel.dalessandro@collabora.com> | 2022-04-12 16:31:35 +0300 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2022-04-12 20:10:44 +0300 |
commit | d7db0e6df3e42a5d47bac4d3b7a9e6c13ac08ec9 (patch) | |
tree | db5cee4c187a18a913b3c72b815e810e6733faf2 /drivers/mmc/rockchip_sdhci.c | |
parent | 01c67a381c3e7dc70ad75b4d69ae3c82dff5afa8 (diff) | |
download | u-boot-d7db0e6df3e42a5d47bac4d3b7a9e6c13ac08ec9.tar.xz |
iopoll: Extend read_poll_timeout macro to support variable parameters
This macro currently supports only one parameter. Based on Linux iopoll,
let's extend read_poll_timeout common API to allow multiple variable
parameters.
Signed-off-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
Diffstat (limited to 'drivers/mmc/rockchip_sdhci.c')
-rw-r--r-- | drivers/mmc/rockchip_sdhci.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/mmc/rockchip_sdhci.c b/drivers/mmc/rockchip_sdhci.c index f3f9d83ba3..1fdc841517 100644 --- a/drivers/mmc/rockchip_sdhci.c +++ b/drivers/mmc/rockchip_sdhci.c @@ -202,8 +202,8 @@ static void rk3399_emmc_phy_power_on(struct rockchip_emmc_phy *phy, u32 clock) /* REN Enable on STRB Line for HS400 */ writel(RK_CLRSETBITS(0, 1 << 9), &phy->emmcphy_con[2]); - read_poll_timeout(readl, &phy->emmcphy_status, dllrdy, - PHYCTRL_DLL_LOCK_WO_TMOUT(dllrdy), 1, 5000); + read_poll_timeout(readl, dllrdy, PHYCTRL_DLL_LOCK_WO_TMOUT(dllrdy), 1, + 5000, &phy->emmcphy_status); } static void rk3399_emmc_phy_power_off(struct rockchip_emmc_phy *phy) @@ -328,8 +328,9 @@ static int rk3568_sdhci_emmc_set_clock(struct sdhci_host *host, unsigned int clo DWCMSHC_EMMC_DLL_START; sdhci_writel(host, extra, DWCMSHC_EMMC_DLL_CTRL); - ret = read_poll_timeout(readl, host->ioaddr + DWCMSHC_EMMC_DLL_STATUS0, - val, DLL_LOCK_WO_TMOUT(val), 1, 500); + ret = read_poll_timeout(readl, val, DLL_LOCK_WO_TMOUT(val), 1, + 500, + host->ioaddr + DWCMSHC_EMMC_DLL_STATUS0); if (ret) return ret; |