From: WeiHao Li <cn.liweihao@gmail.com>
To: u-boot@lists.denx.de
Cc: trini@konsulko.com, sjg@chromium.org, philipp.tomsich@vrull.eu,
kever.yang@rock-chips.com, lukma@denx.de, seanga2@gmail.com,
ag.dev.uboot@gmail.com, muratdemirtaseu@outlook.com,
WeiHao Li <cn.liweihao@gmail.com>
Subject: [PATCH 2/5] clk: rockchip: rk3368: add SCLK for mmc clock get/set
Date: Thu, 14 Aug 2025 21:12:34 +0800 [thread overview]
Message-ID: <20250814131237.8135-3-cn.liweihao@gmail.com> (raw)
In-Reply-To: <20250814131237.8135-1-cn.liweihao@gmail.com>
Because of dwmmc driver get clk form a fixed index 1, so must add
SCLK_SDMMC and SCLK_EMMC support to make emmc work.
Signed-off-by: WeiHao Li <cn.liweihao@gmail.com>
---
drivers/clk/rockchip/clk_rk3368.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/clk/rockchip/clk_rk3368.c b/drivers/clk/rockchip/clk_rk3368.c
index 994330162..f9936fb40 100644
--- a/drivers/clk/rockchip/clk_rk3368.c
+++ b/drivers/clk/rockchip/clk_rk3368.c
@@ -165,9 +165,11 @@ static ulong rk3368_mmc_get_clk(struct rk3368_cru *cru, uint clk_id)
switch (clk_id) {
case HCLK_SDMMC:
+ case SCLK_SDMMC:
con_id = 50;
break;
case HCLK_EMMC:
+ case SCLK_EMMC:
con_id = 51;
break;
case SCLK_SDIO0:
@@ -262,9 +264,11 @@ static ulong rk3368_mmc_set_clk(struct clk *clk, ulong rate)
switch (clk_id) {
case HCLK_SDMMC:
+ case SCLK_SDMMC:
con_id = 50;
break;
case HCLK_EMMC:
+ case SCLK_EMMC:
con_id = 51;
break;
case SCLK_SDIO0:
@@ -559,6 +563,8 @@ static ulong rk3368_clk_get_rate(struct clk *clk)
#if !IS_ENABLED(CONFIG_XPL_BUILD) || CONFIG_IS_ENABLED(MMC)
case HCLK_SDMMC:
case HCLK_EMMC:
+ case SCLK_SDMMC:
+ case SCLK_EMMC:
rate = rk3368_mmc_get_clk(priv->cru, clk->id);
break;
#endif
@@ -597,6 +603,8 @@ static ulong rk3368_clk_set_rate(struct clk *clk, ulong rate)
#if !IS_ENABLED(CONFIG_XPL_BUILD) || CONFIG_IS_ENABLED(MMC)
case HCLK_SDMMC:
case HCLK_EMMC:
+ case SCLK_SDMMC:
+ case SCLK_EMMC:
ret = rk3368_mmc_set_clk(clk, rate);
break;
#endif
--
2.39.5
next prev parent reply other threads:[~2025-08-14 13:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-14 13:12 [PATCH 0/5] Rockchip RK3368 drivers improve WeiHao Li
2025-08-14 13:12 ` [PATCH 1/5] clk: rockchip: rk3368: Add bus clk get/set WeiHao Li
2025-11-02 0:50 ` Kever Yang
2025-08-14 13:12 ` WeiHao Li [this message]
2025-11-02 0:50 ` [PATCH 2/5] clk: rockchip: rk3368: add SCLK for mmc clock get/set Kever Yang
2025-08-14 13:12 ` [PATCH 3/5] clk: rockchip: rk3368: Add VOP " WeiHao Li
2025-11-02 0:51 ` Kever Yang
2025-08-14 13:12 ` [PATCH 4/5] video: rockchip: Add bridge support for VOP WeiHao Li
2025-11-03 3:27 ` Chaoyi Chen
2025-08-14 13:12 ` [PATCH 5/5] video: rockchip: add RK3368 VOP support WeiHao Li
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=20250814131237.8135-3-cn.liweihao@gmail.com \
--to=cn.liweihao@gmail.com \
--cc=ag.dev.uboot@gmail.com \
--cc=kever.yang@rock-chips.com \
--cc=lukma@denx.de \
--cc=muratdemirtaseu@outlook.com \
--cc=philipp.tomsich@vrull.eu \
--cc=seanga2@gmail.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