]> Git Repo - linux.git/commitdiff
clk: imx: imx8mp: Fix SAI_MCLK_SEL definition
authorShengjiu Wang <[email protected]>
Fri, 23 Feb 2024 10:15:51 +0000 (18:15 +0800)
committerAbel Vesa <[email protected]>
Mon, 26 Feb 2024 09:05:58 +0000 (11:05 +0200)
There is SAI1, SAI2, SAI3, SAI5, SAI6, SAI7 existing in this block
control, the order is discontinuous. The definition of SAI_MCLK_SEL(n)
is not match with the usage of CLK_SAIn(n).

So define SAI##n##_MCLK_SEL separately to fix the issue.

Fixes: 6cd95f7b151c ("clk: imx: imx8mp: Add audiomix block control")
Signed-off-by: Shengjiu Wang <[email protected]>
Reviewed-by: Abel Vesa <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Abel Vesa <[email protected]>
drivers/clk/imx/clk-imx8mp-audiomix.c

index e4300df88f1acc04994a944596cd803c1d0c001b..55ed211a5e0b18f015ae66c9d75f2918a9e716aa 100644 (file)
 
 #define CLKEN0                 0x000
 #define CLKEN1                 0x004
-#define SAI_MCLK_SEL(n)                (0x300 + 4 * (n))       /* n in 0..5 */
+#define SAI1_MCLK_SEL          0x300
+#define SAI2_MCLK_SEL          0x304
+#define SAI3_MCLK_SEL          0x308
+#define SAI5_MCLK_SEL          0x30C
+#define SAI6_MCLK_SEL          0x310
+#define SAI7_MCLK_SEL          0x314
 #define PDM_SEL                        0x318
 #define SAI_PLL_GNRL_CTL       0x400
 
@@ -95,13 +100,13 @@ static const struct clk_parent_data clk_imx8mp_audiomix_pll_bypass_sels[] = {
                IMX8MP_CLK_AUDIOMIX_SAI##n##_MCLK1_SEL, {},             \
                clk_imx8mp_audiomix_sai##n##_mclk1_parents,             \
                ARRAY_SIZE(clk_imx8mp_audiomix_sai##n##_mclk1_parents), \
-               SAI_MCLK_SEL(n), 1, 0                                   \
+               SAI##n##_MCLK_SEL, 1, 0                                 \
        }, {                                                            \
                "sai"__stringify(n)"_mclk2_sel",                        \
                IMX8MP_CLK_AUDIOMIX_SAI##n##_MCLK2_SEL, {},             \
                clk_imx8mp_audiomix_sai_mclk2_parents,                  \
                ARRAY_SIZE(clk_imx8mp_audiomix_sai_mclk2_parents),      \
-               SAI_MCLK_SEL(n), 4, 1                                   \
+               SAI##n##_MCLK_SEL, 4, 1                                 \
        }, {                                                            \
                "sai"__stringify(n)"_ipg_cg",                           \
                IMX8MP_CLK_AUDIOMIX_SAI##n##_IPG,                       \
This page took 0.059095 seconds and 4 git commands to generate.