public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drivers: dw_mmc: Replace  devm_clk_get with devm_clk_get_optional
       [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
                   ` (11 subsequent siblings)
  12 siblings, 2 replies; 26+ messages in thread
From: ping.gao @ 2026-01-23  8:56 UTC (permalink / raw)
  To: jh80.chung, sebastian.reichel, shawn.lin, ulf.hansson, linux-mmc,
	linux-kernel, hy50.seo, kwangwon.min, ping.gao

By using devm_clk_get_optional, if clk is optional for device and not define in dts
it will return NULL, then clk_prepare_enable/clk_disable_unprepare for biu_clk is safe to
bail out internally.

before biu_clk in dwmmc driver devm_clk_get fail, but it's ERR_PTR,
not null,it will panic when call clk_prepare
log is below:
[  438.400868] [7:   binder:436_2: 4998] Unable to handle kernel paging request at virtual address fffffffffffffffe
[  438.400877] [7:   binder:436_2: 4998] Mem abort info:
[  438.400881] [7:   binder:436_2: 4998]   ESR = 0x0000000096000005
[  438.400887] [7:   binder:436_2: 4998]   EC = 0x25: DABT (current EL), IL = 32 bits
[  438.400894] [7:   binder:436_2: 4998]   SET = 0, FnV = 0
[  438.400899] [7:   binder:436_2: 4998]   EA = 0, S1PTW = 0
[  438.400904] [7:   binder:436_2: 4998]   FSC = 0x05: level 1 translation fault
...
[  438.409424] [7:   binder:436_2: 4998] Call trace:
[  438.409429] [7:   binder:436_2: 4998]  clk_prepare+0x10/0x24
[  438.409439] [7:   binder:436_2: 4998]  dw_mci_runtime_resume+0x50/0x2d8 [dw_mmc_samsung cd210e210975263404c28fc89778f369f8398f0c]
[  438.409471] [7:   binder:436_2: 4998]  dw_mci_exynos_runtime_resume+0x18/0x58 [dw_mmc_exynos_samsung 2735a594c7c9c9e8c65b0b87523fbf70dcaabfff]
[  438.409496] [7:   binder:436_2: 4998]  pm_generic_runtime_resume+0x40/0x58
[  438.409506] [7:   binder:436_2: 4998]  pm_runtime_force_resume+0x9c/0x134
[  438.409517] [7:   binder:436_2: 4998]  platform_pm_resume+0x40/0x8c
[  438.409529] [7:   binder:436_2: 4998]  dpm_run_callback+0x64/0x230
[  438.409540] [7:   binder:436_2: 4998]  __device_resume+0x1d8/0x394
[  438.409551] [7:   binder:436_2: 4998]  dpm_resume+0x110/0x2b8
[  438.409561] [7:   binder:436_2: 4998]  dpm_resume_end+0x1c/0x38
[  438.409570] [7:   binder:436_2: 4998]  suspend_devices_and_enter+0x828/0xab0
[  438.409582] [7:   binder:436_2: 4998]  pm_suspend+0x334/0x618
[  438.409592] [7:   binder:436_2: 4998]  state_store+0x104/0x144
[  438.409601] [7:   binder:436_2: 4998]  kobj_attr_store+0x30/0x48
[  438.409610] [7:   binder:436_2: 4998]  sysfs_kf_write+0x54/0x6c
[  438.409619] [7:   binder:436_2: 4998]  kernfs_fop_write_iter+0x104/0x1a8
[  438.409628] [7:   binder:436_2: 4998]  vfs_write+0x24c/0x2f4
[  438.409640] [7:   binder:436_2: 4998]  ksys_write+0x78/0xe8
[  438.409652] [7:   binder:436_2: 4998]  __arm64_sys_write+0x1c/0x2c
[  438.409664] [7:   binder:436_2: 4998]  invoke_syscall+0x58/0x114
[  438.409676] [7:   binder:436_2: 4998]  el0_svc_common+0xac/0xe0
[  438.409687] [7:   binder:436_2: 4998]  do_el0_svc+0x1c/0x28
[  438.409698] [7:   binder:436_2: 4998]  el0_svc+0x38/0x68
[  438.409705] [7:   binder:436_2: 4998]  el0t_64_sync_handler+0x68/0xbc
[  438.409712] [7:   binder:436_2: 4998]  el0t_64_sync+0x1a8/0x1ac

Signed-off-by: ping.gao <ping.gao@samsung.com>
---
 drivers/mmc/host/dw_mmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index c5db92bbb094..6bcc1e7233c0 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -3375,7 +3375,7 @@ int dw_mci_probe(struct dw_mci *host)
 					     "platform data not available\n");
 	}
 
-	host->biu_clk = devm_clk_get(host->dev, "biu");
+	host->biu_clk = devm_clk_get_optional(host->dev, "biu");
 	if (IS_ERR(host->biu_clk)) {
 		dev_dbg(host->dev, "biu clock not available\n");
 		ret = PTR_ERR(host->biu_clk);
-- 
2.50.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* Re: [PATCH] drivers: dw_mmc: Replace devm_clk_get with devm_clk_get_optional
  2026-01-23  8:56 ` [PATCH] drivers: dw_mmc: Replace devm_clk_get with devm_clk_get_optional ping.gao
@ 2026-01-23  9:46   ` Ulf Hansson
  2026-02-11  9:56   ` Shawn Lin
  1 sibling, 0 replies; 26+ messages in thread
From: Ulf Hansson @ 2026-01-23  9:46 UTC (permalink / raw)
  To: ping.gao
  Cc: jh80.chung, sebastian.reichel, shawn.lin, linux-mmc, linux-kernel,
	hy50.seo, kwangwon.min

On Fri, 23 Jan 2026 at 09:51, ping.gao <ping.gao@samsung.com> wrote:
>
> By using devm_clk_get_optional, if clk is optional for device and not define in dts
> it will return NULL, then clk_prepare_enable/clk_disable_unprepare for biu_clk is safe to
> bail out internally.
>
> before biu_clk in dwmmc driver devm_clk_get fail, but it's ERR_PTR,
> not null,it will panic when call clk_prepare
> log is below:
> [  438.400868] [7:   binder:436_2: 4998] Unable to handle kernel paging request at virtual address fffffffffffffffe
> [  438.400877] [7:   binder:436_2: 4998] Mem abort info:
> [  438.400881] [7:   binder:436_2: 4998]   ESR = 0x0000000096000005
> [  438.400887] [7:   binder:436_2: 4998]   EC = 0x25: DABT (current EL), IL = 32 bits
> [  438.400894] [7:   binder:436_2: 4998]   SET = 0, FnV = 0
> [  438.400899] [7:   binder:436_2: 4998]   EA = 0, S1PTW = 0
> [  438.400904] [7:   binder:436_2: 4998]   FSC = 0x05: level 1 translation fault
> ...
> [  438.409424] [7:   binder:436_2: 4998] Call trace:
> [  438.409429] [7:   binder:436_2: 4998]  clk_prepare+0x10/0x24
> [  438.409439] [7:   binder:436_2: 4998]  dw_mci_runtime_resume+0x50/0x2d8 [dw_mmc_samsung cd210e210975263404c28fc89778f369f8398f0c]
> [  438.409471] [7:   binder:436_2: 4998]  dw_mci_exynos_runtime_resume+0x18/0x58 [dw_mmc_exynos_samsung 2735a594c7c9c9e8c65b0b87523fbf70dcaabfff]
> [  438.409496] [7:   binder:436_2: 4998]  pm_generic_runtime_resume+0x40/0x58
> [  438.409506] [7:   binder:436_2: 4998]  pm_runtime_force_resume+0x9c/0x134
> [  438.409517] [7:   binder:436_2: 4998]  platform_pm_resume+0x40/0x8c
> [  438.409529] [7:   binder:436_2: 4998]  dpm_run_callback+0x64/0x230
> [  438.409540] [7:   binder:436_2: 4998]  __device_resume+0x1d8/0x394
> [  438.409551] [7:   binder:436_2: 4998]  dpm_resume+0x110/0x2b8
> [  438.409561] [7:   binder:436_2: 4998]  dpm_resume_end+0x1c/0x38
> [  438.409570] [7:   binder:436_2: 4998]  suspend_devices_and_enter+0x828/0xab0
> [  438.409582] [7:   binder:436_2: 4998]  pm_suspend+0x334/0x618
> [  438.409592] [7:   binder:436_2: 4998]  state_store+0x104/0x144
> [  438.409601] [7:   binder:436_2: 4998]  kobj_attr_store+0x30/0x48
> [  438.409610] [7:   binder:436_2: 4998]  sysfs_kf_write+0x54/0x6c
> [  438.409619] [7:   binder:436_2: 4998]  kernfs_fop_write_iter+0x104/0x1a8
> [  438.409628] [7:   binder:436_2: 4998]  vfs_write+0x24c/0x2f4
> [  438.409640] [7:   binder:436_2: 4998]  ksys_write+0x78/0xe8
> [  438.409652] [7:   binder:436_2: 4998]  __arm64_sys_write+0x1c/0x2c
> [  438.409664] [7:   binder:436_2: 4998]  invoke_syscall+0x58/0x114
> [  438.409676] [7:   binder:436_2: 4998]  el0_svc_common+0xac/0xe0
> [  438.409687] [7:   binder:436_2: 4998]  do_el0_svc+0x1c/0x28
> [  438.409698] [7:   binder:436_2: 4998]  el0_svc+0x38/0x68
> [  438.409705] [7:   binder:436_2: 4998]  el0t_64_sync_handler+0x68/0xbc
> [  438.409712] [7:   binder:436_2: 4998]  el0t_64_sync+0x1a8/0x1ac
>
> Signed-off-by: ping.gao <ping.gao@samsung.com>

You are not versioning your patches, which makes it difficult for me
to manage them. Again, please read
Documentation/process/submitting-patches.rst before you continue to
post any more patches.

Anyway, I can pick this up as is for now, when Shawn has reviewed it.

Kind regards
Uffe

> ---
>  drivers/mmc/host/dw_mmc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index c5db92bbb094..6bcc1e7233c0 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -3375,7 +3375,7 @@ int dw_mci_probe(struct dw_mci *host)
>                                              "platform data not available\n");
>         }
>
> -       host->biu_clk = devm_clk_get(host->dev, "biu");
> +       host->biu_clk = devm_clk_get_optional(host->dev, "biu");
>         if (IS_ERR(host->biu_clk)) {
>                 dev_dbg(host->dev, "biu clock not available\n");
>                 ret = PTR_ERR(host->biu_clk);
> --
> 2.50.1
>

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH] drivers: dw_mmc: Replace devm_clk_get with devm_clk_get_optional
       [not found] <CGME20260123085150epcas5p42f2cc04843ae7657380b2968261246cb@epcas5p4.samsung.com>
  2026-01-23  8:56 ` [PATCH] drivers: dw_mmc: Replace devm_clk_get with devm_clk_get_optional ping.gao
@ 2026-02-11  8:18 ` ping.gao
  2026-02-12 10:36 ` ping.gao
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 26+ messages in thread
From: ping.gao @ 2026-02-11  8:18 UTC (permalink / raw)
  To: shawn.lin, ulf.hansson, jh80.chung, sebastian.reichel, ping.gao
  Cc: linux-mmc, linux-kernel, hy50.seo, kwangwon.min

On Fri, 23 Jan 2026 10:46:45, Ulf Hansson <ulf.hansson@linaro.org> wrote:
> > On Fri, 23 Jan 2026 at 09:51, ping.gao <ping.gao@samsung.com> wrote:
> >
> > By using devm_clk_get_optional, if clk is optional for device and not define in dts
> > it will return NULL, then clk_prepare_enable/clk_disable_unprepare for biu_clk is safe to
> > bail out internally.
> >
> > before biu_clk in dwmmc driver devm_clk_get fail, but it's ERR_PTR,
> > not null,it will panic when call clk_prepare
> > log is below:
> > [  438.400868] [7:   binder:436_2: 4998] Unable to handle kernel paging request at virtual address fffffffffffffffe
> > [  438.400877] [7:   binder:436_2: 4998] Mem abort info:
> > [  438.400881] [7:   binder:436_2: 4998]   ESR = 0x0000000096000005
> > [  438.400887] [7:   binder:436_2: 4998]   EC = 0x25: DABT (current EL), IL = 32 bits
> > [  438.400894] [7:   binder:436_2: 4998]   SET = 0, FnV = 0
> > [  438.400899] [7:   binder:436_2: 4998]   EA = 0, S1PTW = 0
> > [  438.400904] [7:   binder:436_2: 4998]   FSC = 0x05: level 1 translation fault
> > ...
> > [  438.409424] [7:   binder:436_2: 4998] Call trace:
> > [  438.409429] [7:   binder:436_2: 4998]  clk_prepare+0x10/0x24
> > [  438.409439] [7:   binder:436_2: 4998]  dw_mci_runtime_resume+0x50/0x2d8 [dw_mmc_samsung cd210e210975263404c28fc89778f369f8398f0c]
> > [  438.409471] [7:   binder:436_2: 4998]  dw_mci_exynos_runtime_resume+0x18/0x58 [dw_mmc_exynos_samsung 2735a594c7c9c9e8c65b0b87523fbf70dcaabfff]
> > [  438.409496] [7:   binder:436_2: 4998]  pm_generic_runtime_resume+0x40/0x58
> > [  438.409506] [7:   binder:436_2: 4998]  pm_runtime_force_resume+0x9c/0x134
> > [  438.409517] [7:   binder:436_2: 4998]  platform_pm_resume+0x40/0x8c
> > [  438.409529] [7:   binder:436_2: 4998]  dpm_run_callback+0x64/0x230
> > [  438.409540] [7:   binder:436_2: 4998]  __device_resume+0x1d8/0x394
> > [  438.409551] [7:   binder:436_2: 4998]  dpm_resume+0x110/0x2b8
> > [  438.409561] [7:   binder:436_2: 4998]  dpm_resume_end+0x1c/0x38
> > [  438.409570] [7:   binder:436_2: 4998]  suspend_devices_and_enter+0x828/0xab0
> > [  438.409582] [7:   binder:436_2: 4998]  pm_suspend+0x334/0x618
> > [  438.409592] [7:   binder:436_2: 4998]  state_store+0x104/0x144
> > [  438.409601] [7:   binder:436_2: 4998]  kobj_attr_store+0x30/0x48
> > [  438.409610] [7:   binder:436_2: 4998]  sysfs_kf_write+0x54/0x6c
> > [  438.409619] [7:   binder:436_2: 4998]  kernfs_fop_write_iter+0x104/0x1a8
> > [  438.409628] [7:   binder:436_2: 4998]  vfs_write+0x24c/0x2f4
> > [  438.409640] [7:   binder:436_2: 4998]  ksys_write+0x78/0xe8
> > [  438.409652] [7:   binder:436_2: 4998]  __arm64_sys_write+0x1c/0x2c
> > [  438.409664] [7:   binder:436_2: 4998]  invoke_syscall+0x58/0x114
> > [  438.409676] [7:   binder:436_2: 4998]  el0_svc_common+0xac/0xe0
> > [  438.409687] [7:   binder:436_2: 4998]  do_el0_svc+0x1c/0x28
> > [  438.409698] [7:   binder:436_2: 4998]  el0_svc+0x38/0x68
> > [  438.409705] [7:   binder:436_2: 4998]  el0t_64_sync_handler+0x68/0xbc
> > [  438.409712] [7:   binder:436_2: 4998]  el0t_64_sync+0x1a8/0x1ac
> >
> > Signed-off-by: ping.gao <ping.gao@samsung.com>
> 
> You are not versioning your patches, which makes it difficult for me
> to manage them. Again, please read
> Documentation/process/submitting-patches.rst before you continue to
> post any more patches.
> 
> Anyway, I can pick this up as is for now, when Shawn has reviewed it.
> 
> Kind regards
> Uffe

Hi, Shawn:
 could you please review this patch?

best regards
Gaoping

> > ---
> >  drivers/mmc/host/dw_mmc.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> > index c5db92bbb094..6bcc1e7233c0 100644
> > --- a/drivers/mmc/host/dw_mmc.c
> > +++ b/drivers/mmc/host/dw_mmc.c
> > @@ -3375,7 +3375,7 @@ int dw_mci_probe(struct dw_mci *host)
> >                                              "platform data not available\n");
> >         }
> >
> > -       host->biu_clk = devm_clk_get(host->dev, "biu");
> > +       host->biu_clk = devm_clk_get_optional(host->dev, "biu");
> >         if (IS_ERR(host->biu_clk)) {
> >                 dev_dbg(host->dev, "biu clock not available\n");
> >                 ret = PTR_ERR(host->biu_clk);
> > --
> > 2.50.1
> >

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH] drivers: dw_mmc: Replace devm_clk_get with devm_clk_get_optional
  2026-01-23  8:56 ` [PATCH] drivers: dw_mmc: Replace devm_clk_get with devm_clk_get_optional ping.gao
  2026-01-23  9:46   ` Ulf Hansson
@ 2026-02-11  9:56   ` Shawn Lin
  1 sibling, 0 replies; 26+ messages in thread
