aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap1/clock.c
diff options
context:
space:
mode:
authorJanusz Krzysztofik <jkrzyszt@tis.icnet.pl>2011-12-08 21:01:41 -0500
committerTony Lindgren <tony@atomide.com>2011-12-08 21:02:23 -0500
commit24ce2705c2dd50e51f325c6e57dec378adc8c135 (patch)
tree9f0688dae115c48d87ea8cda615a64831fb3c80d /arch/arm/mach-omap1/clock.c
parentee62e93a3c135ae18f2fa18615ce065fe5487259 (diff)
ARM: OMAP1: Move dpll1 rates selection from config to runtime
For still better multi-OMAP1 support, expand omap1_rate_table with flags for different SoC types and match them while selecting clock rates. The idea is stolen from current omap24xx clock rate selection algorithm. Since clkdev platform flag definitions are reused here, those had to be expanded with one extra entry for OMAP1710 subtype, as this is the only SoC for which we allow selection of the highest, 216 MHz rate. Once done, remove no longer needed clock rate configure time options. Tested on Amstrad Delta. Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> [tony@atomide.com: updated comments] Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap1/clock.c')
-rw-r--r--arch/arm/mach-omap1/clock.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm/mach-omap1/clock.c b/arch/arm/mach-omap1/clock.c
index 84ef70476b51..ff27dbdba3d6 100644
--- a/arch/arm/mach-omap1/clock.c
+++ b/arch/arm/mach-omap1/clock.c
@@ -197,6 +197,9 @@ int omap1_select_table_rate(struct clk *clk, unsigned long rate)
197 ref_rate = ck_ref_p->rate; 197 ref_rate = ck_ref_p->rate;
198 198
199 for (ptr = omap1_rate_table; ptr->rate; ptr++) { 199 for (ptr = omap1_rate_table; ptr->rate; ptr++) {
200 if (!(ptr->flags & cpu_mask))
201 continue;
202
200 if (ptr->xtal != ref_rate) 203 if (ptr->xtal != ref_rate)
201 continue; 204 continue;
202 205
@@ -290,6 +293,9 @@ long omap1_round_to_table_rate(struct clk *clk, unsigned long rate)
290 highest_rate = -EINVAL; 293 highest_rate = -EINVAL;
291 294
292 for (ptr = omap1_rate_table; ptr->rate; ptr++) { 295 for (ptr = omap1_rate_table; ptr->rate; ptr++) {
296 if (!(ptr->flags & cpu_mask))
297 continue;
298
293 if (ptr->xtal != ref_rate) 299 if (ptr->xtal != ref_rate)
294 continue; 300 continue;
295 301