All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/2] clk: bcm2835: Fix compiler warnings on 64-bit builds
@ 2016-04-13 20:05 ` Eric Anholt
  0 siblings, 0 replies; 14+ messages in thread
From: Eric Anholt @ 2016-04-13 20:05 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Eric Anholt <eric@anholt.net>
---

v2: no change
 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 4c0f1b504e2f..87616ded5bbe 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.8.0.rc3

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v2 1/2] clk: bcm2835: Fix compiler warnings on 64-bit builds
@ 2016-04-13 20:05 ` Eric Anholt
  0 siblings, 0 replies; 14+ messages in thread
From: Eric Anholt @ 2016-04-13 20:05 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>
---

v2: no change
 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 4c0f1b504e2f..87616ded5bbe 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.8.0.rc3

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v2 2/2] clk: bcm2835: Fix PLL poweron
  2016-04-13 20:05 ` Eric Anholt
@ 2016-04-13 20:05   ` Eric Anholt
  -1 siblings, 0 replies; 14+ messages in thread
From: Eric Anholt @ 2016-04-13 20:05 UTC (permalink / raw)
  To: linux-arm-kernel

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>
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(+)

diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c
index 87616ded5bbe..7a7970865c2d 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.8.0.rc3

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v2 2/2] clk: bcm2835: Fix PLL poweron
@ 2016-04-13 20:05   ` Eric Anholt
  0 siblings, 0 replies; 14+ messages in thread
From: Eric Anholt @ 2016-04-13 20:05 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>
Fixes: 41691b8862e2 ("clk: bcm2835: Add support for programming the audio domain clocks")
Cc: stable@vger.kernel.org
---

v2: add fixes tag

 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 87616ded5bbe..7a7970865c2d 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.8.0.rc3

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v2 1/2] clk: bcm2835: Fix compiler warnings on 64-bit builds
  2016-04-13 20:05 ` Eric Anholt
@ 2016-04-16  0:17   ` Stephen Boyd
  -1 siblings, 0 replies; 14+ messages in thread
From: Stephen Boyd @ 2016-04-16  0:17 UTC (permalink / raw)
  To: linux-arm-kernel

On 04/13, Eric Anholt wrote:
> Signed-off-by: Eric Anholt <eric@anholt.net>
> ---

Acked-by: Stephen Boyd <sboyd@codeaurora.org>

Or can I merge this? It wasn't addressed To: me so who knows.
-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2 1/2] clk: bcm2835: Fix compiler warnings on 64-bit builds
@ 2016-04-16  0:17   ` Stephen Boyd
  0 siblings, 0 replies; 14+ messages in thread
From: Stephen Boyd @ 2016-04-16  0:17 UTC (permalink / raw)
  Cc: linux-rpi-kernel, linux-arm-kernel, linux-kernel, Stephen Warren,
	Lee Jones, Michael Turquette

On 04/13, Eric Anholt wrote:
> Signed-off-by: Eric Anholt <eric@anholt.net>
> ---

Acked-by: Stephen Boyd <sboyd@codeaurora.org>

Or can I merge this? It wasn't addressed To: me so who knows.
-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH v2 2/2] clk: bcm2835: Fix PLL poweron
  2016-04-13 20:05   ` Eric Anholt
@ 2016-04-16  0:17     ` Stephen Boyd
  -1 siblings, 0 replies; 14+ messages in thread
From: Stephen Boyd @ 2016-04-16  0:17 UTC (permalink / raw)
  To: linux-arm-kernel

On 04/13, Eric Anholt wrote:
> 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>
> Fixes: 41691b8862e2 ("clk: bcm2835: Add support for programming the audio domain clocks")
> Cc: stable at vger.kernel.org
> ---

Acked-by: Stephen Boyd <sboyd@codeaurora.org>

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2 2/2] clk: bcm2835: Fix PLL poweron
@ 2016-04-16  0:17     ` Stephen Boyd
  0 siblings, 0 replies; 14+ messages in thread
From: Stephen Boyd @ 2016-04-16  0:17 UTC (permalink / raw)
  To: Eric Anholt
  Cc: linux-rpi-kernel, linux-arm-kernel, linux-kernel, Stephen Warren,
	Lee Jones, Michael Turquette, stable

On 04/13, Eric Anholt wrote:
> 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>
> Fixes: 41691b8862e2 ("clk: bcm2835: Add support for programming the audio domain clocks")
> Cc: stable@vger.kernel.org
> ---

Acked-by: Stephen Boyd <sboyd@codeaurora.org>

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH v2 1/2] clk: bcm2835: Fix compiler warnings on 64-bit builds
  2016-04-16  0:17   ` Stephen Boyd