From: Shawn Lin @ 2026-02-11  9:56 UTC (permalink / raw)
  To: ping.gao
  Cc: shawn.lin, jh80.chung, sebastian.reichel, linux-mmc, ulf.hansson,
	hy50.seo, kwangwon.min, linux-kernel

Hi Ping Gao

在 2026/01/23 星期五 16:56, ping.gao 写道:
> By using devm_clk_get_optional, if clk is optional for device and not define in dts
> it will return NULL, then clk_prepare_enable/clk_disable_unprepare for biu_clk is safe to
> bail out internally.
> 

Sorry for not noticing this patch as the versioning problem.

You should improve the commit title to match the convention like:
mmc: dw_mmc: Using devm_clk_get_optional() for biu_clk

> before biu_clk in dwmmc driver devm_clk_get fail, but it's ERR_PTR,
> not null,it will panic when call clk_prepare
> log is below:
> [  438.400868] [7:   binder:436_2: 4998] Unable to handle kernel paging request at virtual address fffffffffffffffe
> [  438.400877] [7:   binder:436_2: 4998] Mem abort info:
> [  438.400881] [7:   binder:436_2: 4998]   ESR = 0x0000000096000005
> [  438.400887] [7:   binder:436_2: 4998]   EC = 0x25: DABT (current EL), IL = 32 bits
> [  438.400894] [7:   binder:436_2: 4998]   SET = 0, FnV = 0
> [  438.400899] [7:   binder:436_2: 4998]   EA = 0, S1PTW = 0
> [  438.400904] [7:   binder:436_2: 4998]   FSC = 0x05: level 1 translation fault
> ...

