Thread (23 messages) 23 messages, 2 authors, 2016-02-28

[PATCH v5 03/20] clk: bcm2835: add locking to pll*_on/off methods

From: Stefan Wahren <hidden>
Date: 2016-02-28 18:04:57
Also in: linux-clk

Hi Martin,
kernel at martin.sperl.org hat am 28. Februar 2016 um 16:36 geschrieben:


From: Martin Sperl <redacted>

Add missing locking to:
* bcm2835_pll_on
* bcm2835_pll_off
* bcm2835_pll_divider_on
this should be obvious. Please explain the why.
Signed-off-by: Martin Sperl <redacted>
Fixes: 41691b8862e2 ("clk: bcm2835: Add support for programming the audio domain
clocks")
quoted hunk ↗ jump to hunk
---
drivers/clk/bcm/clk-bcm2835.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c
index 3aa3e7a..d999a13 100644
--- a/drivers/clk/bcm/clk-bcm2835.c
+++ b/drivers/clk/bcm/clk-bcm2835.c
@@ -910,12 +910,14 @@ static void bcm2835_pll_off(struct clk_hw *hw)
struct bcm2835_cprman *cprman = pll->cprman;
const struct bcm2835_pll_data *data = pll->data;

+ spin_lock(&cprman->regs_lock);
cprman_write(cprman, data->cm_ctrl_reg,
cprman_read(cprman, data->cm_ctrl_reg) |
CM_PLL_ANARST);
cprman_write(cprman, data->a2w_ctrl_reg,
cprman_read(cprman, data->a2w_ctrl_reg) |
A2W_PLL_CTRL_PWRDN);
+ spin_unlock(&cprman->regs_lock);
}
As i told please move this particular change into 01/20, the rest is okay.

Regards
Stefan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help