Re: [RFC PATCH] Revert "mmc: increase power up delay"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 20 April 2018 at 10:03, Shawn Lin <shawn.lin@xxxxxxxxxxxxxx> wrote:
> This reverts commit 79bccc5aefb4e64e651abe04f78c3e6bf8acd6f0.
>
> The intention for this revert is that the it's too engineering
> solution for a special board but force all platforms to wait
> for that long time, especially painful for mmc_power_up for eMMC
> when booting.

I fully agree with this reasoning.

>
> In practise, the modern hardware should have a stable power supply
> with 1ms after setting it for no matter PMIC or discrete power. But
> more importnatly, most regulators implement the callback of
> ->set_voltage_time_sel() for regulator core to wait for specific
> period of time for the power supply to be stable, which means once
> regulator_set_voltage_* return, the power should reach the the minimum
> voltage that works for initialization.
>
> It has been long time proved 2ms is enough when testing variety of
> boards. If it finally turned out some boards need more than 2ms here,
> the best we should do is to ask folks to get that period of time from
> firmware node, for instance DT, and implement ->set_voltage_time_sel()
> for the regulaor used, but not bother mmc core again.

This is true if there is an external regulator, but sometimes we use
host specific ways to power the card.

>
> Just revert it now and see if it could smokes out something interesting.

And what to when/if there are errors reported? Revert the revert? :-)

The 2ms was there in 2009, so it's not like it has recently changed to
10 ms. I am not really comfortable to change it like this.

An option is to use an opt-out method, perhaps via a new host cap?

Kind regards
Uffe

>
> Signed-off-by: Shawn Lin <shawn.lin@xxxxxxxxxxxxxx>
> ---
> Not sure if Toshiba Tecra M5 is still supported for upstream kernel
> or if there are real users now.
>
>  drivers/mmc/core/core.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
> index 121ce50..b154518 100644
> --- a/drivers/mmc/core/core.c
> +++ b/drivers/mmc/core/core.c
> @@ -1658,7 +1658,7 @@ void mmc_power_up(struct mmc_host *host, u32 ocr)
>          * This delay should be sufficient to allow the power supply
>          * to reach the minimum voltage.
>          */
> -       mmc_delay(10);
> +       mmc_delay(2);
>
>         mmc_pwrseq_post_power_on(host);
>
> @@ -1671,7 +1671,7 @@ void mmc_power_up(struct mmc_host *host, u32 ocr)
>          * This delay must be at least 74 clock sizes, or 1 ms, or the
>          * time required to reach a stable voltage.
>          */
> -       mmc_delay(10);
> +       mmc_delay(2);
>  }
>
>  void mmc_power_off(struct mmc_host *host)
> --
> 1.9.1
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux