* [PATCH] clk: mediatek: mt7981-topckgen: flag SGM_REG_SEL as critical
@ 2024-02-18 3:11 Daniel Golle
2024-02-19 12:33 ` AngeloGioacchino Del Regno
2024-02-22 4:55 ` Stephen Boyd
0 siblings, 2 replies; 3+ messages in thread
From: Daniel Golle @ 2024-02-18 3:11 UTC (permalink / raw)
To: Michael Turquette, Stephen Boyd, Matthias Brugger,
AngeloGioacchino Del Regno, Chen-Yu Tsai, Daniel Golle,
Krzysztof Kozlowski, Uwe Kleine-König, Rob Herring,
Jianhui Zhao, linux-clk, linux-kernel, linux-arm-kernel,
linux-mediatek
Cc: John Crispin, Steven Liu
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: 813c3b53b55b ("clk: mediatek: add MT7981 clock support")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
drivers/clk/mediatek/clk-mt7981-topckgen.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/clk/mediatek/clk-mt7981-topckgen.c b/drivers/clk/mediatek/clk-mt7981-topckgen.c
index 682f4ca9e89ad..493aa11d3a175 100644
--- a/drivers/clk/mediatek/clk-mt7981-topckgen.c
+++ b/drivers/clk/mediatek/clk-mt7981-topckgen.c
@@ -357,8 +357,9 @@ static const struct mtk_mux top_muxes[] = {
MUX_GATE_CLR_SET_UPD(CLK_TOP_SGM_325M_SEL, "sgm_325m_sel",
sgm_325m_parents, 0x050, 0x054, 0x058, 8, 1, 15,
0x1C0, 21),
- MUX_GATE_CLR_SET_UPD(CLK_TOP_SGM_REG_SEL, "sgm_reg_sel", sgm_reg_parents,
- 0x050, 0x054, 0x058, 16, 1, 23, 0x1C0, 22),
+ MUX_GATE_CLR_SET_UPD_FLAGS(CLK_TOP_SGM_REG_SEL, "sgm_reg_sel", sgm_reg_parents,
+ 0x050, 0x054, 0x058, 16, 1, 23, 0x1C0, 22,
+ CLK_IS_CRITICAL | CLK_SET_RATE_PARENT),
MUX_GATE_CLR_SET_UPD(CLK_TOP_EIP97B_SEL, "eip97b_sel", eip97b_parents,
0x050, 0x054, 0x058, 24, 3, 31, 0x1C0, 23),
/* CLK_CFG_6 */
--
2.43.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] clk: mediatek: mt7981-topckgen: flag SGM_REG_SEL as critical
2024-02-18 3:11 [PATCH] clk: mediatek: mt7981-topckgen: flag SGM_REG_SEL as critical Daniel Golle
@ 2024-02-19 12:33 ` AngeloGioacchino Del Regno
2024-02-22 4:55 ` Stephen Boyd
1 sibling, 0 replies; 3+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-02-19 12:33 UTC (permalink / raw)
To: Daniel Golle, Michael Turquette, Stephen Boyd, Matthias Brugger,
Chen-Yu Tsai, Krzysztof Kozlowski, Uwe Kleine-König,
Rob Herring, Jianhui Zhao, linux-clk, linux-kernel,
linux-arm-kernel, linux-mediatek
Cc: John Crispin, Steven Liu
Il 18/02/24 04:11, Daniel Golle ha scritto:
> 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: 813c3b53b55b ("clk: mediatek: add MT7981 clock support")
> Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] clk: mediatek: mt7981-topckgen: flag SGM_REG_SEL as critical
2024-02-18 3:11 [PATCH] clk: mediatek: mt7981-topckgen: flag SGM_REG_SEL as critical Daniel Golle
2024-02-19 12:33 ` AngeloGioacchino Del Regno
@ 2024-02-22 4:55 ` Stephen Boyd
1 sibling, 0 replies; 3+ messages in thread
From: Stephen Boyd @ 2024-02-22 4:55 UTC (permalink / raw)
To: AngeloGioacchino Del Regno, Chen-Yu Tsai, Daniel Golle,
Jianhui Zhao, Krzysztof Kozlowski, Matthias Brugger,
Michael Turquette, Rob Herring, Uwe Kleine-König,
linux-arm-kernel, linux-clk, linux-kernel, linux-mediatek
Cc: John Crispin, Steven Liu
Quoting Daniel Golle (2024-02-17 19:11:15)
> 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: 813c3b53b55b ("clk: mediatek: add MT7981 clock support")
> Signed-off-by: Daniel Golle <daniel@makrotopia.org>
> ---
Applied to clk-next
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-02-22 4:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-18 3:11 [PATCH] clk: mediatek: mt7981-topckgen: flag SGM_REG_SEL as critical Daniel Golle
2024-02-19 12:33 ` AngeloGioacchino Del Regno
2024-02-22 4:55 ` Stephen Boyd
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).