]> git.ipfire.org Git - thirdparty/u-boot.git/commit
clk: mediatek: add dummy clk enable/disable ops for apmixedsys clocks
authorWeijie Gao <weijie.gao@mediatek.com>
Tue, 6 May 2025 08:12:20 +0000 (16:12 +0800)
committerTom Rini <trini@konsulko.com>
Thu, 22 May 2025 19:55:05 +0000 (13:55 -0600)
commit1bf212129768d65a47145209c65bf37b6082d718
tree0c7f722e5aa944c5f8686b81a299db8cb8069f2c
parentd47af3aff5f8697d64720a6e1e01bf6e95d8a510
clk: mediatek: add dummy clk enable/disable ops for apmixedsys clocks

Starting from commit ac30d90f336 (clk: Ensure the parent clocks are enabled
while reparenting), MediaTek filogic platforms will crash on booting when
initializing mmc devices.

The root cause is that to simplify the code, we reused the topckgen ops for
apmixedsys clocks as they share the get_rate with topckgen clocks while the
clk enable/disable ops are not available for apmixedsys clocks.

Now that a clock will be enabled first before reparenting, we have to add
dummy enable/disable ops for apmixedsys to avoid unexpected behavior when
apmixedsys clocks are the parent clock of the to-be-reparenting clocks.

Fixes: 40746bf429d (clk: mediatek: add clock driver support for MediaTek MT7981 SoC)
Fixes: 37d5a9a29dc (clk: mediatek: add clock driver support for MediaTek MT7986 SoC)
Fixes: ece4e5804f5 (clk: mediatek: add clock driver support for MediaTek MT7987 SoC)
Fixes: 421436981a2 (clk: mediatek: add clock driver support for MediaTek MT7988 SoC)
Signed-off-by: Sam Shih <sam.shih@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
drivers/clk/mediatek/clk-mt7981.c
drivers/clk/mediatek/clk-mt7986.c
drivers/clk/mediatek/clk-mt7987.c
drivers/clk/mediatek/clk-mt7988.c
drivers/clk/mediatek/clk-mtk.c
drivers/clk/mediatek/clk-mtk.h