From: Sumit Garg <sumit.garg@kernel.org>
To: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
Cc: casey.connolly@linaro.org, neil.armstrong@linaro.org,
peng.fan@nxp.com, jh80.chung@samsung.com, trini@konsulko.com,
loic.poulain@oss.qualcomm.com, patrice.chotard@foss.st.com,
u-boot-qcom@groups.io, u-boot@lists.denx.de
Subject: Re: [PATCH] mmc: msm_sdhci: Use max-frequency to get clock rate
Date: Mon, 13 Apr 2026 17:27:44 +0530 [thread overview]
Message-ID: <adzaOC0mgP5vfZUr@sumit-xelite> (raw)
In-Reply-To: <20260409070620.3655875-1-varadarajan.narayanan@oss.qualcomm.com>
On Thu, Apr 09, 2026 at 12:36:20PM +0530, Varadarajan Narayanan wrote:
> msm_sdc_clk_init() uses clock-frequency to get the clock rate for SDC
> clocks. However, the DT files seem to use max-frequency for the same.
> Since msm_sdc_clk_init() doesn't find clock-frequency in the DT, it sets
> 201500000 as the clock rate and this results in timeout errors on IPQ
> platforms. Hence, try to get max-frequency if clock-frequency is not
> present.
>
> Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
> ---
> drivers/mmc/msm_sdhci.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/msm_sdhci.c b/drivers/mmc/msm_sdhci.c
> index 66f3cf2de4f..2e6120f18ff 100644
> --- a/drivers/mmc/msm_sdhci.c
> +++ b/drivers/mmc/msm_sdhci.c
> @@ -71,8 +71,8 @@ static int msm_sdc_clk_init(struct udevice *dev)
>
> var_info = (void *)dev_get_driver_data(dev);
>
> - ret = ofnode_read_u32(node, "clock-frequency", (uint *)(&clk_rate));
> - if (ret)
> + if (ofnode_read_u32(node, "clock-frequency", (uint *)(&clk_rate)) &&
> + ofnode_read_u32(node, "max-frequency", (uint *)(&clk_rate)))
> clk_rate = 201500000;
Looks like clock-frequency is just a leftover from legacy DT nodes. Now
on Qcom platforms, upstream DT is used. So let's just add max-frequency
check compliant with DT bindings and drop check for clock-frequency.
-Sumit
>
> ret = clk_get_bulk(dev, &prv->clks);
> --
> 2.34.1
>
prev parent reply other threads:[~2026-04-13 11:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-09 7:06 [PATCH] mmc: msm_sdhci: Use max-frequency to get clock rate Varadarajan Narayanan
2026-04-13 11:57 ` Sumit Garg [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=adzaOC0mgP5vfZUr@sumit-xelite \
--to=sumit.garg@kernel.org \
--cc=casey.connolly@linaro.org \
--cc=jh80.chung@samsung.com \
--cc=loic.poulain@oss.qualcomm.com \
--cc=neil.armstrong@linaro.org \
--cc=patrice.chotard@foss.st.com \
--cc=peng.fan@nxp.com \
--cc=trini@konsulko.com \
--cc=u-boot-qcom@groups.io \
--cc=u-boot@lists.denx.de \
--cc=varadarajan.narayanan@oss.qualcomm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox