Skip to contentSkip to conversation

clk: at91: sam9x60: support only two programmable clocks

PATCH Applied Claudiu Beznea 3 participants 3 messages Oct 14, 2020

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

PATCH 1/1 clk: at91: sam9x60: support only two programmable clocks

According to datasheet (Chapter 29.16.13, PMC Programmable Clock Register) there are only two programmable clocks on SAM9X60.

Fixes 01e2113de9a5 ("clk: at91: add sam9x60 pmc driver")
---
 drivers/clk/at91/sam9x60.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/at91/sam9x60.c +1 -1
index ab6318c0589e..3c4c95603595 100644
@@ -279,7 +279,7 @@ static void __init sam9x60_pmc_setup(struct device_node *np)
 	parent_names[3] = "masterck";
 	parent_names[4] = "pllack_divck";
 	parent_names[5] = "upllck_divck";
-	for (i = 0; i < 8; i++) {
+	for (i = 0; i < 2; i++) {
 		char name[6];
 
 		snprintf(name, sizeof(name), "prog%d", i);
Signature · 1 line
2.7.4
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Claudiu Beznea

According to datasheet (Chapter 29.16.13, PMC Programmable Clock Register) there are only two programmable clocks on SAM9X60.

Fixes 01e2113de9a5 ("clk: at91: add sam9x60 pmc driver")

This is a fix:

Cc <[email protected]> # v5.2+
Quoted 18 lines
---
  drivers/clk/at91/sam9x60.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/at91/sam9x60.c +1 -1
index ab6318c0589e..3c4c95603595 100644
@@ -279,7 +279,7 @@ static void __init sam9x60_pmc_setup(struct device_node *np)
  	parent_names[3] = "masterck";
  	parent_names[4] = "pllack_divck";
  	parent_names[5] = "upllck_divck";
-	for (i = 0; i < 8; i++) {
+	for (i = 0; i < 2; i++) {
  		char name[6];
 
  		snprintf(name, sizeof(name), "prog%d", i);
Signature · 1 line
Nicolas Ferre