* [PATCH 0/2] minor bcm2835 clock fixes @ 2016-04-05 3:20 Eric Anholt 2016-04-05 3:20 ` [PATCH 1/2] clk: bcm2835: Fix compiler warnings on 64-bit builds Eric Anholt 2016-04-05 3:20 ` [PATCH 2/2] clk: bcm2835: Fix PLL poweron Eric Anholt 0 siblings, 2 replies; 5+ messages in thread From: Eric Anholt @ 2016-04-05 3:20 UTC (permalink / raw) To: linux-rpi-kernel Cc: linux-arm-kernel, linux-kernel, Stephen Warren, Lee Jones, Michael Turquette, Stephen Boyd, Eric Anholt Here are two little fixes for clk-bcm2835 from working on the arm64 port. I'm fine with both of them landing in -next. The PLL poweron is a bugfix even for non-arm64, but I haven't seen it get hit before (I needed to fail to include the pinctrl driver in order for the code path to trigger). Eric Anholt (2): clk: bcm2835: Fix compiler warnings on 64-bit builds clk: bcm2835: Fix PLL poweron drivers/clk/bcm/clk-bcm2835.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) -- 2.7.0 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] clk: bcm2835: Fix compiler warnings on 64-bit builds 2016-04-05 3:20 [PATCH 0/2] minor bcm2835 clock fixes Eric Anholt @ 2016-04-05 3:20 ` Eric Anholt 2016-04-05 3:20 ` [PATCH 2/2] clk: bcm2835: Fix PLL poweron Eric Anholt 1 sibling, 0 replies; 5+ messages in thread From: Eric Anholt @ 2016-04-05 3:20 UTC (permalink / raw) To: linux-rpi-kernel Cc: linux-arm-kernel, linux-kernel, Stephen Warren, Lee Jones, Michael Turquette, Stephen Boyd, Eric Anholt Signed-off-by: Eric Anholt <eric@anholt.net> --- drivers/clk/bcm/clk-bcm2835.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c index 4c0f1b5..87616de 100644 --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c @@ -400,17 +400,17 @@ struct bcm2835_pll_ana_bits { static const struct bcm2835_pll_ana_bits bcm2835_ana_default = { .mask0 = 0, .set0 = 0, - .mask1 = ~(A2W_PLL_KI_MASK | A2W_PLL_KP_MASK), + .mask1 = (u32)~(A2W_PLL_KI_MASK | A2W_PLL_KP_MASK), .set1 = (2 << A2W_PLL_KI_SHIFT) | (8 << A2W_PLL_KP_SHIFT), - .mask3 = ~A2W_PLL_KA_MASK, + .mask3 = (u32)~A2W_PLL_KA_MASK, .set3 = (2 << A2W_PLL_KA_SHIFT), .fb_prediv_mask = BIT(14), }; static const struct bcm2835_pll_ana_bits bcm2835_ana_pllh = { - .mask0 = ~(A2W_PLLH_KA_MASK | A2W_PLLH_KI_LOW_MASK), + .mask0 = (u32)~(A2W_PLLH_KA_MASK | A2W_PLLH_KI_LOW_MASK), .set0 = (2 << A2W_PLLH_KA_SHIFT) | (2 << A2W_PLLH_KI_LOW_SHIFT), - .mask1 = ~(A2W_PLLH_KI_HIGH_MASK | A2W_PLLH_KP_MASK), + .mask1 = (u32)~(A2W_PLLH_KI_HIGH_MASK | A2W_PLLH_KP_MASK), .set1 = (6 << A2W_PLLH_KP_SHIFT), .mask3 = 0, .set3 = 0, -- 2.7.0 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/2] clk: bcm2835: Fix PLL poweron 2016-04-05 3:20 [PATCH 0/2] minor bcm2835 clock fixes Eric Anholt 2016-04-05 3:20 ` [PATCH 1/2] clk: bcm2835: Fix compiler warnings on 64-bit builds Eric Anholt @ 2016-04-05 3:20 ` Eric Anholt 2016-04-05 20:52 ` Stefan Wahren 1 sibling, 1 reply; 5+ messages in thread From: Eric Anholt @ 2016-04-05 3:20 UTC (permalink / raw) To: linux-rpi-kernel Cc: linux-arm-kernel, linux-kernel, Stephen Warren, Lee Jones, Michael Turquette, Stephen Boyd, Eric Anholt, stable In poweroff, we set the reset bit and the power down bit, but only managed to unset the reset bit for poweron. This meant that if HDMI did -EPROBE_DEFER after it had grabbed its clocks, we'd power down the PLLH (that had been on at boot time) and never recover. Signed-off-by: Eric Anholt <eric@anholt.net> Cc: stable@vger.kernel.org --- drivers/clk/bcm/clk-bcm2835.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c index 87616de..7a79708 100644 --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c @@ -554,6 +554,10 @@ static int bcm2835_pll_on(struct clk_hw *hw) const struct bcm2835_pll_data *data = pll->data; ktime_t timeout; + cprman_write(cprman, data->a2w_ctrl_reg, + cprman_read(cprman, data->a2w_ctrl_reg) & + ~A2W_PLL_CTRL_PWRDN); + /* Take the PLL out of reset. */ cprman_write(cprman, data->cm_ctrl_reg, cprman_read(cprman, data->cm_ctrl_reg) & ~CM_PLL_ANARST); -- 2.7.0 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] clk: bcm2835: Fix PLL poweron 2016-04-05 3:20 ` [PATCH 2/2] clk: bcm2835: Fix PLL poweron Eric Anholt @ 2016-04-05 20:52 ` Stefan Wahren 2016-04-08 20:05 ` Eric Anholt 0 siblings, 1 reply; 5+ messages in thread From: Stefan Wahren @ 2016-04-05 20:52 UTC (permalink / raw) To: Eric Anholt, linux-rpi-kernel Cc: linux-kernel, Michael Turquette, Stephen Boyd, linux-arm-kernel Hi Eric, > Eric Anholt <eric@anholt.net> hat am 5. April 2016 um 05:20 geschrieben: > > > In poweroff, we set the reset bit and the power down bit, but only > managed to unset the reset bit for poweron. This meant that if HDMI > did -EPROBE_DEFER after it had grabbed its clocks, we'd power down the > PLLH (that had been on at boot time) and never recover. > > Signed-off-by: Eric Anholt <eric@anholt.net> > Cc: stable@vger.kernel.org please provide a Fixes tag. Thanks Stefan > --- > drivers/clk/bcm/clk-bcm2835.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c > index 87616de..7a79708 100644 > --- a/drivers/clk/bcm/clk-bcm2835.c > +++ b/drivers/clk/bcm/clk-bcm2835.c > @@ -554,6 +554,10 @@ static int bcm2835_pll_on(struct clk_hw *hw) > const struct bcm2835_pll_data *data = pll->data; > ktime_t timeout; > > + cprman_write(cprman, data->a2w_ctrl_reg, > + cprman_read(cprman, data->a2w_ctrl_reg) & > + ~A2W_PLL_CTRL_PWRDN); > + > /* Take the PLL out of reset. */ > cprman_write(cprman, data->cm_ctrl_reg, > cprman_read(cprman, data->cm_ctrl_reg) & ~CM_PLL_ANARST); > -- > 2.7.0 > > > _______________________________________________ > linux-rpi-kernel mailing list > linux-rpi-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-rpi-kernel ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] clk: bcm2835: Fix PLL poweron 2016-04-05 20:52 ` Stefan Wahren @ 2016-04-08 20:05 ` Eric Anholt 0 siblings, 0 replies; 5+ messages in thread From: Eric Anholt @ 2016-04-08 20:05 UTC (permalink / raw) To: Stefan Wahren, linux-rpi-kernel Cc: linux-kernel, Michael Turquette, Stephen Boyd, linux-arm-kernel [-- Attachment #1: Type: text/plain, Size: 656 bytes --] Stefan Wahren <stefan.wahren@i2se.com> writes: > Hi Eric, > >> Eric Anholt <eric@anholt.net> hat am 5. April 2016 um 05:20 geschrieben: >> >> >> In poweroff, we set the reset bit and the power down bit, but only >> managed to unset the reset bit for poweron. This meant that if HDMI >> did -EPROBE_DEFER after it had grabbed its clocks, we'd power down the >> PLLH (that had been on at boot time) and never recover. >> >> Signed-off-by: Eric Anholt <eric@anholt.net> >> Cc: stable@vger.kernel.org > > please provide a Fixes tag. > > Thanks Stefan That should be: Fixes: 41691b8862e2 ("clk: bcm2835: Add support for programming the audio domain clocks") [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 818 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-04-08 20:08 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2016-04-05 3:20 [PATCH 0/2] minor bcm2835 clock fixes Eric Anholt 2016-04-05 3:20 ` [PATCH 1/2] clk: bcm2835: Fix compiler warnings on 64-bit builds Eric Anholt 2016-04-05 3:20 ` [PATCH 2/2] clk: bcm2835: Fix PLL poweron Eric Anholt 2016-04-05 20:52 ` Stefan Wahren 2016-04-08 20:05 ` Eric Anholt
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®