diff options
author | Paul Walmsley <paul@pwsan.com> | 2010-01-26 22:13:11 -0500 |
---|---|---|
committer | Paul Walmsley <paul@pwsan.com> | 2010-01-29 12:14:22 -0500 |
commit | feec1277a5c599ebca6217bc6bb9f6410e84793b (patch) | |
tree | cd095939bdd63b102b235857d434c1890aba8450 /arch/arm | |
parent | da4d2904abc0c31ac829e9c6d52106d5a6606507 (diff) |
OMAP2/3/4 clock: omap2_clk_prepare_for_reboot() is OMAP2xxx-only
omap2_clk_prepare_for_reboot() is only applicable to OMAP2xxx chips,
so rename it to omap2xxx_clk_prepare_for_reboot() and only call it when
running on OMAP2xxx chips. Remove the old stub in the OMAP3 clock code.
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-omap2/clock.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap2/clock2xxx.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/clock2xxx.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap2/clock34xx.c | 21 | ||||
-rw-r--r-- | arch/arm/mach-omap2/clock44xx.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-omap2/prcm.c | 8 |
6 files changed, 9 insertions, 29 deletions
diff --git a/arch/arm/mach-omap2/clock.h b/arch/arm/mach-omap2/clock.h index dcd58cde13b6..be5a55f57030 100644 --- a/arch/arm/mach-omap2/clock.h +++ b/arch/arm/mach-omap2/clock.h | |||
@@ -84,7 +84,6 @@ int omap2_clksel_set_parent(struct clk *clk, struct clk *new_parent); | |||
84 | u32 omap2_get_dpll_rate(struct clk *clk); | 84 | u32 omap2_get_dpll_rate(struct clk *clk); |
85 | void omap2_init_dpll_parent(struct clk *clk); | 85 | void omap2_init_dpll_parent(struct clk *clk); |
86 | int omap2_wait_clock_ready(void __iomem *reg, u32 cval, const char *name); | 86 | int omap2_wait_clock_ready(void __iomem *reg, u32 cval, const char *name); |
87 | void omap2_clk_prepare_for_reboot(void); | ||
88 | int omap2_dflt_clk_enable(struct clk *clk); | 87 | int omap2_dflt_clk_enable(struct clk *clk); |
89 | void omap2_dflt_clk_disable(struct clk *clk); | 88 | void omap2_dflt_clk_disable(struct clk *clk); |
90 | void omap2_clk_dflt_find_companion(struct clk *clk, void __iomem **other_reg, | 89 | void omap2_clk_dflt_find_companion(struct clk *clk, void __iomem **other_reg, |
diff --git a/arch/arm/mach-omap2/clock2xxx.c b/arch/arm/mach-omap2/clock2xxx.c index e98f48b0a5c6..a48b01ab0e35 100644 --- a/arch/arm/mach-omap2/clock2xxx.c +++ b/arch/arm/mach-omap2/clock2xxx.c | |||
@@ -71,7 +71,7 @@ const struct clkops clkops_omap2430_i2chs_wait = { | |||
71 | /* | 71 | /* |
72 | * Set clocks for bypass mode for reboot to work. | 72 | * Set clocks for bypass mode for reboot to work. |
73 | */ | 73 | */ |
74 | void omap2_clk_prepare_for_reboot(void) | 74 | void omap2xxx_clk_prepare_for_reboot(void) |
75 | { | 75 | { |
76 | u32 rate; | 76 | u32 rate; |
77 | 77 | ||
diff --git a/arch/arm/mach-omap2/clock2xxx.h b/arch/arm/mach-omap2/clock2xxx.h index c14061b2b9f1..bed294ac3647 100644 --- a/arch/arm/mach-omap2/clock2xxx.h +++ b/arch/arm/mach-omap2/clock2xxx.h | |||
@@ -18,6 +18,7 @@ int omap2_reprogram_dpllcore(struct clk *clk, unsigned long rate); | |||
18 | unsigned long omap2xxx_clk_get_core_rate(struct clk *clk); | 18 | unsigned long omap2xxx_clk_get_core_rate(struct clk *clk); |
19 | u32 omap2xxx_get_apll_clkin(void); | 19 | u32 omap2xxx_get_apll_clkin(void); |
20 | u32 omap2xxx_get_sysclkdiv(void); | 20 | u32 omap2xxx_get_sysclkdiv(void); |
21 | void omap2xxx_clk_prepare_for_reboot(void); | ||
21 | 22 | ||
22 | /* REVISIT: These should be set dynamically for CONFIG_MULTI_OMAP2 */ | 23 | /* REVISIT: These should be set dynamically for CONFIG_MULTI_OMAP2 */ |
23 | #ifdef CONFIG_ARCH_OMAP2420 | 24 | #ifdef CONFIG_ARCH_OMAP2420 |
diff --git a/arch/arm/mach-omap2/clock34xx.c b/arch/arm/mach-omap2/clock34xx.c index 8a7db7a03bec..34d395046280 100644 --- a/arch/arm/mach-omap2/clock34xx.c +++ b/arch/arm/mach-omap2/clock34xx.c | |||
@@ -150,25 +150,6 @@ int omap3_dpll4_set_rate(struct clk *clk, unsigned long rate) | |||
150 | return omap3_noncore_dpll_set_rate(clk, rate); | 150 | return omap3_noncore_dpll_set_rate(clk, rate); |
151 | } | 151 | } |
152 | 152 | ||
153 | /* Common clock code */ | ||
154 | |||
155 | /* | ||
156 | * Set clocks for bypass mode for reboot to work. | ||
157 | */ | ||
158 | void omap2_clk_prepare_for_reboot(void) | ||
159 | { | ||
160 | /* REVISIT: Not ready for 343x */ | ||
161 | #if 0 | ||
162 | u32 rate; | ||
163 | |||
164 | if (vclk == NULL || sclk == NULL) | ||
165 | return; | ||
166 | |||
167 | rate = clk_get_rate(sclk); | ||
168 | clk_set_rate(vclk, rate); | ||
169 | #endif | ||
170 | } | ||
171 | |||
172 | void omap3_clk_lock_dpll5(void) | 153 | void omap3_clk_lock_dpll5(void) |
173 | { | 154 | { |
174 | struct clk *dpll5_clk; | 155 | struct clk *dpll5_clk; |
@@ -191,6 +172,8 @@ void omap3_clk_lock_dpll5(void) | |||
191 | return; | 172 | return; |
192 | } | 173 | } |
193 | 174 | ||
175 | /* Common clock code */ | ||
176 | |||
194 | /* REVISIT: Move this init stuff out into clock.c */ | 177 | /* REVISIT: Move this init stuff out into clock.c */ |
195 | 178 | ||
196 | /* | 179 | /* |
diff --git a/arch/arm/mach-omap2/clock44xx.c b/arch/arm/mach-omap2/clock44xx.c index 08dd6427df70..c238717e3760 100644 --- a/arch/arm/mach-omap2/clock44xx.c +++ b/arch/arm/mach-omap2/clock44xx.c | |||
@@ -17,8 +17,3 @@ const struct clkops clkops_noncore_dpll_ops = { | |||
17 | .enable = &omap3_noncore_dpll_enable, | 17 | .enable = &omap3_noncore_dpll_enable, |
18 | .disable = &omap3_noncore_dpll_disable, | 18 | .disable = &omap3_noncore_dpll_disable, |
19 | }; | 19 | }; |
20 | |||
21 | void omap2_clk_prepare_for_reboot(void) | ||
22 | { | ||
23 | return; | ||
24 | } | ||
diff --git a/arch/arm/mach-omap2/prcm.c b/arch/arm/mach-omap2/prcm.c index abafd2298ece..e8e121a41d6d 100644 --- a/arch/arm/mach-omap2/prcm.c +++ b/arch/arm/mach-omap2/prcm.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <plat/control.h> | 29 | #include <plat/control.h> |
30 | 30 | ||
31 | #include "clock.h" | 31 | #include "clock.h" |
32 | #include "clock2xxx.h" | ||
32 | #include "cm.h" | 33 | #include "cm.h" |
33 | #include "prm.h" | 34 | #include "prm.h" |
34 | #include "prm-regbits-24xx.h" | 35 | #include "prm-regbits-24xx.h" |
@@ -133,11 +134,12 @@ EXPORT_SYMBOL(omap_prcm_get_reset_sources); | |||
133 | void omap_prcm_arch_reset(char mode) | 134 | void omap_prcm_arch_reset(char mode) |
134 | { | 135 | { |
135 | s16 prcm_offs; | 136 | s16 prcm_offs; |
136 | omap2_clk_prepare_for_reboot(); | ||
137 | 137 | ||
138 | if (cpu_is_omap24xx()) | 138 | if (cpu_is_omap24xx()) { |
139 | omap2xxx_clk_prepare_for_reboot(); | ||
140 | |||
139 | prcm_offs = WKUP_MOD; | 141 | prcm_offs = WKUP_MOD; |
140 | else if (cpu_is_omap34xx()) { | 142 | } else if (cpu_is_omap34xx()) { |
141 | u32 l; | 143 | u32 l; |
142 | 144 | ||
143 | prcm_offs = OMAP3430_GR_MOD; | 145 | prcm_offs = OMAP3430_GR_MOD; |