The​ timestamp could be trimmed.

> [  438.409424] [7:   binder:436_2: 4998] Call trace:
> [  438.409429] [7:   binder:436_2: 4998]  clk_prepare+0x10/0x24
> [  438.409439] [7:   binder:436_2: 4998]  dw_mci_runtime_resume+0x50/0x2d8 [dw_mmc_samsung cd210e210975263404c28fc89778f369f8398f0c]
> [  438.409471] [7:   binder:436_2: 4998]  dw_mci_exynos_runtime_resume+0x18/0x58 [dw_mmc_exynos_samsung 2735a594c7c9c9e8c65b0b87523fbf70dcaabfff]
> [  438.409496] [7:   binder:436_2: 4998]  pm_generic_runtime_resume+0x40/0x58
> [  438.409506] [7:   binder:436_2: 4998]  pm_runtime_force_resume+0x9c/0x134
> [  438.409517] [7:   binder:436_2: 4998]  platform_pm_resume+0x40/0x8c
> [  438.409529] [7:   binder:436_2: 4998]  dpm_run_callback+0x64/0x230
> [  438.409540] [7:   binder:436_2: 4998]  __device_resume+0x1d8/0x394
> [  438.409551] [7:   binder:436_2: 4998]  dpm_resume+0x110/0x2b8
> [  438.409561] [7:   binder:436_2: 4998]  dpm_resume_end+0x1c/0x38
> [  438.409570] [7:   binder:436_2: 4998]  suspend_devices_and_enter+0x828/0xab0
> [  438.409582] [7:   binder:436_2: 4998]  pm_suspend+0x334/0x618
> [  438.409592] [7:   binder:436_2: 4998]  state_store+0x104/0x144
> [  438.409601] [7:   binder:436_2: 4998]  kobj_attr_store+0x30/0x48
> [  438.409610] [7:   binder:436_2: 4998]  sysfs_kf_write+0x54/0x6c
> [  438.409619] [7:   binder:436_2: 4998]  kernfs_fop_write_iter+0x104/0x1a8
> [  438.409628] [7:   binder:436_2: 4998]  vfs_write+0x24c/0x2f4
> [  438.409640] [7:   binder:436_2: 4998]  ksys_write+0x78/0xe8
> [  438.409652] [7:   binder:436_2: 4998]  __arm64_sys_write+0x1c/0x2c
> [  438.409664] [7:   binder:436_2: 4998]  invoke_syscall+0x58/0x114
> [  438.409676] [7:   binder:436_2: 4998]  el0_svc_common+0xac/0xe0
> [  438.409687] [7:   binder:436_2: 4998]  do_el0_svc+0x1c/0x28
> [  438.409698] [7:   binder:436_2: 4998]  el0_svc+0x38/0x68
> [  438.409705] [7:   binder:436_2: 4998]  el0t_64_sync_handler+0x68/0xbc
> [  438.409712] [7:   binder:436_2: 4998]  el0t_64_sync+0x1a8/0x1ac
> 
> Signed-off-by: ping.gao <ping.gao@samsung.com>
> ---
>   drivers/mmc/host/dw_mmc.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index c5db92bbb094..6bcc1e7233c0 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -3375,7 +3375,7 @@ int dw_mci_probe(struct dw_mci *host)
>   					     "platform data not available\n");
>   	}
>   
> -	host->biu_clk = devm_clk_get(host->dev, "biu");
> +	host->biu_clk = devm_clk_get_optional(host->dev, "biu");

You change biu_clk to optional, so you need to update
Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.yaml
because minItems says 2 there.

And you also change the behaviour of drivers/mmc/host/dw_mmc-k3.c
which tries to set/get biu_clk and setup cards, it's apparently rely on
dw_mmc core to make biu_clk a must one.

So I suggest you at least need a extra 3rd patch to help dw_mmc-k3
identify missing biu_clk case.

For the next submission, please order the patchset as
1. synopsys-dw-mshc.yaml change
2. dw_mmc-k3 change
3. dw_mmc.c change

>   	if (IS_ERR(host->biu_clk)) {
>   		dev_dbg(host->dev, "biu clock not available\n");
>   		ret = PTR_ERR(host->biu_clk);
> 

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH] drivers: dw_mmc: Replace devm_clk_get with devm_clk_get_optional
       [not found] <CGME20260123085150epcas5p42f2cc04843ae7657380b2968261246cb@epcas5p4.samsung.com>
  2026-01-23  8:56 ` [PATCH] drivers: dw_mmc: Replace devm_clk_get with devm_clk_get_optional ping.gao
  2026-02-11  8:18 ` ping.gao
@ 2026-02-12 10:36 ` ping.gao
  2026-02-12 10:45   ` Shawn Lin
  2026-02-13  3:08 ` [PATCH v2 1/3] mmc: dw_mmc: Using devm_clk_get_optional() for biu_clk ping.gao
                   ` (9 subsequent siblings)
  12 siblings, 1 reply; 26+ messages in thread
From: ping.gao @ 2026-02-12 10:36 UTC (permalink / raw)
  To: shawn.lin, ulf.hansson, jh80.chung, sebastian.reichel, ping.gao
  Cc: linux-mmc, linux-kernel, hy50.seo, kwangwon.min

在 2026/01/23 星期五 18:56, shawn lin 写道:
> 
> Hi Ping Gao
> 
> 在 2026/01/23 星期五 16:56, ping.gao 写道:
> > By using devm_clk_get_optional, if clk is optional for device and not define in dts
> > it will return NULL, then clk_prepare_enable/clk_disable_unprepare for biu_clk is safe to
> > bail out internally.
> > 
> 
> Sorry for not noticing this patch as the versioning problem.
> 
> You should improve the commit title to match the convention like:
> mmc: dw_mmc: Using devm_clk_get_optional() for biu_clk
> 
> > before biu_clk in dwmmc driver devm_clk_get fail, but it's ERR_PTR,
> > not null,it will panic when call clk_prepare
> > log is below:
> > [  438.400868] [7:   binder:436_2: 4998] Unable to handle kernel paging request at virtual address fffffffffffffffe
> > [  438.400877] [7:   binder:436_2: 4998] Mem abort info:
> > [  438.400881] [7:   binder:436_2: 4998]   ESR = 0x0000000096000005
> > [  438.400887] [7:   binder:436_2: 4998]   EC = 0x25: DABT (current EL), IL = 32 bits
> > [  438.400894] [7:   binder:436_2: 4998]   SET = 0, FnV = 0
> > [  438.400899] [7:   binder:436_2: 4998]   EA = 0, S1PTW = 0
> > [  438.400904] [7:   binder:436_2: 4998]   FSC = 0x05: level 1 translation fault
> > ...
> 
> The timestamp could be trimmed.
> 
> > [  438.409424] [7:   binder:436_2: 4998] Call trace:
> > [  438.409429] [7:   binder:436_2: 4998]  clk_prepare+0x10/0x24
> > [  438.409439] [7:   binder:436_2: 4998]  dw_mci_runtime_resume+0x50/0x2d8 [dw_mmc_samsung cd210e210975263404c28fc89778f369f8398f0c]
> > [  438.409471] [7:   binder:436_2: 4998]  dw_mci_exynos_runtime_resume+0x18/0x58 [dw_mmc_exynos_samsung 2735a594c7c9c9e8c65b0b87523fbf70dcaabfff]
> > [  438.409496] [7:   binder:436_2: 4998]  pm_generic_runtime_resume+0x40/0x58
> > [  438.409506] [7:   binder:436_2: 4998]  pm_runtime_force_resume+0x9c/0x134
> > [  438.409517] [7:   binder:436_2: 4998]  platform_pm_resume+0x40/0x8c
> > [  438.409529] [7:   binder:436_2: 4998]  dpm_run_callback+0x64/0x230
> > [  438.409540] [7:   binder:436_2: 4998]  __device_resume+0x1d8/0x394
> > [  438.409551] [7:   binder:436_2: 4998]  dpm_resume+0x110/0x2b8
> > [  438.409561] [7:   binder:436_2: 4998]  dpm_resume_end+0x1c/0x38
> > [  438.409570] [7:   binder:436_2: 4998]  suspend_devices_and_enter+0x828/0xab0
> > [  438.409582] [7:   binder:436_2: 4998]  pm_suspend+0x334/0x618
> > [  438.409592] [7:   binder:436_2: 4998]  state_store+0x104/0x144
> > [  438.409601] [7:   binder:436_2: 4998]  kobj_attr_store+0x30/0x48
> > [  438.409610] [7:   binder:436_2: 4998]  sysfs_kf_write+0x54/0x6c
> > [  438.409619] [7:   binder:436_2: 4998]  kernfs_fop_write_iter+0x104/0x1a8
> > [  438.409628] [7:   binder:436_2: 4998]  vfs_write+0x24c/0x2f4
> > [  438.409640] [7:   binder:436_2: 4998]  ksys_write+0x78/0xe8
> > [  438.409652] [7:   binder:436_2: 4998]  __arm64_sys_write+0x1c/0x2c
> > [  438.409664] [7:   binder:436_2: 4998]  invoke_syscall+0x58/0x114
> > [  438.409676] [7:   binder:436_2: 4998]  el0_svc_common+0xac/0xe0
> > [  438.409687] [7:   binder:436_2: 4998]  do_el0_svc+0x1c/0x28
> > [  438.409698] [7:   binder:436_2: 4998]  el0_svc+0x38/0x68
> > [  438.409705] [7:   binder:436_2: 4998]  el0t_64_sync_handler+0x68/0xbc
> > [  438.409712] [7:   binder:436_2: 4998]  el0t_64_sync+0x1a8/0x1ac
> > 
> > Signed-off-by: ping.gao <ping.gao@samsung.com>
> > ---
> >   drivers/mmc/host/dw_mmc.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> > index c5db92bbb094..6bcc1e7233c0 100644
> > --- a/drivers/mmc/host/dw_mmc.c
> > +++ b/drivers/mmc/host/dw_mmc.c
> > @@ -3375,7 +3375,7 @@ int dw_mci_probe(struct dw_mci *host)
> >   					     "platform data not available\n");
> >   	}
> >   
> > -	host->biu_clk = devm_clk_get(host->dev, "biu");
> > +	host->biu_clk = devm_clk_get_optional(host->dev, "biu");
> 
> You change biu_clk to optional, so you need to update
> Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.yaml
> because minItems says 2 there.
> 
> And you also change the behaviour of drivers/mmc/host/dw_mmc-k3.c
> which tries to set/get biu_clk and setup cards, it's apparently rely on
> dw_mmc core to make biu_clk a must one.
> 
> So I suggest you at least need a extra 3rd patch to help dw_mmc-k3
> identify missing biu_clk case.
> 
> For the next submission, please order the patchset as
> 1. synopsys-dw-mshc.yaml change
> 2. dw_mmc-k3 change
> 3. dw_mmc.c change
> 

Hi, Shawn Lin:
I'd like to talk to you about next version  patch:
1.  I think "synopsys-dw-mshc.yaml" needn't change , because biu must be set for hisilicon, they will set rate for biu_clk
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
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);
> > 


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* Re: [PATCH] drivers: dw_mmc: Replace devm_clk_get with devm_clk_get_optional
  2026-02-12 10:36 ` ping.gao
@ 2026-02-12 10:45   ` Shawn Lin
  0 siblings, 0 replies; 26+ messages in thread
From: Shawn Lin @ 2026-02-12 10:45 UTC (permalink / raw)
  To: ping.gao, ulf.hansson, jh80.chung, sebastian.reichel
  Cc: shawn.lin, linux-mmc, linux-kernel, hy50.seo, kwangwon.min



在 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);
> 
> 
>>>
> 
> 
> 
> 

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [PATCH v2 1/3] mmc: dw_mmc: Using devm_clk_get_optional() for biu_clk
       [not found] <CGME20260123085150epcas5p42f2cc04843ae7657380b2968261246cb@epcas5p4.samsung.com>
                   ` (2 preceding siblings ...)
  2026-02-12 10:36 ` ping.gao
@ 2026-02-13  3:08 ` 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
                   ` (8 subsequent siblings)
  12 siblings, 1 reply; 26+ messages in thread
From: ping.gao @ 2026-02-13  3:08 UTC (permalink / raw)
  To: shawn.lin, ulf.hansson, jh80.chung, sebastian.reichel, ping.gao
  Cc: linux-mmc, linux-kernel, hy50.seo, kwangwon.min

By using devm_clk_get_optional, if clk is optional for device and not define in dts
it will return NULL, then clk_prepare_enable/clk_disable_unprepare for biu_clk is safe to
bail out internally.

before biu_clk in dwmmc driver devm_clk_get fail, but it's ERR_PTR,
not null,it will panic when call clk_prepare
log is below:
[7:   binder:436_2: 4998] Unable to handle kernel paging request at virtual address fffffffffffffffe
[7:   binder:436_2: 4998] Mem abort info:
[7:   binder:436_2: 4998]   ESR = 0x0000000096000005
[7:   binder:436_2: 4998]   EC = 0x25: DABT (current EL), IL = 32 bits
[7:   binder:436_2: 4998]   SET = 0, FnV = 0
[7:   binder:436_2: 4998]   EA = 0, S1PTW = 0
[7:   binder:436_2: 4998]   FSC = 0x05: level 1 translation fault
...
[7:   binder:436_2: 4998] Call trace:
[7:   binder:436_2: 4998]  clk_prepare+0x10/0x24
[7:   binder:436_2: 4998]  dw_mci_runtime_resume+0x50/0x2d8 [dw_mmc_samsung cd210e210975263404c28fc89778f369f8398f0c]
[7:   binder:436_2: 4998]  dw_mci_exynos_runtime_resume+0x18/0x58 [dw_mmc_exynos_samsung 2735a594c7c9c9e8c65b0b87523fbf70dcaabfff]
[7:   binder:436_2: 4998]  pm_generic_runtime_resume+0x40/0x58
[7:   binder:436_2: 4998]  pm_runtime_force_resume+0x9c/0x134
[7:   binder:436_2: 4998]  platform_pm_resume+0x40/0x8c
[7:   binder:436_2: 4998]  dpm_run_callback+0x64/0x230
[7:   binder:436_2: 4998]  __device_resume+0x1d8/0x394
[7:   binder:436_2: 4998]  dpm_resume+0x110/0x2b8
[7:   binder:436_2: 4998]  dpm_resume_end+0x1c/0x38
[7:   binder:436_2: 4998]  suspend_devices_and_enter+0x828/0xab0
[7:   binder:436_2: 4998]  pm_suspend+0x334/0x618
[7:   binder:436_2: 4998]  state_store+0x104/0x144
[7:   binder:436_2: 4998]  kobj_attr_store+0x30/0x48
[7:   binder:436_2: 4998]  sysfs_kf_write+0x54/0x6c
[7:   binder:436_2: 4998]  kernfs_fop_write_iter+0x104/0x1a8
[7:   binder:436_2: 4998]  vfs_write+0x24c/0x2f4
[7:   binder:436_2: 4998]  ksys_write+0x78/0xe8
[7:   binder:436_2: 4998]  __arm64_sys_write+0x1c/0x2c
[7:   binder:436_2: 4998]  invoke_syscall+0x58/0x114
[7:   binder:436_2: 4998]  el0_svc_common+0xac/0xe0
[7:   binder:436_2: 4998]  do_el0_svc+0x1c/0x28
[7:   binder:436_2: 4998]  el0_svc+0x38/0x68
[7:   binder:436_2: 4998]  el0t_64_sync_handler+0x68/0xbc
[7:   binder:436_2: 4998]  el0t_64_sync+0x1a8/0x1ac

Signed-off-by: ping.gao <ping.gao@samsung.com>
---
 drivers/mmc/host/dw_mmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index c5db92bbb094..6bcc1e7233c0 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -3375,7 +3375,7 @@ int dw_mci_probe(struct dw_mci *host)
 					     "platform data not available\n");
 	}
 
-	host->biu_clk = devm_clk_get(host->dev, "biu");
+	host->biu_clk = devm_clk_get_optional(host->dev, "biu");
 	if (IS_ERR(host->biu_clk)) {
 		dev_dbg(host->dev, "biu clock not available\n");
 		ret = PTR_ERR(host->biu_clk);
-- 
2.50.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v2 2/3] mmc: dw_mmc-k3: before set biu_clk rate, check biu_clk available or not
       [not found] <CGME20260123085150epcas5p42f2cc04843ae7657380b2968261246cb@epcas5p4.samsung.com>
                   ` (3 preceding siblings ...)
  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:08 ` 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
                   ` (7 subsequent siblings)
  12 siblings, 1 reply; 26+ messages in thread
From: ping.gao @ 2026-02-13  3:08 UTC (permalink / raw)
  To: shawn.lin, ulf.hansson, jh80.chung, sebastian.reichel, ping.gao
  Cc: linux-mmc, linux-kernel, hy50.seo, kwangwon.min

if biu_clk not available, shouldn't set_rate or get_rate

Signed-off-by: ping.gao <ping.gao@samsung.com>
---
 drivers/mmc/host/dw_mmc-k3.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/mmc/host/dw_mmc-k3.c b/drivers/mmc/host/dw_mmc-k3.c
index ad6aa1aea549..9c68e162b373 100644
--- a/drivers/mmc/host/dw_mmc-k3.c
+++ b/drivers/mmc/host/dw_mmc-k3.c
@@ -190,6 +190,11 @@ static void dw_mci_hi6220_set_ios(struct dw_mci *host, struct mmc_ios *ios)
 	int ret;
 	unsigned int clock;
 
+	if (IS_ERR_OR_NULL(host->biu_clk)) {
+		dev_warn(host->dev, "biu_clk not available\n");
+		return;
+	}
+
 	clock = (ios->clock <= 25000000) ? 25000000 : ios->clock;
 
 	ret = clk_set_rate(host->biu_clk, clock);
-- 
2.50.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v2 3/3] dt-bindings: mmc: synopsys-dw-mshc: clk is not a must of two
       [not found] <CGME20260123085150epcas5p42f2cc04843ae7657380b2968261246cb@epcas5p4.samsung.com>
                   ` (4 preceding siblings ...)
  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:09 ` 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
                   ` (6 subsequent siblings)
  12 siblings, 2 replies; 26+ messages in thread
From: ping.gao @ 2026-02-13  3:09 UTC (permalink / raw)
  To: shawn.lin, ulf.hansson, jh80.chung, sebastian.reichel, ping.gao
  Cc: linux-mmc, linux-kernel, hy50.seo, kwangwon.min

mmc biu and ciu clk don't have to be set

Signed-off-by: ping.gao <ping.gao@samsung.com>
---
 Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.yaml | 1 -
 1 file changed, 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.yaml b/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.yaml
index a6292777e376..e86fd53ed217 100644
--- a/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.yaml
+++ b/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.yaml
@@ -24,7 +24,6 @@ properties:
     maxItems: 1
 
   clocks:
-    minItems: 2
     maxItems: 2
     description:
       Handle to "biu" and "ciu" clocks for the
-- 
2.50.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* Re: [PATCH v2 3/3] dt-bindings: mmc: synopsys-dw-mshc: clk is not a must of two
  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
  1 sibling, 0 replies; 26+ messages in thread
From: Shawn Lin @ 2026-02-13  3:14 UTC (permalink / raw)
  To: ping.gao
  Cc: shawn.lin, linux-mmc, linux-kernel, hy50.seo, kwangwon.min,
	ulf.hansson, jh80.chung, sebastian.reichel

在 2026/02/13 星期五 11:09, ping.gao 写道:
> mmc biu and ciu clk don't have to be set
> 

This commit message is incorrect. ciu is not a optional one now.
And this patch should be the first patch of this patchset, not the last
one.

> Signed-off-by: ping.gao <ping.gao@samsung.com>
> ---
>   Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.yaml | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.yaml b/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.yaml
> index a6292777e376..e86fd53ed217 100644
> --- a/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.yaml
> +++ b/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.yaml
> @@ -24,7 +24,6 @@ properties:
>       maxItems: 1
>   
>     clocks:
> -    minItems: 2

minItems should still need 1, for ciu.

>       maxItems: 2
>       description:
>         Handle to "biu" and "ciu" clocks for the
> 

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v2 1/3] mmc: dw_mmc: Using devm_clk_get_optional() for biu_clk
  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
  0 siblings, 0 replies; 26+ messages in thread
From: Shawn Lin @ 2026-02-13  3:24 UTC (permalink / raw)
  To: ping.gao, ulf.hansson, jh80.chung, sebastian.reichel
  Cc: shawn.lin, linux-mmc, linux-kernel, hy50.seo, kwangwon.min

在 2026/02/13 星期五 11:08, ping.gao 写道:
> By using devm_clk_get_optional, if clk is optional for device and not define in dts
> it will return NULL, then clk_prepare_enable/clk_disable_unprepare for biu_clk is safe to
> bail out internally.
> 
> before biu_clk in dwmmc driver devm_clk_get fail, but it's ERR_PTR,
> not null,it will panic when call clk_prepare
> log is below:
> [7:   binder:436_2: 4998] Unable to handle kernel paging request at virtual address fffffffffffffffe
> [7:   binder:436_2: 4998] Mem abort info:
> [7:   binder:436_2: 4998]   ESR = 0x0000000096000005
> [7:   binder:436_2: 4998]   EC = 0x25: DABT (current EL), IL = 32 bits
> [7:   binder:436_2: 4998]   SET = 0, FnV = 0
> [7:   binder:436_2: 4998]   EA = 0, S1PTW = 0
> [7:   binder:436_2: 4998]   FSC = 0x05: level 1 translation fault
> ...
> [7:   binder:436_2: 4998] Call trace:
> [7:   binder:436_2: 4998]  clk_prepare+0x10/0x24
> [7:   binder:436_2: 4998]  dw_mci_runtime_resume+0x50/0x2d8 [dw_mmc_samsung cd210e210975263404c28fc89778f369f8398f0c]
> [7:   binder:436_2: 4998]  dw_mci_exynos_runtime_resume+0x18/0x58 [dw_mmc_exynos_samsung 2735a594c7c9c9e8c65b0b87523fbf70dcaabfff]
> [7:   binder:436_2: 4998]  pm_generic_runtime_resume+0x40/0x58
> [7:   binder:436_2: 4998]  pm_runtime_force_resume+0x9c/0x134
> [7:   binder:436_2: 4998]  platform_pm_resume+0x40/0x8c
> [7:   binder:436_2: 4998]  dpm_run_callback+0x64/0x230
> [7:   binder:436_2: 4998]  __device_resume+0x1d8/0x394
> [7:   binder:436_2: 4998]  dpm_resume+0x110/0x2b8
> [7:   binder:436_2: 4998]  dpm_resume_end+0x1c/0x38
> [7:   binder:436_2: 4998]  suspend_devices_and_enter+0x828/0xab0
> [7:   binder:436_2: 4998]  pm_suspend+0x334/0x618
> [7:   binder:436_2: 4998]  state_store+0x104/0x144
> [7:   binder:436_2: 4998]  kobj_attr_store+0x30/0x48
> [7:   binder:436_2: 4998]  sysfs_kf_write+0x54/0x6c
> [7:   binder:436_2: 4998]  kernfs_fop_write_iter+0x104/0x1a8
> [7:   binder:436_2: 4998]  vfs_write+0x24c/0x2f4
> [7:   binder:436_2: 4998]  ksys_write+0x78/0xe8
> [7:   binder:436_2: 4998]  __arm64_sys_write+0x1c/0x2c
> [7:   binder:436_2: 4998]  invoke_syscall+0x58/0x114
> [7:   binder:436_2: 4998]  el0_svc_common+0xac/0xe0
> [7:   binder:436_2: 4998]  do_el0_svc+0x1c/0x28
> [7:   binder:436_2: 4998]  el0_svc+0x38/0x68
> [7:   binder:436_2: 4998]  el0t_64_sync_handler+0x68/0xbc
> [7:   binder:436_2: 4998]  el0t_64_sync+0x1a8/0x1ac
> 

Acked-by: Shawn Lin <shawn.lin@rock-chips.com>

> Signed-off-by: ping.gao <ping.gao@samsung.com>
> ---
>   drivers/mmc/host/dw_mmc.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index c5db92bbb094..6bcc1e7233c0 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -3375,7 +3375,7 @@ int dw_mci_probe(struct dw_mci *host)
>   					     "platform data not available\n");
>   	}
>   
> -	host->biu_clk = devm_clk_get(host->dev, "biu");
> +	host->biu_clk = devm_clk_get_optional(host->dev, "biu");
>   	if (IS_ERR(host->biu_clk)) {
>   		dev_dbg(host->dev, "biu clock not available\n");
>   		ret = PTR_ERR(host->biu_clk);
> 

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v2 2/3] mmc: dw_mmc-k3: before set biu_clk rate, check biu_clk available or not
  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
  0 siblings, 0 replies; 26+ messages in thread
From: Shawn Lin @ 2026-02-13  3:30 UTC (permalink / raw)
  To: ping.gao, ulf.hansson, jh80.chung, sebastian.reichel
  Cc: shawn.lin, linux-mmc, linux-kernel, hy50.seo, kwangwon.min


在 2026/02/13 星期五 11:08, ping.gao 写道:
> if biu_clk not available, shouldn't set_rate or get_rate
> 

I would rephrase something like this:
If biu_clk is not available, no need to try to set and get
rate of it, just bail out and print a warning.

