Skip to content

Commit 13269dc

Browse files
TE-N-ShengjiuWangabelvesa
authored andcommitted
clk: imx: imx8mp: Fix SAI_MCLK_SEL definition
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: 6cd95f7 ("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]>
1 parent e4818d3 commit 13269dc

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

drivers/clk/imx/clk-imx8mp-audiomix.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,12 @@
1818

1919
#define CLKEN0 0x000
2020
#define CLKEN1 0x004
21-
#define SAI_MCLK_SEL(n) (0x300 + 4 * (n)) /* n in 0..5 */
21+
#define SAI1_MCLK_SEL 0x300
22+
#define SAI2_MCLK_SEL 0x304
23+
#define SAI3_MCLK_SEL 0x308
24+
#define SAI5_MCLK_SEL 0x30C
25+
#define SAI6_MCLK_SEL 0x310
26+
#define SAI7_MCLK_SEL 0x314
2227
#define PDM_SEL 0x318
2328
#define SAI_PLL_GNRL_CTL 0x400
2429

@@ -95,13 +100,13 @@ static const struct clk_parent_data clk_imx8mp_audiomix_pll_bypass_sels[] = {
95100
IMX8MP_CLK_AUDIOMIX_SAI##n##_MCLK1_SEL, {}, \
96101
clk_imx8mp_audiomix_sai##n##_mclk1_parents, \
97102
ARRAY_SIZE(clk_imx8mp_audiomix_sai##n##_mclk1_parents), \
98-
SAI_MCLK_SEL(n), 1, 0 \
103+
SAI##n##_MCLK_SEL, 1, 0 \
99104
}, { \
100105
"sai"__stringify(n)"_mclk2_sel", \
101106
IMX8MP_CLK_AUDIOMIX_SAI##n##_MCLK2_SEL, {}, \
102107
clk_imx8mp_audiomix_sai_mclk2_parents, \
103108
ARRAY_SIZE(clk_imx8mp_audiomix_sai_mclk2_parents), \
104-
SAI_MCLK_SEL(n), 4, 1 \
109+
SAI##n##_MCLK_SEL, 4, 1 \
105110
}, { \
106111
"sai"__stringify(n)"_ipg_cg", \
107112
IMX8MP_CLK_AUDIOMIX_SAI##n##_IPG, \

0 commit comments

Comments
 (0)