Skip to contentSkip to conversation

clk: shmobile: fix setting paretn clock rate

PATCH New Ben Dooks 2 participants 2 messages Mar 31, 2014

Subsystems (2)
lore
Share & tools
lore

Ben Dooks

author
#0 lore raw

PATCH 1/1 clk: shmobile: fix setting paretn clock rate

If the driver needs to change a clock rate, then it must be propogated through the MSTP clock to the parent clock (such as shdi0 -> sd0). Without this we cannot up-rate default clocks which are really slow (such as the mmcif1 which defaults to 12MHz where it could be running at 97MHz)

---
 drivers/clk/shmobile/clk-mstp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/shmobile/clk-mstp.c +1 -1
index 7bfdcfc..9fc754b 100644
@@ -139,7 +139,7 @@ cpg_mstp_clock_register(const char *name, const char *parent_name,
 
 	init.name = name;
 	init.ops = &cpg_mstp_clock_ops;
-	init.flags = CLK_IS_BASIC;
+	init.flags = CLK_IS_BASIC | CLK_SET_RATE_PARENT;
 	init.parent_names = &parent_name;
 	init.num_parents = 1;
 
Signature · 1 line
1.9.0
#1 lore raw

PATCH 1/1 clk: shmobile: fix setting paretn clock rate

Quoting Ben Dooks (2014-03-31 10:47:27)

Quoted 6 lines

If the driver needs to change a clock rate, then it must be propogated through the MSTP clock to the parent clock (such as shdi0 -> sd0). Without this we cannot up-rate default clocks which are really slow (such as the mmcif1 which defaults to 12MHz where it could be running at 97MHz)

Taken into clk-next.

Regards,
Mike

Quoted 20 lines
---
 drivers/clk/shmobile/clk-mstp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/shmobile/clk-mstp.c +1 -1
index 7bfdcfc..9fc754b 100644
@@ -139,7 +139,7 @@ cpg_mstp_clock_register(const char *name, const char *parent_name,
 
        init.name = name;
        init.ops = &cpg_mstp_clock_ops;
-       init.flags = CLK_IS_BASIC;
+       init.flags = CLK_IS_BASIC | CLK_SET_RATE_PARENT;
        init.parent_names = &parent_name;
        init.num_parents = 1;
 
Signature · 1 line
1.9.0