> Signed-off-by: ping.gao <ping.gao@samsung.com>
> ---
>   drivers/mmc/host/dw_mmc-k3.c | 5 +++++
>   1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/mmc/host/dw_mmc-k3.c b/drivers/mmc/host/dw_mmc-k3.c
> index ad6aa1aea549..9c68e162b373 100644
> --- a/drivers/mmc/host/dw_mmc-k3.c
> +++ b/drivers/mmc/host/dw_mmc-k3.c
> @@ -190,6 +190,11 @@ static void dw_mci_hi6220_set_ios(struct dw_mci *host, struct mmc_ios *ios)
>   	int ret;
>   	unsigned int clock;
>   
> +	if (IS_ERR_OR_NULL(host->biu_clk)) {
> +		dev_warn(host->dev, "biu_clk not available\n");

dev_err(host->dev, "biu_clk is not available\n");

Should be a error for k3 driver as it needs biu_clk.

> +		return;
> +	}
> +
>   	clock = (ios->clock <= 25000000) ? 25000000 : ios->clock;
>   
>   	ret = clk_set_rate(host->biu_clk, clock);
> 

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [PATCH v3 1/3] dt-bindings: mmc: synopsys-dw-mshc: No need to enforce setting two clocks
       [not found] <CGME20260123085150epcas5p42f2cc04843ae7657380b2968261246cb@epcas5p4.samsung.com>
                   ` (5 preceding siblings ...)
  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  5:34 ` 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
                   ` (5 subsequent siblings)
  12 siblings, 1 reply; 26+ messages in thread
From: ping.gao @ 2026-02-13  5:34 UTC (permalink / raw)
  To: shawn.lin, ulf.hansson, jh80.chung, sebastian.reichel, ping.gao
  Cc: linux-mmc, linux-kernel, hy50.seo, kwangwon.min

mmc biu_clk don't have to be set

Signed-off-by: ping.gao <ping.gao@samsung.com>
---
 Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.yaml b/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.yaml
index a6292777e376..6617d644f08d 100644
--- a/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.yaml
+++ b/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.yaml
@@ -24,7 +24,7 @@ properties:
     maxItems: 1
 
   clocks:
-    minItems: 2
+    minItems: 1
     maxItems: 2
     description:
       Handle to "biu" and "ciu" clocks for the
-- 
2.50.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v3 2/3] mmc: dw_mmc-k3: before set biu_clk rate, check biu_clk available or not
       [not found] <CGME20260123085150epcas5p42f2cc04843ae7657380b2968261246cb@epcas5p4.samsung.com>
                   ` (6 preceding siblings ...)
  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  5:34 ` ping.gao
  2026-02-13  5:34 ` [PATCH v3 3/3] mmc: dw_mmc: Using devm_clk_get_optional() for biu_clk ping.gao
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 26+ messages in thread
From: ping.gao @ 2026-02-13  5:34 UTC (permalink / raw)
  To: shawn.lin, ulf.hansson, jh80.chung, sebastian.reichel, ping.gao
  Cc: linux-mmc, linux-kernel, hy50.seo, kwangwon.min

If biu_clk is not available, no need try to set and get
rate of it, just bail out and print a warning

Signed-off-by: ping.gao <ping.gao@samsung.com>
---
 drivers/mmc/host/dw_mmc-k3.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/mmc/host/dw_mmc-k3.c b/drivers/mmc/host/dw_mmc-k3.c
index ad6aa1aea549..ccb6bfe3e0ce 100644
--- a/drivers/mmc/host/dw_mmc-k3.c
+++ b/drivers/mmc/host/dw_mmc-k3.c
@@ -190,6 +190,11 @@ static void dw_mci_hi6220_set_ios(struct dw_mci *host, struct mmc_ios *ios)
 	int ret;
 	unsigned int clock;
 
+	if (IS_ERR_OR_NULL(host->biu_clk)) {
+		dev_err(host->dev, "biu_clk not available\n");
+		return;
+	}
+
 	clock = (ios->clock <= 25000000) ? 25000000 : ios->clock;
 
 	ret = clk_set_rate(host->biu_clk, clock);
-- 
2.50.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v3 3/3] mmc: dw_mmc: Using devm_clk_get_optional() for biu_clk
       [not found] <CGME20260123085150epcas5p42f2cc04843ae7657380b2968261246cb@epcas5p4.samsung.com>
                   ` (7 preceding siblings ...)
  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 ` 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
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 26+ messages in thread
From: ping.gao @ 2026-02-13  5:34 UTC (permalink / raw)
  To: shawn.lin, ulf.hansson, jh80.chung, sebastian.reichel, ping.gao
  Cc: linux-mmc, linux-kernel, hy50.seo, kwangwon.min

By using devm_clk_get_optional, if clk is optional for device and not define in dts
it will return NULL, then clk_prepare_enable/clk_disable_unprepare for biu_clk is safe to
bail out internally.

before biu_clk in dwmmc driver devm_clk_get fail, but it's ERR_PTR,
not null,it will panic when call clk_prepare
log is below:
[7:   binder:436_2: 4998] Unable to handle kernel paging request at virtual address fffffffffffffffe
[7:   binder:436_2: 4998] Mem abort info:
[7:   binder:436_2: 4998]   ESR = 0x0000000096000005
[7:   binder:436_2: 4998]   EC = 0x25: DABT (current EL), IL = 32 bits
[7:   binder:436_2: 4998]   SET = 0, FnV = 0
[7:   binder:436_2: 4998]   EA = 0, S1PTW = 0
[7:   binder:436_2: 4998]   FSC = 0x05: level 1 translation fault
...
[7:   binder:436_2: 4998] Call trace:
[7:   binder:436_2: 4998]  clk_prepare+0x10/0x24
[7:   binder:436_2: 4998]  dw_mci_runtime_resume+0x50/0x2d8 [dw_mmc_samsung cd210e210975263404c28fc89778f369f8398f0c]
[7:   binder:436_2: 4998]  dw_mci_exynos_runtime_resume+0x18/0x58 [dw_mmc_exynos_samsung 2735a594c7c9c9e8c65b0b87523fbf70dcaabfff]
[7:   binder:436_2: 4998]  pm_generic_runtime_resume+0x40/0x58
[7:   binder:436_2: 4998]  pm_runtime_force_resume+0x9c/0x134
[7:   binder:436_2: 4998]  platform_pm_resume+0x40/0x8c
[7:   binder:436_2: 4998]  dpm_run_callback+0x64/0x230
[7:   binder:436_2: 4998]  __device_resume+0x1d8/0x394
[7:   binder:436_2: 4998]  dpm_resume+0x110/0x2b8
[7:   binder:436_2: 4998]  dpm_resume_end+0x1c/0x38
[7:   binder:436_2: 4998]  suspend_devices_and_enter+0x828/0xab0
[7:   binder:436_2: 4998]  pm_suspend+0x334/0x618
[7:   binder:436_2: 4998]  state_store+0x104/0x144
[7:   binder:436_2: 4998]  kobj_attr_store+0x30/0x48
[7:   binder:436_2: 4998]  sysfs_kf_write+0x54/0x6c
[7:   binder:436_2: 4998]  kernfs_fop_write_iter+0x104/0x1a8
[7:   binder:436_2: 4998]  vfs_write+0x24c/0x2f4
[7:   binder:436_2: 4998]  ksys_write+0x78/0xe8
[7:   binder:436_2: 4998]  __arm64_sys_write+0x1c/0x2c
[7:   binder:436_2: 4998]  invoke_syscall+0x58/0x114
[7:   binder:436_2: 4998]  el0_svc_common+0xac/0xe0
[7:   binder:436_2: 4998]  do_el0_svc+0x1c/0x28
[7:   binder:436_2: 4998]  el0_svc+0x38/0x68
[7:   binder:436_2: 4998]  el0t_64_sync_handler+0x68/0xbc
[7:   binder:436_2: 4998]  el0t_64_sync+0x1a8/0x1ac

Signed-off-by: ping.gao <ping.gao@samsung.com>
---
 drivers/mmc/host/dw_mmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index c5db92bbb094..6bcc1e7233c0 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -3375,7 +3375,7 @@ int dw_mci_probe(struct dw_mci *host)
 					     "platform data not available\n");
 	}
 
-	host->biu_clk = devm_clk_get(host->dev, "biu");
+	host->biu_clk = devm_clk_get_optional(host->dev, "biu");
 	if (IS_ERR(host->biu_clk)) {
 		dev_dbg(host->dev, "biu clock not available\n");
 		ret = PTR_ERR(host->biu_clk);
-- 
2.50.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* Re: [PATCH v2 3/3] dt-bindings: mmc: synopsys-dw-mshc: clk is not a must of two
  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
  1 sibling, 0 replies; 26+ messages in thread
From: Krzysztof Kozlowski @ 2026-02-13  7:37 UTC (permalink / raw)
  To: ping.gao, shawn.lin, ulf.hansson, jh80.chung, sebastian.reichel
  Cc: linux-mmc, linux-kernel, hy50.seo, kwangwon.min

On 13/02/2026 04:09, ping.gao wrote:
> mmc biu and ciu clk don't have to be set

This makes no sense, you changed nothing.

Please use scripts/get_maintainers.pl to get a list of necessary people
and lists to CC. It might happen, that command when run on an older
kernel, gives you outdated entries. Therefore please be sure you base
your patches on recent Linux kernel.

Tools like b4 or scripts/get_maintainer.pl provide you proper list of
people, so fix your workflow. Tools might also fail if you work on some
ancient tree (don't, instead use mainline) or work on fork of kernel
(don't, instead use mainline). Just use b4 and everything should be
fine, although remember about `b4 prep --auto-to-cc` if you added new
patches to the patchset.

You missed at least devicetree list (maybe more), so this won't be
tested by automated tooling. Performing review on untested code might be
a waste of time.

Please kindly resend and include all necessary To/Cc entries.

Do not attach (thread) your patchsets to some other threads (unrelated
or older versions). This buries them deep in the mailbox and might
interfere with applying entire sets. See also:
https://elixir.bootlin.com/linux/v6.16-rc2/source/Documentation/process/submitting-patches.rst#L830

> 
> Signed-off-by: ping.gao <ping.gao@samsung.com>

Use real name.


> ---
Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v3 1/3] dt-bindings: mmc: synopsys-dw-mshc: No need to enforce setting two clocks
  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
  0 siblings, 0 replies; 26+ messages in thread
From: Krzysztof Kozlowski @ 2026-02-13  7:37 UTC (permalink / raw)
  To: ping.gao, shawn.lin, ulf.hansson, jh80.chung, sebastian.reichel
  Cc: linux-mmc, linux-kernel, hy50.seo, kwangwon.min

On 13/02/2026 06:34, ping.gao wrote:
> mmc biu_clk don't have to be set
> 
> Signed-off-by: ping.gao <ping.gao@samsung.com>

No, stop sending multiple versions same day and attaching them next to
each other. It's so difficult to spot v3, I already applied to v2.

NAK, read v2 feedback.

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [PATCH v3 1/3] mmc: dw_mmc-k3: before set biu_clk rate, check biu_clk available or not
       [not found] <CGME20260123085150epcas5p42f2cc04843ae7657380b2968261246cb@epcas5p4.samsung.com>
                   ` (8 preceding siblings ...)
  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 ` ping.gao
  2026-02-26  9:10 ` [PATCH v3 2/3] mmc: dw_mmc: Using devm_clk_get_optional() for biu_clk ping.gao
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 26+ messages in thread
From: ping.gao @ 2026-02-26  9:09 UTC (permalink / raw)
  To: shawn.lin, ulf.hansson, jh80.chung, krzk+dt, conor+dt, robh
  Cc: linux-mmc, linux-kernel, devicetree, hy50.seo, kwangwon.min,
	ping.gao

If biu_clk is not available, no need to try to set and get
rate of it, just bail out and print a warning

Signed-off-by: ping.gao <ping.gao@samsung.com>
---
 drivers/mmc/host/dw_mmc-k3.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/mmc/host/dw_mmc-k3.c b/drivers/mmc/host/dw_mmc-k3.c
index ad6aa1aea549..ccb6bfe3e0ce 100644
--- a/drivers/mmc/host/dw_mmc-k3.c
+++ b/drivers/mmc/host/dw_mmc-k3.c
@@ -190,6 +190,11 @@ static void dw_mci_hi6220_set_ios(struct dw_mci *host, struct mmc_ios *ios)
 	int ret;
 	unsigned int clock;
 
+	if (IS_ERR_OR_NULL(host->biu_clk)) {
+		dev_err(host->dev, "biu_clk not available\n");
+		return;
+	}
+
 	clock = (ios->clock <= 25000000) ? 25000000 : ios->clock;
 
 	ret = clk_set_rate(host->biu_clk, clock);
-- 
2.50.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v3 2/3] mmc: dw_mmc: Using devm_clk_get_optional() for biu_clk
       [not found] <CGME20260123085150epcas5p42f2cc04843ae7657380b2968261246cb@epcas5p4.samsung.com>
                   ` (9 preceding siblings ...)
  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 ` 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-28  3:13 ` ping.gao
  12 siblings, 0 replies; 26+ messages in thread
From: ping.gao @ 2026-02-26  9:10 UTC (permalink / raw)
  To: shawn.lin, ulf.hansson, jh80.chung, krzk+dt, conor+dt, robh
  Cc: linux-mmc, linux-kernel, devicetree, hy50.seo, kwangwon.min,
	ping.gao

By using devm_clk_get_optional, if clk is optional for device and not define in dts
it will return NULL, then clk_prepare_enable/clk_disable_unprepare for biu_clk is safe to
bail out internally.

before biu_clk in dwmmc driver devm_clk_get fail, but it's ERR_PTR,
not null,it will panic when call clk_prepare
log is below:
[7:   binder:436_2: 4998] Unable to handle kernel paging request at virtual address fffffffffffffffe
[7:   binder:436_2: 4998] Mem abort info:
[7:   binder:436_2: 4998]   ESR = 0x0000000096000005
[7:   binder:436_2: 4998]   EC = 0x25: DABT (current EL), IL = 32 bits
[7:   binder:436_2: 4998]   SET = 0, FnV = 0
[7:   binder:436_2: 4998]   EA = 0, S1PTW = 0
[7:   binder:436_2: 4998]   FSC = 0x05: level 1 translation fault
...
[7:   binder:436_2: 4998] Call trace:
[7:   binder:436_2: 4998]  clk_prepare+0x10/0x24
[7:   binder:436_2: 4998]  dw_mci_runtime_resume+0x50/0x2d8 [dw_mmc_samsung cd210e210975263404c28fc89778f369f8398f0c]
[7:   binder:436_2: 4998]  dw_mci_exynos_runtime_resume+0x18/0x58 [dw_mmc_exynos_samsung 2735a594c7c9c9e8c65b0b87523fbf70dcaabfff]
[7:   binder:436_2: 4998]  pm_generic_runtime_resume+0x40/0x58
[7:   binder:436_2: 4998]  pm_runtime_force_resume+0x9c/0x134
[7:   binder:436_2: 4998]  platform_pm_resume+0x40/0x8c
[7:   binder:436_2: 4998]  dpm_run_callback+0x64/0x230
[7:   binder:436_2: 4998]  __device_resume+0x1d8/0x394
[7:   binder:436_2: 4998]  dpm_resume+0x110/0x2b8
[7:   binder:436_2: 4998]  dpm_resume_end+0x1c/0x38
[7:   binder:436_2: 4998]  suspend_devices_and_enter+0x828/0xab0
[7:   binder:436_2: 4998]  pm_suspend+0x334/0x618
[7:   binder:436_2: 4998]  state_store+0x104/0x144
[7:   binder:436_2: 4998]  kobj_attr_store+0x30/0x48
[7:   binder:436_2: 4998]  sysfs_kf_write+0x54/0x6c
[7:   binder:436_2: 4998]  kernfs_fop_write_iter+0x104/0x1a8
[7:   binder:436_2: 4998]  vfs_write+0x24c/0x2f4
[7:   binder:436_2: 4998]  ksys_write+0x78/0xe8
[7:   binder:436_2: 4998]  __arm64_sys_write+0x1c/0x2c
[7:   binder:436_2: 4998]  invoke_syscall+0x58/0x114
[7:   binder:436_2: 4998]  el0_svc_common+0xac/0xe0
[7:   binder:436_2: 4998]  do_el0_svc+0x1c/0x28
[7:   binder:436_2: 4998]  el0_svc+0x38/0x68
[7:   binder:436_2: 4998]  el0t_64_sync_handler+0x68/0xbc
[7:   binder:436_2: 4998]  el0t_64_sync+0x1a8/0x1ac

Signed-off-by: ping.gao <ping.gao@samsung.com>
---
 drivers/mmc/host/dw_mmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index c5db92bbb094..6bcc1e7233c0 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -3375,7 +3375,7 @@ int dw_mci_probe(struct dw_mci *host)
 					     "platform data not available\n");
 	}
 
