* [PATCH] clk: ast2600: Fix enabling of clocks
@ 2019-10-16 13:13 Joel Stanley
2019-10-28 23:40 ` Stephen Boyd
0 siblings, 1 reply; 2+ messages in thread
From: Joel Stanley @ 2019-10-16 13:13 UTC (permalink / raw)
To: Michael Turquette, Stephen Boyd, linux-clk, linux-kernel
Cc: linux-aspeed, Andrew Jeffery
The struct clk_ops enable callback for the aspeed gates mixes up the set
to clear and write to set registers.
Fixes: d3d04f6c330a ("clk: Add support for AST2600 SoC")
Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
Signed-off-by: Joel Stanley <joel@jms.id.au>
---
drivers/clk/clk-ast2600.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/clk/clk-ast2600.c b/drivers/clk/clk-ast2600.c
index 1c1bb39bb04e..b1318e6b655b 100644
--- a/drivers/clk/clk-ast2600.c
+++ b/drivers/clk/clk-ast2600.c
@@ -266,10 +266,11 @@ static int aspeed_g6_clk_enable(struct clk_hw *hw)
/* Enable clock */
if (gate->flags & CLK_GATE_SET_TO_DISABLE) {
- regmap_write(gate->map, get_clock_reg(gate), clk);
- } else {
- /* Use set to clear register */
+ /* Clock is clear to enable, so use set to clear register */
regmap_write(gate->map, get_clock_reg(gate) + 0x04, clk);
+ } else {
+ /* Clock is set to enable, so use write to set register */
+ regmap_write(gate->map, get_clock_reg(gate), clk);
}
if (gate->reset_idx >= 0) {
--
2.23.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] clk: ast2600: Fix enabling of clocks
2019-10-16 13:13 [PATCH] clk: ast2600: Fix enabling of clocks Joel Stanley
@ 2019-10-28 23:40 ` Stephen Boyd
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Boyd @ 2019-10-28 23:40 UTC (permalink / raw)
To: Joel Stanley, Michael Turquette, linux-clk, linux-kernel
Cc: linux-aspeed, Andrew Jeffery
Quoting Joel Stanley (2019-10-16 06:13:19)
> The struct clk_ops enable callback for the aspeed gates mixes up the set
> to clear and write to set registers.
>
> Fixes: d3d04f6c330a ("clk: Add support for AST2600 SoC")
> Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
> Signed-off-by: Joel Stanley <joel@jms.id.au>
> ---
Applied to clk-fixes
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-10-28 23:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-16 13:13 [PATCH] clk: ast2600: Fix enabling of clocks Joel Stanley
2019-10-28 23:40 ` 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).