2016-04-13 20:05:07

by Eric Anholt

[permalink] [raw]
Subject: [PATCH v2 1/2] clk: bcm2835: Fix compiler warnings on 64-bit builds

Signed-off-by: Eric Anholt <[email protected]>
---

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


2016-04-13 20:05:10

by Eric Anholt

[permalink] [raw]
Subject: [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.

Signed-off-by: Eric Anholt <[email protected]>
Fixes: 41691b8862e2 ("clk: bcm2835: Add support for programming the audio domain clocks")
Cc: [email protected]
---

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

2016-04-16 00:17:47

by Stephen Boyd

[permalink] [raw]
Subject: Re: [PATCH v2 1/2] clk: bcm2835: Fix compiler warnings on 64-bit builds

On 04/13, Eric Anholt wrote:
> Signed-off-by: Eric Anholt <[email protected]>
> ---

Acked-by: Stephen Boyd <[email protected]>

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

2016-04-16 00:18:05

by Stephen Boyd

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

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 <[email protected]>
> Fixes: 41691b8862e2 ("clk: bcm2835: Add support for programming the audio domain clocks")
> Cc: [email protected]
> ---

Acked-by: Stephen Boyd <[email protected]>

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

2016-04-18 17:45:00

by Eric Anholt

[permalink] [raw]
Subject: Re: [PATCH v2 1/2] clk: bcm2835: Fix compiler warnings on 64-bit builds

Stephen Boyd <[email protected]> writes:

> On 04/13, Eric Anholt wrote:
>> Signed-off-by: Eric Anholt <[email protected]>
>> ---
>
> Acked-by: Stephen Boyd <[email protected]>
>
> Or can I merge this? It wasn't addressed To: me so who knows.

Yeah, please merge it.


Attachments:
signature.asc (818.00 B)

2016-04-19 21:04:25

by Stephen Boyd

[permalink] [raw]
Subject: Re: [PATCH v2 1/2] clk: bcm2835: Fix compiler warnings on 64-bit builds

On 04/13, Eric Anholt wrote:
> Signed-off-by: Eric Anholt <[email protected]>
> ---

Applied to clk-next

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

2016-04-19 21:04:27

by Stephen Boyd

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

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 <[email protected]>
> Fixes: 41691b8862e2 ("clk: bcm2835: Add support for programming the audio domain clocks")
> Cc: [email protected]
> ---

Applied to clk-next

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