From: "Jaehoon Chung" <jh80.chung@samsung.com>
To: <curtis.machida@intel.com>, <u-boot@lists.denx.de>,
"'Peng Fan'" <peng.fan@nxp.com>
Cc: "'Jonas Karlman'" <jonas@kwiboo.se>,
"'Kever Yang'" <kever.yang@rock-chips.com>,
"'Peter Geis'" <pgwipeout@gmail.com>,
"'Sean Anderson'" <sean.anderson@seco.com>,
"'Simon Glass'" <sjg@chromium.org>,
"'Tom Rini'" <trini@konsulko.com>
Subject: RE: [PATCH] mmc: sdhci: programmable clock calculation needs multiplier +1
Date: Mon, 15 Apr 2024 18:59:30 +0900 [thread overview]
Message-ID: <007101da8f1b$9be4c100$d3ae4300$@samsung.com> (raw)
In-Reply-To: <20240412192641.2912914-1-curtis.machida@intel.com>
> -----Original Message-----
> From: curtis.machida@intel.com <curtis.machida@intel.com>
> Sent: Saturday, April 13, 2024 4:27 AM
> To: u-boot@lists.denx.de; Peng Fan <peng.fan@nxp.com>; Jaehoon Chung <jh80.chung@samsung.com>
> Cc: cmachida <curtis.machida@intel.com>; Jonas Karlman <jonas@kwiboo.se>; Kever Yang <kever.yang@rock-
> chips.com>; Peter Geis <pgwipeout@gmail.com>; Sean Anderson <sean.anderson@seco.com>; Simon Glass
> <sjg@chromium.org>; Tom Rini <trini@konsulko.com>
> Subject: [PATCH] mmc: sdhci: programmable clock calculation needs multiplier +1
>
> From: cmachida <curtis.machida@intel.com>
>
> According to the SD Host Controller Simplified Specification v4.20,
> the multiplier value M is one more than the Clock Multiplier field.
>
> Copied code from Linux project. drivers/mmc/host/sdhci.c line 4405
>
> Signed-off-by: cmachida <curtis.machida@intel.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Best Regards,
Jaehoon Chung
> ---
>
> drivers/mmc/sdhci.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
> index 0178ed8a11..a8476ec4e9 100644
> --- a/drivers/mmc/sdhci.c
> +++ b/drivers/mmc/sdhci.c
> @@ -929,6 +929,15 @@ int sdhci_setup_cfg(struct mmc_config *cfg, struct sdhci_host *host,
> debug("%s, caps_1: 0x%x\n", __func__, caps_1);
> host->clk_mul = (caps_1 & SDHCI_CLOCK_MUL_MASK) >>
> SDHCI_CLOCK_MUL_SHIFT;
> +
> + /*
> + * In case the value in Clock Multiplier is 0, then programmable
> + * clock mode is not supported, otherwise the actual clock
> + * multiplier is one more than the value of Clock Multiplier
> + * in the Capabilities Register.
> + */
> + if (host->clk_mul)
> + host->clk_mul += 1;
> }
>
> if (host->max_clk == 0) {
> --
> 2.43.2
next prev parent reply other threads:[~2024-04-15 9:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20240412192703epcas1p3b18cb3376111bfb7ad1c92d1565aa2d7@epcas1p3.samsung.com>
2024-04-12 19:26 ` [PATCH] mmc: sdhci: programmable clock calculation needs multiplier +1 curtis.machida
2024-04-15 9:59 ` Jaehoon Chung [this message]
2024-04-15 14:47 ` Sean Anderson
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='007101da8f1b$9be4c100$d3ae4300$@samsung.com' \
--to=jh80.chung@samsung.com \
--cc=curtis.machida@intel.com \
--cc=jonas@kwiboo.se \
--cc=kever.yang@rock-chips.com \
--cc=peng.fan@nxp.com \
--cc=pgwipeout@gmail.com \
--cc=sean.anderson@seco.com \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
/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