diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-05-12 06:29:04 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-05-12 06:29:04 -0400 |
commit | 9fe5ee0efb1b1d4a0939bc4252a8427e3337d96a (patch) | |
tree | 5a1d8b6e7d92a8f83ba94ea22feccef2461f1f9b /arch | |
parent | f3f8290cb3fa4aa627321530bb85d5f35e487433 (diff) |
sh: clkfwk: Use arch_clk_init() for on-chip clock registration.
CPUs registering on-chip clocks should be using arch_clk_init() with the
new scheme so that the CPUs have the opportunity to establish the
topology prior to the initial root clock rate propagation. This ensures
that CPUs with on-chip clocks that use CLK_ENABLE_ON_INIT are properly
enabled at the initial propagation time, without having to further poke
the root clocks.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sh/kernel/cpu/clock.c | 8 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh4/clock-sh4-202.c | 3 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/clock-sh7763.c | 3 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/clock-sh7780.c | 3 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/clock-sh7785.c | 3 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/clock-sh7786.c | 3 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/clock-shx3.c | 3 |
7 files changed, 7 insertions, 19 deletions
diff --git a/arch/sh/kernel/cpu/clock.c b/arch/sh/kernel/cpu/clock.c index 9e1fc133a473..f833843a194a 100644 --- a/arch/sh/kernel/cpu/clock.c +++ b/arch/sh/kernel/cpu/clock.c | |||
@@ -437,13 +437,7 @@ void clk_put(struct clk *clk) | |||
437 | } | 437 | } |
438 | EXPORT_SYMBOL_GPL(clk_put); | 438 | EXPORT_SYMBOL_GPL(clk_put); |
439 | 439 | ||
440 | void __init __attribute__ ((weak)) | 440 | int __init __weak arch_clk_init(void) |
441 | arch_init_clk_ops(struct clk_ops **ops, int type) | ||
442 | { | ||
443 | } | ||
444 | |||
445 | int __init __attribute__ ((weak)) | ||
446 | arch_clk_init(void) | ||
447 | { | 441 | { |
448 | return 0; | 442 | return 0; |
449 | } | 443 | } |
diff --git a/arch/sh/kernel/cpu/sh4/clock-sh4-202.c b/arch/sh/kernel/cpu/sh4/clock-sh4-202.c index 435f4f12ffb8..a72dc326d0b3 100644 --- a/arch/sh/kernel/cpu/sh4/clock-sh4-202.c +++ b/arch/sh/kernel/cpu/sh4/clock-sh4-202.c | |||
@@ -150,7 +150,7 @@ static struct clk *sh4202_onchip_clocks[] = { | |||
150 | &sh4202_shoc_clk, | 150 | &sh4202_shoc_clk, |
151 | }; | 151 | }; |
152 | 152 | ||
153 | static int __init sh4202_clk_init(void) | 153 | int __init arch_clk_init(void) |
154 | { | 154 | { |
155 | struct clk *clk = clk_get(NULL, "master_clk"); | 155 | struct clk *clk = clk_get(NULL, "master_clk"); |
156 | int i, ret = 0; | 156 | int i, ret = 0; |
@@ -166,4 +166,3 @@ static int __init sh4202_clk_init(void) | |||
166 | 166 | ||
167 | return ret; | 167 | return ret; |
168 | } | 168 | } |
169 | arch_initcall(sh4202_clk_init); | ||
diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7763.c b/arch/sh/kernel/cpu/sh4a/clock-sh7763.c index 0110da64a43b..ce3d4e6319a3 100644 --- a/arch/sh/kernel/cpu/sh4a/clock-sh7763.c +++ b/arch/sh/kernel/cpu/sh4a/clock-sh7763.c | |||
@@ -90,7 +90,7 @@ static struct clk *sh7763_onchip_clocks[] = { | |||
90 | &sh7763_shyway_clk, | 90 | &sh7763_shyway_clk, |
91 | }; | 91 | }; |
92 | 92 | ||
93 | static int __init sh7763_clk_init(void) | 93 | int __init arch_clk_init(void) |
94 | { | 94 | { |
95 | struct clk *clk = clk_get(NULL, "master_clk"); | 95 | struct clk *clk = clk_get(NULL, "master_clk"); |
96 | int i, ret = 0; | 96 | int i, ret = 0; |
@@ -106,4 +106,3 @@ static int __init sh7763_clk_init(void) | |||
106 | 106 | ||
107 | return ret; | 107 | return ret; |
108 | } | 108 | } |
109 | arch_initcall(sh7763_clk_init); | ||
diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7780.c b/arch/sh/kernel/cpu/sh4a/clock-sh7780.c index 0a22d50b109f..38b8b1ddb283 100644 --- a/arch/sh/kernel/cpu/sh4a/clock-sh7780.c +++ b/arch/sh/kernel/cpu/sh4a/clock-sh7780.c | |||
@@ -96,7 +96,7 @@ static struct clk *sh7780_onchip_clocks[] = { | |||
96 | &sh7780_shyway_clk, | 96 | &sh7780_shyway_clk, |
97 | }; | 97 | }; |
98 | 98 | ||
99 | static int __init sh7780_clk_init(void) | 99 | int __init arch_clk_init(void) |
100 | { | 100 | { |
101 | struct clk *clk = clk_get(NULL, "master_clk"); | 101 | struct clk *clk = clk_get(NULL, "master_clk"); |
102 | int i, ret = 0; | 102 | int i, ret = 0; |
@@ -112,4 +112,3 @@ static int __init sh7780_clk_init(void) | |||
112 | 112 | ||
113 | return ret; | 113 | return ret; |
114 | } | 114 | } |
115 | arch_initcall(sh7780_clk_init); | ||
diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7785.c b/arch/sh/kernel/cpu/sh4a/clock-sh7785.c index 4dcd1f6f0cbd..fa14f35bc116 100644 --- a/arch/sh/kernel/cpu/sh4a/clock-sh7785.c +++ b/arch/sh/kernel/cpu/sh4a/clock-sh7785.c | |||
@@ -134,7 +134,7 @@ static struct clk *sh7785_onchip_clocks[] = { | |||
134 | &sh7785_ram_clk, | 134 | &sh7785_ram_clk, |
135 | }; | 135 | }; |
136 | 136 | ||
137 | static int __init sh7785_clk_init(void) | 137 | int __init arch_clk_init(void) |
138 | { | 138 | { |
139 | struct clk *clk = clk_get(NULL, "master_clk"); | 139 | struct clk *clk = clk_get(NULL, "master_clk"); |
140 | int i, ret = 0; | 140 | int i, ret = 0; |
@@ -150,4 +150,3 @@ static int __init sh7785_clk_init(void) | |||
150 | 150 | ||
151 | return ret; | 151 | return ret; |
152 | } | 152 | } |
153 | arch_initcall(sh7785_clk_init); | ||
diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7786.c b/arch/sh/kernel/cpu/sh4a/clock-sh7786.c index 825556fe2306..7907002fa1df 100644 --- a/arch/sh/kernel/cpu/sh4a/clock-sh7786.c +++ b/arch/sh/kernel/cpu/sh4a/clock-sh7786.c | |||
@@ -120,7 +120,7 @@ static struct clk *sh7786_onchip_clocks[] = { | |||
120 | &sh7786_ddr_clk, | 120 | &sh7786_ddr_clk, |
121 | }; | 121 | }; |
122 | 122 | ||
123 | static int __init sh7786_clk_init(void) | 123 | int __init arch_clk_init(void) |
124 | { | 124 | { |
125 | struct clk *clk = clk_get(NULL, "master_clk"); | 125 | struct clk *clk = clk_get(NULL, "master_clk"); |
126 | int i, ret = 0; | 126 | int i, ret = 0; |
@@ -136,4 +136,3 @@ static int __init sh7786_clk_init(void) | |||
136 | 136 | ||
137 | return ret; | 137 | return ret; |
138 | } | 138 | } |
139 | arch_initcall(sh7786_clk_init); | ||
diff --git a/arch/sh/kernel/cpu/sh4a/clock-shx3.c b/arch/sh/kernel/cpu/sh4a/clock-shx3.c index 1eb149b0fe6e..c14553e3e13f 100644 --- a/arch/sh/kernel/cpu/sh4a/clock-shx3.c +++ b/arch/sh/kernel/cpu/sh4a/clock-shx3.c | |||
@@ -107,7 +107,7 @@ static struct clk *shx3_onchip_clocks[] = { | |||
107 | &shx3_shyway_clk, | 107 | &shx3_shyway_clk, |
108 | }; | 108 | }; |
109 | 109 | ||
110 | static int __init shx3_clk_init(void) | 110 | int __init arch_clk_init(void) |
111 | { | 111 | { |
112 | struct clk *clk = clk_get(NULL, "master_clk"); | 112 | struct clk *clk = clk_get(NULL, "master_clk"); |
113 | int i, ret = 0; | 113 | int i, ret = 0; |
@@ -123,4 +123,3 @@ static int __init shx3_clk_init(void) | |||
123 | 123 | ||
124 | return ret; | 124 | return ret; |
125 | } | 125 | } |
126 | arch_initcall(shx3_clk_init); | ||