clk: imx8: Add dummy clk
authorPeng Fan <peng.fan@nxp.com>
Wed, 16 Oct 2024 07:50:29 +0000 (15:50 +0800)
committerFabio Estevam <festevam@gmail.com>
Fri, 18 Oct 2024 12:41:09 +0000 (09:41 -0300)
There is a dummy clk entry for i.MX8QM/QXP, so add the dummy clk enable
and get rate. Otherwise "__imx8_clk_enable(Invalid clk ID #0)".

Fixes: 76332fae769 ("mmc: fsl_esdhc_imx: Enable AHB/IPG clk with clk bulk API")
Reviewed-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Tested-by: Heiko Schocher <hs@denx.de>
drivers/clk/imx/clk-imx8qm.c
drivers/clk/imx/clk-imx8qxp.c

index 62fed7e..466d717 100644 (file)
@@ -48,6 +48,8 @@ ulong imx8_clk_get_rate(struct clk *clk)
        debug("%s(#%lu)\n", __func__, clk->id);
 
        switch (clk->id) {
+       case IMX8QM_CLK_DUMMY:
+               return 0;
        case IMX8QM_A53_DIV:
                resource = SC_R_A53;
                pm_clk = SC_PM_CLK_CPU;
@@ -264,6 +266,8 @@ int __imx8_clk_enable(struct clk *clk, bool enable)
        debug("%s(#%lu)\n", __func__, clk->id);
 
        switch (clk->id) {
+       case IMX8QM_CLK_DUMMY:
+               return 0;
        case IMX8QM_I2C0_IPG_CLK:
        case IMX8QM_I2C0_CLK:
        case IMX8QM_I2C0_DIV:
index 18bdc08..7909862 100644 (file)
@@ -51,6 +51,8 @@ ulong imx8_clk_get_rate(struct clk *clk)
        debug("%s(#%lu)\n", __func__, clk->id);
 
        switch (clk->id) {
+       case IMX8QXP_CLK_DUMMY:
+               return 0;
        case IMX8QXP_A35_DIV:
                resource = SC_R_A35;
                pm_clk = SC_PM_CLK_CPU;
@@ -248,6 +250,8 @@ int __imx8_clk_enable(struct clk *clk, bool enable)
        debug("%s(#%lu)\n", __func__, clk->id);
 
        switch (clk->id) {
+       case IMX8QXP_CLK_DUMMY:
+               return 0;
        case IMX8QXP_I2C0_CLK:
        case IMX8QXP_I2C0_IPG_CLK:
                resource = SC_R_I2C_0;