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

Stefan Wahren stefan.wahren at i2se.com
Sun Feb 28 10:04:57 PST 2016


Hi Martin,

> kernel at martin.sperl.org hat am 28. Februar 2016 um 16:36 geschrieben:
>
>
> From: Martin Sperl <kernel at martin.sperl.org>
>
> 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 <kernel at martin.sperl.org>

Fixes: 41691b8862e2 ("clk: bcm2835: Add support for programming the audio domain
clocks")

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



More information about the linux-arm-kernel mailing list