aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBoris Brezillon <boris.brezillon@free-electrons.com>2016-12-01 14:27:21 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-01-09 02:32:18 -0500
commit05bc2071b11b0c422d36fae33e701cf297563f04 (patch)
treec55a59d1e48acc4d23b530f0d2b2a8abf02890dc
parentb6d666315b999df88a5fa5da65dda992dbe4556b (diff)
clk: bcm2835: Avoid overwriting the div info when disabling a pll_div clk
commit 68af4fa8f39b542a6cde7ac19518d88e9b3099dc upstream. bcm2835_pll_divider_off() is resetting the divider field in the A2W reg to zero when disabling the clock. Make sure we preserve this value by reading the previous a2w_reg value first and ORing the result with A2W_PLL_CHANNEL_DISABLE. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Fixes: 41691b8862e2 ("clk: bcm2835: Add support for programming the audio domain clocks") Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/clk/bcm/clk-bcm2835.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c
index 8c7763fd9efc..3bbd2a58db47 100644
--- a/drivers/clk/bcm/clk-bcm2835.c
+++ b/drivers/clk/bcm/clk-bcm2835.c
@@ -751,7 +751,9 @@ static void bcm2835_pll_divider_off(struct clk_hw *hw)
751 cprman_write(cprman, data->cm_reg, 751 cprman_write(cprman, data->cm_reg,
752 (cprman_read(cprman, data->cm_reg) & 752 (cprman_read(cprman, data->cm_reg) &
753 ~data->load_mask) | data->hold_mask); 753 ~data->load_mask) | data->hold_mask);
754 cprman_write(cprman, data->a2w_reg, A2W_PLL_CHANNEL_DISABLE); 754 cprman_write(cprman, data->a2w_reg,
755 cprman_read(cprman, data->a2w_reg) |
756 A2W_PLL_CHANNEL_DISABLE);
755 spin_unlock(&cprman->regs_lock); 757 spin_unlock(&cprman->regs_lock);
756} 758}
757 759