2019-09-26 01:18:02

by Eugen Hristev

[permalink] [raw]
Subject: [PATCH] clk: at91: sam9x60: fix programmable clock

From: Eugen Hristev <[email protected]>

The prescaler mask for sam9x60 must be 0xff (8 bits).
Being set to 0, means that we cannot set any prescaler, thus the
programmable clocks do not work (except the case with prescaler 0)
Set the mask accordingly in layout struct.

Fixes: 01e2113de9a5 ("clk: at91: add sam9x60 pmc driver")
Signed-off-by: Eugen Hristev <[email protected]>
---
drivers/clk/at91/sam9x60.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/clk/at91/sam9x60.c b/drivers/clk/at91/sam9x60.c
index 9790ddf..86238d5 100644
--- a/drivers/clk/at91/sam9x60.c
+++ b/drivers/clk/at91/sam9x60.c
@@ -43,6 +43,7 @@ static const struct clk_pll_characteristics upll_characteristics = {
};

static const struct clk_programmable_layout sam9x60_programmable_layout = {
+ .pres_mask = 0xff,
.pres_shift = 8,
.css_mask = 0x1f,
.have_slck_mck = 0,
--
2.7.4


2019-09-26 01:56:34

by Alexandre Belloni

[permalink] [raw]
Subject: Re: [PATCH] clk: at91: sam9x60: fix programmable clock

On 24/09/2019 10:39:09+0000, [email protected] wrote:
> From: Eugen Hristev <[email protected]>
>
> The prescaler mask for sam9x60 must be 0xff (8 bits).
> Being set to 0, means that we cannot set any prescaler, thus the
> programmable clocks do not work (except the case with prescaler 0)
> Set the mask accordingly in layout struct.
>
> Fixes: 01e2113de9a5 ("clk: at91: add sam9x60 pmc driver")
> Signed-off-by: Eugen Hristev <[email protected]>
Acked-by: Alexandre Belloni <[email protected]>

> ---
> drivers/clk/at91/sam9x60.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/clk/at91/sam9x60.c b/drivers/clk/at91/sam9x60.c
> index 9790ddf..86238d5 100644
> --- a/drivers/clk/at91/sam9x60.c
> +++ b/drivers/clk/at91/sam9x60.c
> @@ -43,6 +43,7 @@ static const struct clk_pll_characteristics upll_characteristics = {
> };
>
> static const struct clk_programmable_layout sam9x60_programmable_layout = {
> + .pres_mask = 0xff,
> .pres_shift = 8,
> .css_mask = 0x1f,
> .have_slck_mck = 0,
> --
> 2.7.4
>

--
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

2019-09-26 07:58:48

by Nicolas Ferre

[permalink] [raw]
Subject: Re: [PATCH] clk: at91: sam9x60: fix programmable clock

On 24/09/2019 at 12:39, Eugen Hristev - M18282 wrote:
> From: Eugen Hristev <[email protected]>
>
> The prescaler mask for sam9x60 must be 0xff (8 bits).
> Being set to 0, means that we cannot set any prescaler, thus the
> programmable clocks do not work (except the case with prescaler 0)
> Set the mask accordingly in layout struct.
>
> Fixes: 01e2113de9a5 ("clk: at91: add sam9x60 pmc driver")
> Signed-off-by: Eugen Hristev <[email protected]>

Acked-by: Nicolas Ferre <[email protected]>

Thanks Eugen. Best regards,
Nicolas

> ---
> drivers/clk/at91/sam9x60.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/clk/at91/sam9x60.c b/drivers/clk/at91/sam9x60.c
> index 9790ddf..86238d5 100644
> --- a/drivers/clk/at91/sam9x60.c
> +++ b/drivers/clk/at91/sam9x60.c
> @@ -43,6 +43,7 @@ static const struct clk_pll_characteristics upll_characteristics = {
> };
>
> static const struct clk_programmable_layout sam9x60_programmable_layout = {
> + .pres_mask = 0xff,
> .pres_shift = 8,
> .css_mask = 0x1f,
> .have_slck_mck = 0,
>


--
Nicolas Ferre

2019-10-03 21:01:25

by Stephen Boyd

[permalink] [raw]
Subject: Re: [PATCH] clk: at91: sam9x60: fix programmable clock

Quoting [email protected] (2019-09-24 03:39:09)
> From: Eugen Hristev <[email protected]>
>
> The prescaler mask for sam9x60 must be 0xff (8 bits).
> Being set to 0, means that we cannot set any prescaler, thus the
> programmable clocks do not work (except the case with prescaler 0)
> Set the mask accordingly in layout struct.
>
> Fixes: 01e2113de9a5 ("clk: at91: add sam9x60 pmc driver")
> Signed-off-by: Eugen Hristev <[email protected]>
> ---

Applied to clk-fixes