mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Shawn Lin <shawn.lin@rock-chips.com>
To: "ping.gao" <ping.gao@samsung.com>,
	ulf.hansson@linaro.org, jh80.chung@samsung.com,
	sebastian.reichel@collabora.com
Cc: shawn.lin@rock-chips.com, linux-mmc@vger.kernel.org,
	linux-kernel@vger.kernel.org, hy50.seo@samsung.com,
	kwangwon.min@samsung.com
Subject: Re: [PATCH] drivers: dw_mmc: Replace devm_clk_get with devm_clk_get_optional
Date: Thu, 12 Feb 2026 18:45:03 +0800	[thread overview]
Message-ID: <a1e0ad87-a657-0e45-2701-d23cbfe8d523@rock-chips.com> (raw)
In-Reply-To: <20260212103627.3677417-1-ping.gao@samsung.com>



在 2026/02/12 星期四 18:36, ping.gao 写道:
> 在 2026/01/23 星期五 18:56, shawn lin 写道:
> 
> 

...

> 
> 
> 1.  I think "synopsys-dw-mshc.yaml" needn't change , because biu must be set for hisilicon, they will set rate for biu_clk
> 

No, otherwise you can't pass the dtschema checking.

> 
> 2.  we should add another patch for hisilicon like below, do you agree?
> 
> 
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> 

Please check it in dw_mmc-k3 code.

> 
> index 6bcc1e7233c0..7a2149435894 100644
> 
> 
> --- a/drivers/mmc/host/dw_mmc.c
> 
> 
> +++ b/drivers/mmc/host/dw_mmc.c
> 
> 
> @@ -3383,6 +3383,17 @@ int dw_mci_probe(struct dw_mci *host)
> 
> 
>                          return ret;
> 
> 
> 
> 
> 
>          } else {
> 
> 
> +               const char *compatible_str = NULL;
> 
> 
> +
> 
> 
> +               if (of_property_read_string(host->dev->of_node, "compatible",
> 
> 
> +                       &compatible_str) == 0) {
> 
> 
> +                       if (strstr(compatible_str, "hisilicon")) {
> 
> 
> +                               if (!host->biu_clk) {
> 
> 
> +                                       dev_err(host->dev, "biu clock not available ,it must be set\n");
> 
> 
> +                                       return -EINVAL;
> 
> 
> +                               }
> 
> 
> +                       }
> 
> 
> +               }
> 
> 
>                  ret = clk_prepare_enable(host->biu_clk);
> 
> 
>                  if (ret) {
> 
> 
>                          dev_err(host->dev, "failed to enable biu clock\n");
> 
> 
> --
> 
> 
> could you please give me some advice? thanks.
> 
> 
> Gaoping
> 
> 
> 
> 
> 
>>>    	if (IS_ERR(host->biu_clk)) {
> 
> 
>>>    		dev_dbg(host->dev, "biu clock not available\n");
> 
> 
>>>    		ret = PTR_ERR(host->biu_clk);
> 
> 
>>>
> 
> 
> 
> 

  reply	other threads:[~2026-02-12 10:45 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20260123085150epcas5p42f2cc04843ae7657380b2968261246cb@epcas5p4.samsung.com>
2026-01-23  8:56 ` ping.gao
2026-01-23  9:46   ` Ulf Hansson
2026-02-11  9:56   ` Shawn Lin
2026-02-11  8:18 ` ping.gao
2026-02-12 10:36 ` ping.gao
2026-02-12 10:45   ` Shawn Lin [this message]
2026-02-13  3:08 ` [PATCH v2 1/3] mmc: dw_mmc: Using devm_clk_get_optional() for biu_clk ping.gao
2026-02-13  3:24   ` Shawn Lin
2026-02-13  3:08 ` [PATCH v2 2/3] mmc: dw_mmc-k3: before set biu_clk rate, check biu_clk available or not ping.gao
2026-02-13  3:30   ` Shawn Lin
2026-02-13  3:09 ` [PATCH v2 3/3] dt-bindings: mmc: synopsys-dw-mshc: clk is not a must of two ping.gao
2026-02-13  3:14   ` Shawn Lin
2026-02-13  7:37   ` Krzysztof Kozlowski
2026-02-13  5:34 ` [PATCH v3 1/3] dt-bindings: mmc: synopsys-dw-mshc: No need to enforce setting two clocks ping.gao
2026-02-13  7:37   ` Krzysztof Kozlowski
2026-02-13  5:34 ` [PATCH v3 2/3] mmc: dw_mmc-k3: before set biu_clk rate, check biu_clk available or not ping.gao
2026-02-13  5:34 ` [PATCH v3 3/3] mmc: dw_mmc: Using devm_clk_get_optional() for biu_clk ping.gao
2026-02-26  9:09 ` [PATCH v3 1/3] mmc: dw_mmc-k3: before set biu_clk rate, check biu_clk available or not ping.gao
2026-02-26  9:10 ` [PATCH v3 2/3] mmc: dw_mmc: Using devm_clk_get_optional() for biu_clk ping.gao
2026-02-26  9:10 ` [PATCH v3 3/3] dt-bindings: mmc: synopsys-dw-mshc: No need to enforce setting two clocks ping.gao
2026-02-27  7:50   ` Krzysztof Kozlowski
2026-02-27  7:52     ` Krzysztof Kozlowski
2026-02-27  7:51   ` Krzysztof Kozlowski
2026-02-27  7:53     ` Krzysztof Kozlowski
2026-02-28  3:13 ` ping.gao
2026-02-28  9:46   ` Krzysztof Kozlowski

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=a1e0ad87-a657-0e45-2701-d23cbfe8d523@rock-chips.com \
    --to=shawn.lin@rock-chips.com \
    --cc=hy50.seo@samsung.com \
    --cc=jh80.chung@samsung.com \
    --cc=kwangwon.min@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ping.gao@samsung.com \
    --cc=sebastian.reichel@collabora.com \
    --cc=ulf.hansson@linaro.org \
    /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

all inboxes | Powered by JetHome®