-	host->biu_clk = devm_clk_get(host->dev, "biu");
+	host->biu_clk = devm_clk_get_optional(host->dev, "biu");
 	if (IS_ERR(host->biu_clk)) {
 		dev_dbg(host->dev, "biu clock not available\n");
 		ret = PTR_ERR(host->biu_clk);
-- 
2.50.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v3 3/3] dt-bindings: mmc: synopsys-dw-mshc: No need to enforce setting two clocks
       [not found] <CGME20260123085150epcas5p42f2cc04843ae7657380b2968261246cb@epcas5p4.samsung.com>
                   ` (10 preceding siblings ...)
  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 ` ping.gao
  2026-02-27  7:50   ` Krzysztof Kozlowski
  2026-02-27  7:51   ` Krzysztof Kozlowski
  2026-02-28  3:13 ` ping.gao
  12 siblings, 2 replies; 26+ messages in thread
From: ping.gao @ 2026-02-26  9:10 UTC (permalink / raw)
  To: shawn.lin, ulf.hansson, jh80.chung, krzk+dt, conor+dt, robh
  Cc: linux-mmc, linux-kernel, devicetree, hy50.seo, kwangwon.min,
	ping.gao

The driver `dw_mmc.c` now treats the biu clock as optional, so the
binding can be relaxed to allow a single clock.
Signed-off-by: ping.gao <ping.gao@samsung.com>
---
 Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.yaml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.yaml b/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.yaml
index a6292777e376..7a02fb6f585b 100644
--- a/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.yaml
+++ b/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.yaml
@@ -24,11 +24,12 @@ properties:
     maxItems: 1
 
   clocks:
-    minItems: 2
+    minItems: 1
     maxItems: 2
     description:
       Handle to "biu" and "ciu" clocks for the
       bus interface unit clock and the card interface unit clock.
+      If only one clock is present it must be "ciu" clock.
 
   clock-names:
     items:
-- 
2.50.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* Re: [PATCH v3 3/3] dt-bindings: mmc: synopsys-dw-mshc: No need to enforce setting two clocks
  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
  1 sibling, 1 reply; 26+ messages in thread
From: Krzysztof Kozlowski @ 2026-02-27  7:50 UTC (permalink / raw)
  To: ping.gao
  Cc: shawn.lin, ulf.hansson, jh80.chung, krzk+dt, conor+dt, robh,
	linux-mmc, linux-kernel, devicetree, hy50.seo, kwangwon.min

On Thu, Feb 26, 2026 at 05:10:51PM +0800, ping.gao wrote:
> The driver `dw_mmc.c` now treats the biu clock as optional, so the
> binding can be relaxed to allow a single clock.

Not sufficient, bring also arguments in terms of hardware. If the
hardware needs biu, then this is wrong.

Missing blank line.

> Signed-off-by: ping.gao <ping.gao@samsung.com>

Are you sure your name includes "." or you just use login as name?

> ---
>  Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.yaml | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.yaml b/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.yaml
> index a6292777e376..7a02fb6f585b 100644
> --- a/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.yaml
> +++ b/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.yaml
> @@ -24,11 +24,12 @@ properties:
>      maxItems: 1
>  
>    clocks:
> -    minItems: 2
> +    minItems: 1
>      maxItems: 2
>      description:
>        Handle to "biu" and "ciu" clocks for the
>        bus interface unit clock and the card interface unit clock.
> +      If only one clock is present it must be "ciu" clock.

Drop, don't repeat the schema.

>  
>    clock-names:
>      items:

De-synced with clock-names, so not really tested.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v3 3/3] dt-bindings: mmc: synopsys-dw-mshc: No need to enforce setting two clocks
  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:51   ` Krzysztof Kozlowski
  2026-02-27  7:53     ` Krzysztof Kozlowski
  1 sibling, 1 reply; 26+ messages in thread
From: Krzysztof Kozlowski @ 2026-02-27  7:51 UTC (permalink / raw)
  To: ping.gao
  Cc: shawn.lin, ulf.hansson, jh80.chung, krzk+dt, conor+dt, robh,
	linux-mmc, linux-kernel, devicetree, hy50.seo, kwangwon.min

On Thu, Feb 26, 2026 at 05:10:51PM +0800, ping.gao wrote:
> The driver `dw_mmc.c` now treats the biu clock as optional, so the
> binding can be relaxed to allow a single clock.
> Signed-off-by: ping.gao <ping.gao@samsung.com>
> ---
>  Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.yaml | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

What is this mess in threading? I see here bunch of 15 emails all mixed
up?

Do not attach (thread) your patchsets to some other threads (unrelated
or older versions). This buries them deep in the mailbox and might
interfere with applying entire sets. See also:
https://elixir.bootlin.com/linux/v6.16-rc2/source/Documentation/process/submitting-patches.rst#L830

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v3 3/3] dt-bindings: mmc: synopsys-dw-mshc: No need to enforce setting two clocks
  2026-02-27  7:50   ` Krzysztof Kozlowski
@ 2026-02-27  7:52     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 26+ messages in thread
From: Krzysztof Kozlowski @ 2026-02-27  7:52 UTC (permalink / raw)
  To: ping.gao
  Cc: shawn.lin, ulf.hansson, jh80.chung, krzk+dt, conor+dt, robh,
	linux-mmc, linux-kernel, devicetree, hy50.seo, kwangwon.min

On 27/02/2026 08:50, Krzysztof Kozlowski wrote:
> On Thu, Feb 26, 2026 at 05:10:51PM +0800, ping.gao wrote:
>> The driver `dw_mmc.c` now treats the biu clock as optional, so the
>> binding can be relaxed to allow a single clock.
> 
> Not sufficient, bring also arguments in terms of hardware. If the
> hardware needs biu, then this is wrong.
> 
> Missing blank line.
> 
>> Signed-off-by: ping.gao <ping.gao@samsung.com>
> 
> Are you sure your name includes "." or you just use login as name?


And I already asked you this, so you completely ignored me!

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v3 3/3] dt-bindings: mmc: synopsys-dw-mshc: No need to enforce setting two clocks
  2026-02-27  7:51   ` Krzysztof Kozlowski
@ 2026-02-27  7:53     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 26+ messages in thread
From: Krzysztof Kozlowski @ 2026-02-27  7:53 UTC (permalink / raw)
  To: ping.gao
  Cc: shawn.lin, ulf.hansson, jh80.chung, krzk+dt, conor+dt, robh,
	linux-mmc, linux-kernel, devicetree, hy50.seo, kwangwon.min

On 27/02/2026 08:51, Krzysztof Kozlowski wrote:
> On Thu, Feb 26, 2026 at 05:10:51PM +0800, ping.gao wrote:
>> The driver `dw_mmc.c` now treats the biu clock as optional, so the
>> binding can be relaxed to allow a single clock.
>> Signed-off-by: ping.gao <ping.gao@samsung.com>
>> ---
>>  Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.yaml | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> What is this mess in threading? I see here bunch of 15 emails all mixed
> up?
> 
> Do not attach (thread) your patchsets to some other threads (unrelated
> or older versions). This buries them deep in the mailbox and might
> interfere with applying entire sets. See also:
> https://elixir.bootlin.com/linux/v6.16-rc2/source/Documentation/process/submitting-patches.rst#L830

Plus I found now that you ALREADY sent v3, so you made complete mess in
duplicate and wrongly attached postings.

Slow down and re-think what are you doing.

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v3 3/3] dt-bindings: mmc: synopsys-dw-mshc: No need to enforce setting two clocks
       [not found] <CGME20260123085150epcas5p42f2cc04843ae7657380b2968261246cb@epcas5p4.samsung.com>
                   ` (11 preceding siblings ...)
  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-28  3:13 ` ping.gao
  2026-02-28  9:46   ` Krzysztof Kozlowski
  12 siblings, 1 reply; 26+ messages in thread
From: ping.gao @ 2026-02-28  3:13 UTC (permalink / raw)
  To: krzk
  Cc: shawn.lin, ulf.hansson, krzk+dt, conor+dt, robh, jh80.chung,
	linux-mmc, linux-kernel, devicetree, hy50.seo, kwangwon.min,
	ping.gao

Hi Krzysztof,

My apologies for the messy threading and duplicate postings. I had a
misconfiguration in my mail client settings.

I will slow down, re-evaluate the hardware requirements, fix the YAML
schema synchronization, and send a clean v4 as a brand-new thread.

Best regards,
Ping Gao

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v3 3/3] dt-bindings: mmc: synopsys-dw-mshc: No need to enforce setting two clocks
  2026-02-28  3:13 ` ping.gao
@ 2026-02-28  9:46   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 26+ messages in thread
From: Krzysztof Kozlowski @ 2026-02-28  9:46 UTC (permalink / raw)
  To: ping.gao
  Cc: shawn.lin, ulf.hansson, krzk+dt, conor+dt, robh, jh80.chung,
	linux-mmc, linux-kernel, devicetree, hy50.seo, kwangwon.min

On 28/02/2026 04:13, ping.gao wrote:
> Hi Krzysztof,
> 
> My apologies for the messy threading and duplicate postings. I had a
> misconfiguration in my mail client settings.
> 
> I will slow down, re-evaluate the hardware requirements, fix the YAML
> schema synchronization, and send a clean v4 as a brand-new thread.

Respond inline - I have no clue which feedback you do address and which
one you decide to ignore. Judging by v4 you still ignore some.

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2026-02-28  9:47 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CGME20260123085150epcas5p42f2cc04843ae7657380b2968261246cb@epcas5p4.samsung.com>
2026-01-23  8:56 ` [PATCH] drivers: dw_mmc: Replace devm_clk_get with devm_clk_get_optional 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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox