linux-mediatek.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clk: mediatek: mt8365: Fix inverted topclk operations
@ 2023-05-11 13:32 Markus Schneider-Pargmann
  2023-05-11 13:37 ` Alexandre Mergnat
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Markus Schneider-Pargmann @ 2023-05-11 13:32 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Matthias Brugger,
	AngeloGioacchino Del Regno
  Cc: linux-clk, linux-kernel, linux-arm-kernel, linux-mediatek,
	Markus Schneider-Pargmann, Alexandre Mergnat

The given operations are inverted for the wrong registers which makes
multiple of the mt8365 hardware units unusable. In my setup at least usb
did not work.

Fixed by swapping the operations with the inverted ones.

Reported-by: Alexandre Mergnat <amergnat@baylibre.com>
Fixes: 905b7430d3cc ("clk: mediatek: mt8365: Convert simple_gate to mtk_gate clocks")
Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com>
---
 drivers/clk/mediatek/clk-mt8365.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/clk/mediatek/clk-mt8365.c b/drivers/clk/mediatek/clk-mt8365.c
index 6b4e193f648d..6d785ec5754d 100644
--- a/drivers/clk/mediatek/clk-mt8365.c
+++ b/drivers/clk/mediatek/clk-mt8365.c
@@ -583,15 +583,15 @@ static const struct mtk_gate_regs top2_cg_regs = {
 
 #define GATE_TOP0(_id, _name, _parent, _shift)			\
 	GATE_MTK(_id, _name, _parent, &top0_cg_regs,		\
-		 _shift, &mtk_clk_gate_ops_no_setclr_inv)
+		 _shift, &mtk_clk_gate_ops_no_setclr)
 
 #define GATE_TOP1(_id, _name, _parent, _shift)			\
 	GATE_MTK(_id, _name, _parent, &top1_cg_regs,		\
-		 _shift, &mtk_clk_gate_ops_no_setclr)
+		 _shift, &mtk_clk_gate_ops_no_setclr_inv)
 
 #define GATE_TOP2(_id, _name, _parent, _shift)			\
 	GATE_MTK(_id, _name, _parent, &top2_cg_regs,		\
-		 _shift, &mtk_clk_gate_ops_no_setclr)
+		 _shift, &mtk_clk_gate_ops_no_setclr_inv)
 
 static const struct mtk_gate top_clk_gates[] = {
 	GATE_TOP0(CLK_TOP_CONN_32K, "conn_32k", "clk32k", 10),
-- 
2.40.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-05-26 16:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-11 13:32 [PATCH] clk: mediatek: mt8365: Fix inverted topclk operations Markus Schneider-Pargmann
2023-05-11 13:37 ` Alexandre Mergnat
2023-05-12 11:51 ` Matthias Brugger
2023-05-15 11:49   ` AngeloGioacchino Del Regno
2023-05-15 14:01     ` Markus Schneider-Pargmann
2023-05-15 14:17       ` AngeloGioacchino Del Regno
2023-05-23 11:46 ` Markus Schneider-Pargmann
2023-05-26 16:45   ` Kevin Hilman

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).