Skip to contentSkip to conversation

clk: at91: sam9x60: fix programmable clock

PATCH Applied [email protected] 4 participants 4 messages Sep 24, 2019 – Oct 3, 2019

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

PATCH 1/1 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")
---
 drivers/clk/at91/sam9x60.c | 1 +
 1 file changed, 1 insertion(+)
drivers/clk/at91/sam9x60.c +1 -0
index 9790ddf..86238d5 100644
@@ -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,
Signature · 1 line
2.7.4
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · 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")

Thanks Eugen. Best regards,
Nicolas

Quoted 17 lines
---
  drivers/clk/at91/sam9x60.c | 1 +
  1 file changed, 1 insertion(+)
drivers/clk/at91/sam9x60.c +1 -0
index 9790ddf..86238d5 100644
@@ -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,
Signature · 1 line
Nicolas Ferre
maintainer Acked-by on v1 1/1
#2 lore raw
In reply to [email protected]
Quoted 9 lines · 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")
Quoted 19 lines
---
 drivers/clk/at91/sam9x60.c | 1 +
 1 file changed, 1 insertion(+)
drivers/clk/at91/sam9x60.c +1 -0
index 9790ddf..86238d5 100644
@@ -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,
Signature · 1 line
2.7.4
Signature · 3 lines
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
maintainer Applied
#3 lore raw
In reply to [email protected]

Quoting [email protected] (2019-09-24 03:39:09)

Quoted 10 lines

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")

---

Applied to clk-fixes