@ 2016-04-18 17:44     ` Eric Anholt
  -1 siblings, 0 replies; 14+ messages in thread
From: Eric Anholt @ 2016-04-18 17:44 UTC (permalink / raw)
  To: linux-arm-kernel

Stephen Boyd <sboyd@codeaurora.org> writes:

> On 04/13, Eric Anholt wrote:
>> Signed-off-by: Eric Anholt <eric@anholt.net>
>> ---
>
> Acked-by: Stephen Boyd <sboyd@codeaurora.org>
>
> 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>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2 1/2] clk: bcm2835: Fix compiler warnings on 64-bit builds
@ 2016-04-18 17:44     ` Eric Anholt
  0 siblings, 0 replies; 14+ messages in thread
From: Eric Anholt @ 2016-04-18 17:44 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: linux-rpi-kernel, linux-arm-kernel, linux-kernel, Stephen Warren,
	Lee Jones, Michael Turquette

[-- Attachment #1: Type: text/plain, Size: 271 bytes --]

Stephen Boyd <sboyd@codeaurora.org> writes:

> On 04/13, Eric Anholt wrote:
>> Signed-off-by: Eric Anholt <eric@anholt.net>
>> ---
>
> Acked-by: Stephen Boyd <sboyd@codeaurora.org>
>
> Or can I merge this? It wasn't addressed To: me so who knows.

Yeah, please merge it.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH v2 1/2] clk: bcm2835: Fix compiler warnings on 64-bit builds
  2016-04-13 20:05 ` Eric Anholt
@ 2016-04-19 21:04   ` Stephen Boyd
  -1 siblings, 0 replies; 14+ messages in thread
From: Stephen Boyd @ 2016-04-19 21:04 UTC (permalink / raw)
  To: linux-arm-kernel

On 04/13, Eric Anholt wrote:
> Signed-off-by: Eric Anholt <eric@anholt.net>
> ---

Applied to clk-next

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2 1/2] clk: bcm2835: Fix compiler warnings on 64-bit builds
@ 2016-04-19 21:04   ` Stephen Boyd
  0 siblings, 0 replies; 14+ messages in thread
From: Stephen Boyd @ 2016-04-19 21:04 UTC (permalink / raw)
  To: Eric Anholt
  Cc: linux-rpi-kernel, Stephen Warren, Michael Turquette, Lee Jones,
	linux-kernel, linux-arm-kernel

On 04/13, Eric Anholt wrote:
> Signed-off-by: Eric Anholt <eric@anholt.net>
> ---

Applied to clk-next

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH v2 2/2] clk: bcm2835: Fix PLL poweron
  2016-04-13 20:05   ` Eric Anholt
@ 2016-04-19 21:04     ` Stephen Boyd
  -1 siblings, 0 replies; 14+ messages in thread
From: Stephen Boyd @ 2016-04-19 21:04 UTC (permalink / raw)
  To: linux-arm-kernel

On 04/13, Eric Anholt wrote:
> 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>
> Fixes: 41691b8862e2 ("clk: bcm2835: Add support for programming the audio domain clocks")
> Cc: stable at vger.kernel.org
> ---

Applied to clk-next

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2 2/2] clk: bcm2835: Fix PLL poweron
@ 2016-04-19 21:04     ` Stephen Boyd
  0 siblings, 0 replies; 14+ messages in thread
From: Stephen Boyd @ 2016-04-19 21:04 UTC (permalink / raw)
  To: Eric Anholt
  Cc: linux-rpi-kernel, Stephen Warren, Michael Turquette, Lee Jones,
	linux-kernel, stable, linux-arm-kernel

On 04/13, Eric Anholt wrote:
> 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>
> Fixes: 41691b8862e2 ("clk: bcm2835: Add support for programming the audio domain clocks")
> Cc: stable@vger.kernel.org
> ---

Applied to clk-next

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2016-04-19 21:04 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-13 20:05 [PATCH v2 1/2] clk: bcm2835: Fix compiler warnings on 64-bit builds Eric Anholt
2016-04-13 20:05 ` Eric Anholt
2016-04-13 20:05 ` [PATCH v2 2/2] clk: bcm2835: Fix PLL poweron Eric Anholt
2016-04-13 20:05   ` Eric Anholt
2016-04-16  0:17   ` Stephen Boyd
2016-04-16  0:17     ` Stephen Boyd
2016-04-19 21:04   ` Stephen Boyd
2016-04-19 21:04     ` Stephen Boyd
2016-04-16  0:17 ` [PATCH v2 1/2] clk: bcm2835: Fix compiler warnings on 64-bit builds Stephen Boyd
2016-04-16  0:17   ` Stephen Boyd
2016-04-18 17:44   ` Eric Anholt
2016-04-18 17:44     ` Eric Anholt
2016-04-19 21:04 ` Stephen Boyd
2016-04-19 21:04   ` Stephen Boyd

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.