[PATCH] clk: meson: do not fail when setting SD_EMMC_x_CLK0

Ferass El Hafidi funderscore at postmarketos.org
Wed Apr 22 17:51:45 CEST 2026


Hi Neil,

On Wed, 22 Apr 2026 08:48, Neil Armstrong <neil.armstrong at linaro.org> wrote:
>Since Linux v7.0, the MMC controllers has the following properties:
>  assigned-clocks = <&clkc CLKID_SD_EMMC_x_CLK0>;
>  assigned-clock-rates = <24000000>;
>Which causes mmc controllers to fail in probe.
>
>Make sure we do not fail until we properly implement rate setup.
>
>Signed-off-by: Neil Armstrong <neil.armstrong at linaro.org>
>---

This works on my board, thank you! Here's my:

Tested-by: Ferass El Hafidi <funderscore at postmarketos.org> # on lepotato

> drivers/clk/meson/g12a.c | 5 +++++
> drivers/clk/meson/gxbb.c | 5 +++++
> 2 files changed, 10 insertions(+)
>
>diff --git a/drivers/clk/meson/g12a.c b/drivers/clk/meson/g12a.c
>index a7a42b2edb6..f33938e1419 100644
>--- a/drivers/clk/meson/g12a.c
>+++ b/drivers/clk/meson/g12a.c
>@@ -946,6 +946,11 @@ static ulong meson_clk_set_rate_by_id(struct clk *clk, unsigned long id,
> 	case CLKID_HDMI:
> 		return meson_clk_set_rate_by_id(clk, CLKID_HDMI_DIV,
> 						rate, current_rate);
>+	case CLKID_SD_EMMC_A_CLK0:
>+	case CLKID_SD_EMMC_B_CLK0:
>+	case CLKID_SD_EMMC_C_CLK0:
>+		/* TOFIX: implement rate set for MMC clocks */
>+		return 0;
> 	default:
> 		return -ENOENT;
> 	}
>diff --git a/drivers/clk/meson/gxbb.c b/drivers/clk/meson/gxbb.c
>index 218be45c2cb..bf46f4d50bc 100644
>--- a/drivers/clk/meson/gxbb.c
>+++ b/drivers/clk/meson/gxbb.c
>@@ -900,6 +900,11 @@ static ulong meson_clk_set_rate_by_id(struct clk *clk, unsigned long id,
> 	case CLKID_HDMI:
> 		return meson_clk_set_rate_by_id(clk, CLKID_HDMI_DIV,
> 						rate, current_rate);
>+	case CLKID_SD_EMMC_A_CLK0:
>+	case CLKID_SD_EMMC_B_CLK0:
>+	case CLKID_SD_EMMC_C_CLK0:
>+		/* TOFIX: implement rate set for MMC clocks */
>+		return 0;
> 	default:
> 		return -ENOENT;
> 	}
>
>---
>base-commit: 052988aa29bfd506d7ce207fbb3f5374a5dbecbb
>change-id: 20260422-u-boot-amlogic-test-6bd61f679c90
>
>Best regards,
>--  
>Neil Armstrong <neil.armstrong at linaro.org>
>

--
Best regards,
Ferass


More information about the U-Boot mailing list