Commit 427400fc authored by Joel Stanley's avatar Joel Stanley Committed by Stephen Boyd

clk: ast2600: Fix enabling of clocks

The struct clk_ops enable callback for the aspeed gates mixes up the set
to clear and write to set registers.

Fixes: d3d04f6c ("clk: Add support for AST2600 SoC")
Reviewed-by: default avatarAndrew Jeffery <andrew@aj.id.au>
Signed-off-by: default avatarJoel Stanley <joel@jms.id.au>
Link: https://lkml.kernel.org/r/20191016131319.31318-1-joel@jms.id.auSigned-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent 658fd65c
...@@ -266,10 +266,11 @@ static int aspeed_g6_clk_enable(struct clk_hw *hw) ...@@ -266,10 +266,11 @@ static int aspeed_g6_clk_enable(struct clk_hw *hw)
/* Enable clock */ /* Enable clock */
if (gate->flags & CLK_GATE_SET_TO_DISABLE) { if (gate->flags & CLK_GATE_SET_TO_DISABLE) {
regmap_write(gate->map, get_clock_reg(gate), clk); /* Clock is clear to enable, so use set to clear register */
} else {
/* Use set to clear register */
regmap_write(gate->map, get_clock_reg(gate) + 0x04, clk); 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) { if (gate->reset_idx >= 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment