Skip to contentSkip to conversation

clk: bcm2835: Fix compiler warnings on 64-bit builds

PATCH Applied Eric Anholt 2 participants 7 messages Apr 13, 2016 – Apr 19, 2016

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 clk: bcm2835: Fix compiler warnings on 64-bit builds

---

v2: no change

 drivers/clk/bcm/clk-bcm2835.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/clk/bcm/clk-bcm2835.c +4 -4
index 4c0f1b504e2f..87616ded5bbe 100644
@@ -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,
Signature · 1 line
2.8.0.rc3
#1 lore raw

PATCH v2 2/2 clk: bcm2835: Fix PLL poweron

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.

Fixes 41691b8862e2 ("clk: bcm2835: Add support for programming the audio domain clocks")
Cc stable at vger.kernel.org

---

v2: add fixes tag

 drivers/clk/bcm/clk-bcm2835.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/clk/bcm/clk-bcm2835.c +4 -0
index 87616ded5bbe..7a7970865c2d 100644
@@ -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);
Signature · 1 line
2.8.0.rc3
Acked-by on v2 2/2
#2 lore raw

Re: [PATCH v2 2/2] clk: bcm2835: Fix PLL poweron

In reply to Eric Anholt
Quoted 9 lines · Eric Anholt

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.

Fixes 41691b8862e2 ("clk: bcm2835: Add support for programming the audio domain clocks")
Cc stable at vger.kernel.org

---

Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
#5 lore raw
In reply to Stephen Boyd
Quoted 7 lines · Stephen Boyd
Quoted 2 lines · Eric Anholt

---

Or can I merge this? It wasn't addressed To: me so who knows.

Yeah, please merge it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160418/cea3b85d/attachment.sig>

Applied
#3 lore raw

Re: [PATCH v2 2/2] clk: bcm2835: Fix PLL poweron

In reply to Eric Anholt
Quoted 9 lines · Eric Anholt

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.

Fixes 41691b8862e2 ("clk: bcm2835: Add support for programming the audio domain clocks")
Cc stable at vger.kernel.org

---

Applied to clk-next

Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project