Patch "clk: bcm2835: add locking to pll*_on/off methods" has been added to the 4.5-stable tree
Subsystems (4)
This is a note to let you know that I've just added the patch titled
clk: bcm2835: add locking to pll*_on/off methods
to the 4.5-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
clk-bcm2835-add-locking-to-pll-_on-off-methods.patch
and it can be found in the queue-4.5 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
ec36a5c6682fdd5328abf15c3c67281bed0241d7Mon Sep 17 00:00:00 2001
From: Martin Sperl <[email protected]>
Date: Mon, 29 Feb 2016 11:39:18 +0000
Subject: clk: bcm2835: add locking to pll*_on/off methods
From: Martin Sperl <[email protected]>
commit ec36a5c6682fdd5328abf15c3c67281bed0241d7 upstream.
Add missing locking to:
* bcm2835_pll_divider_on
* bcm2835_pll_divider_off
to protect the read modify write cycle for the register access protecting both cm_reg and a2w_reg registers.
audio domain clocks")
--- drivers/clk/bcm/clk-bcm2835.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/clk/bcm/clk-bcm2835.c +4 -0
@@ -1078,10 +1078,12 @@ static void bcm2835_pll_divider_off(strustruct bcm2835_cprman *cprman = divider->cprman;const struct bcm2835_pll_divider_data *data = divider->data; +spin_lock (&cprman->regs_lock);cprman_write (cprman, data->cm_reg, (cprman_read (cprman, data->cm_reg) & ~data->load_mask) | data->hold_mask);cprman_write (cprman, data->a2w_reg,A2W_PLL_CHANNEL_DISABLE ); +spin_unlock (&cprman->regs_lock); }static int bcm2835_pll_divider_on (struct clk_hw *hw)
@@ -1090,12 +1092,14 @@ static int bcm2835_pll_divider_on(structstruct bcm2835_cprman *cprman = divider->cprman;const struct bcm2835_pll_divider_data *data = divider->data; +spin_lock (&cprman->regs_lock);cprman_write (cprman, data->a2w_reg,cprman_read (cprman, data->a2w_reg) & ~A2W_PLL_CHANNEL_DISABLE );cprman_write (cprman, data->cm_reg,cprman_read (cprman, data->cm_reg) & ~data->hold_mask); +spin_unlock (&cprman->regs_lock);return 0 ; }
Patches currently in stable-queue which might be from [email protected] are
queue-4.5/clk-bcm2835-add-locking-to-pll-_on-off-methods.patch