* [PATCH RFT] mmc: tmio: use usleep_range consistently
@ 2017-11-14 22:51 Wolfram Sang
2017-11-27 9:57 ` Ulf Hansson
0 siblings, 1 reply; 2+ messages in thread
From: Wolfram Sang @ 2017-11-14 22:51 UTC (permalink / raw)
To: linux-mmc
Cc: linux-renesas-soc, Simon Horman, Yoshihiro Shimoda, Wolfram Sang
There are a few udelay() left which are in a range that they should be
usleep_range() these days.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
Works fine for me on Lager (R-Car H2) and Salvator-X (R-Car M3-W).
Testing on other platforms very welcome even though this should be
independent of the IP core.
drivers/mmc/host/tmio_mmc_core.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/mmc/host/tmio_mmc_core.c b/drivers/mmc/host/tmio_mmc_core.c
index 583bf3262df5d4..d6ca57be16c2fd 100644
--- a/drivers/mmc/host/tmio_mmc_core.c
+++ b/drivers/mmc/host/tmio_mmc_core.c
@@ -806,7 +806,7 @@ static int tmio_mmc_execute_tuning(struct mmc_host *mmc, u32 opcode)
if (ret == 0)
set_bit(i, host->taps);
- mdelay(1);
+ usleep_range(1000, 1200);
}
ret = host->select_tuning(host);
@@ -958,7 +958,7 @@ static void tmio_mmc_power_on(struct tmio_mmc_host *host, unsigned short vdd)
* 100us were not enough. Is this the same 140us delay, as in
* tmio_mmc_set_ios()?
*/
- udelay(200);
+ usleep_range(200, 300);
}
/*
* It seems, VccQ should be switched on after Vcc, this is also what the
@@ -966,7 +966,7 @@ static void tmio_mmc_power_on(struct tmio_mmc_host *host, unsigned short vdd)
*/
if (!IS_ERR(mmc->supply.vqmmc) && !ret) {
ret = regulator_enable(mmc->supply.vqmmc);
- udelay(200);
+ usleep_range(200, 300);
}
if (ret < 0)
@@ -1059,7 +1059,7 @@ static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
}
/* Let things settle. delay taken from winCE driver */
- udelay(140);
+ usleep_range(140, 200);
if (PTR_ERR(host->mrq) == -EINTR)
dev_dbg(&host->pdev->dev,
"%s.%d: IOS interrupted: clk %u, mode %u",
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH RFT] mmc: tmio: use usleep_range consistently
2017-11-14 22:51 [PATCH RFT] mmc: tmio: use usleep_range consistently Wolfram Sang
@ 2017-11-27 9:57 ` Ulf Hansson
0 siblings, 0 replies; 2+ messages in thread
From: Ulf Hansson @ 2017-11-27 9:57 UTC (permalink / raw)
To: Wolfram Sang; +Cc: linux-mmc, Linux-Renesas, Simon Horman, Yoshihiro Shimoda
On 14 November 2017 at 23:51, Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> There are a few udelay() left which are in a range that they should be
> usleep_range() these days.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Thanks, applied for next!
Kind regards
Uffe
> ---
>
> Works fine for me on Lager (R-Car H2) and Salvator-X (R-Car M3-W).
> Testing on other platforms very welcome even though this should be
> independent of the IP core.
>
> drivers/mmc/host/tmio_mmc_core.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/mmc/host/tmio_mmc_core.c b/drivers/mmc/host/tmio_mmc_core.c
> index 583bf3262df5d4..d6ca57be16c2fd 100644
> --- a/drivers/mmc/host/tmio_mmc_core.c
> +++ b/drivers/mmc/host/tmio_mmc_core.c
> @@ -806,7 +806,7 @@ static int tmio_mmc_execute_tuning(struct mmc_host *mmc, u32 opcode)
> if (ret == 0)
> set_bit(i, host->taps);
>
> - mdelay(1);
> + usleep_range(1000, 1200);
> }
>
> ret = host->select_tuning(host);
> @@ -958,7 +958,7 @@ static void tmio_mmc_power_on(struct tmio_mmc_host *host, unsigned short vdd)
> * 100us were not enough. Is this the same 140us delay, as in
> * tmio_mmc_set_ios()?
> */
> - udelay(200);
> + usleep_range(200, 300);
> }
> /*
> * It seems, VccQ should be switched on after Vcc, this is also what the
> @@ -966,7 +966,7 @@ static void tmio_mmc_power_on(struct tmio_mmc_host *host, unsigned short vdd)
> */
> if (!IS_ERR(mmc->supply.vqmmc) && !ret) {
> ret = regulator_enable(mmc->supply.vqmmc);
> - udelay(200);
> + usleep_range(200, 300);
> }
>
> if (ret < 0)
> @@ -1059,7 +1059,7 @@ static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
> }
>
> /* Let things settle. delay taken from winCE driver */
> - udelay(140);
> + usleep_range(140, 200);
> if (PTR_ERR(host->mrq) == -EINTR)
> dev_dbg(&host->pdev->dev,
> "%s.%d: IOS interrupted: clk %u, mode %u",
> --
> 2.11.0
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-11-27 9:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-14 22:51 [PATCH RFT] mmc: tmio: use usleep_range consistently Wolfram Sang
2017-11-27 9:57 ` Ulf Hansson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.