[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPDyKFpzuds6Ttbhw1cqZwisa+M6167DT3DUihcDqFjYJX95eA@mail.gmail.com>
Date: Tue, 3 Oct 2023 11:58:17 +0200
From: Ulf Hansson <ulf.hansson@...aro.org>
To: Victor Shih <victorshihgli@...il.com>
Cc: adrian.hunter@...el.com, linux-mmc@...r.kernel.org,
linux-kernel@...r.kernel.org, benchuanggli@...il.com,
HL.Liu@...esyslogic.com.tw, Greg.tu@...esyslogic.com.tw,
takahiro.akashi@...aro.org, dlunev@...omium.org,
Ben Chuang <ben.chuang@...esyslogic.com.tw>,
Victor Shih <victor.shih@...esyslogic.com.tw>
Subject: Re: [PATCH V12 12/23] mmc: sdhci-uhs2: skip signal_voltage_switch()
On Fri, 15 Sept 2023 at 11:44, Victor Shih <victorshihgli@...il.com> wrote:
>
> From: Victor Shih <victor.shih@...esyslogic.com.tw>
>
> For UHS2, the signal voltage is supplied by vdd2 which is already 1.8v,
> so no voltage switch required.
Can you please elaborate on this? I don't get anything of the above, sorry.
>
> Signed-off-by: Ben Chuang <ben.chuang@...esyslogic.com.tw>
> Signed-off-by: AKASHI Takahiro <takahiro.akashi@...aro.org>
> Signed-off-by: Victor Shih <victor.shih@...esyslogic.com.tw>
> Acked-by: Adrian Hunter <adrian.hunter@...el.com>
> ---
>
> Updates in V5:
> - Use sdhci_uhs2_mode() to simplify code in
> sdhci_uhs2_start_signal_voltage_switch().
>
> ---
>
> drivers/mmc/host/sdhci-uhs2.c | 24 ++++++++++++++++++++++++
> 1 file changed, 24 insertions(+)
>
> diff --git a/drivers/mmc/host/sdhci-uhs2.c b/drivers/mmc/host/sdhci-uhs2.c
> index fc37a34629c2..92fb69b7e209 100644
> --- a/drivers/mmc/host/sdhci-uhs2.c
> +++ b/drivers/mmc/host/sdhci-uhs2.c
> @@ -142,6 +142,27 @@ static void sdhci_uhs2_set_power(struct sdhci_host *host, unsigned char mode, un
> }
> }
>
> +/*****************************************************************************\
> + * *
> + * MMC callbacks *
> + * *
> +\*****************************************************************************/
> +
> +static int sdhci_uhs2_start_signal_voltage_switch(struct mmc_host *mmc,
> + struct mmc_ios *ios)
> +{
> + struct sdhci_host *host = mmc_priv(mmc);
> +
> + /*
> + * For UHS2, the signal voltage is supplied by vdd2 which is
> + * already 1.8v so no voltage switch required.
> + */
> + if (sdhci_uhs2_mode(host))
> + return 0;
This is just wrong. If we are initializing a uhs2 card, we certainly
should call ->start_signal_voltage_switch() callback at all. This is
for UHS-I cards, right?
> +
> + return sdhci_start_signal_voltage_switch(mmc, ios);
> +}
> +
> /*****************************************************************************\
> * *
> * Driver init/exit *
> @@ -150,6 +171,9 @@ static void sdhci_uhs2_set_power(struct sdhci_host *host, unsigned char mode, un
>
> static int sdhci_uhs2_host_ops_init(struct sdhci_host *host)
> {
> + host->mmc_host_ops.start_signal_voltage_switch =
> + sdhci_uhs2_start_signal_voltage_switch;
> +
> return 0;
> }
>
Kind regards
Uffe
Powered by blists - more mailing lists