Skip to content

Commit aa69005

Browse files
dangowrtbebarino
authored andcommitted
clk: mediatek: mt7981-topckgen: flag SGM_REG_SEL as critical
Without the SGM_REG_SEL clock enabled the cpu freezes if trying to access registers used by MT7981 clock drivers itself. Mark SGM_REG_SEL as critical to make sure it is always enabled to prevent freezes on boot even if the Ethernet driver which prepares and enables the clock is not loaded or probed at a later point. Fixes: 813c3b5 ("clk: mediatek: add MT7981 clock support") Signed-off-by: Daniel Golle <[email protected]> Link: https://lore.kernel.org/r/fc157139e6b7f8dfb6430ac7191ba754027705e8.1708221995.git.daniel@makrotopia.org Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Signed-off-by: Stephen Boyd <[email protected]>
1 parent a65083f commit aa69005

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/clk/mediatek/clk-mt7981-topckgen.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -357,8 +357,9 @@ static const struct mtk_mux top_muxes[] = {
357357
MUX_GATE_CLR_SET_UPD(CLK_TOP_SGM_325M_SEL, "sgm_325m_sel",
358358
sgm_325m_parents, 0x050, 0x054, 0x058, 8, 1, 15,
359359
0x1C0, 21),
360-
MUX_GATE_CLR_SET_UPD(CLK_TOP_SGM_REG_SEL, "sgm_reg_sel", sgm_reg_parents,
361-
0x050, 0x054, 0x058, 16, 1, 23, 0x1C0, 22),
360+
MUX_GATE_CLR_SET_UPD_FLAGS(CLK_TOP_SGM_REG_SEL, "sgm_reg_sel", sgm_reg_parents,
361+
0x050, 0x054, 0x058, 16, 1, 23, 0x1C0, 22,
362+
CLK_IS_CRITICAL | CLK_SET_RATE_PARENT),
362363
MUX_GATE_CLR_SET_UPD(CLK_TOP_EIP97B_SEL, "eip97b_sel", eip97b_parents,
363364
0x050, 0x054, 0x058, 24, 3, 31, 0x1C0, 23),
364365
/* CLK_CFG_6 */

0 commit comments

Comments
 (0)