diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-02 18:04:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-02 18:04:12 -0400 |
commit | a8c4c20dfa8b28a3c99e33c639d9c2ea5657741e (patch) | |
tree | 887b64d29b5a46d9ab2ca1267d8a2f05b5845561 /arch/arm/plat-omap/cpu-omap.c | |
parent | 168d04b3b4de7723eb73b3cffc9cb75224e0f393 (diff) | |
parent | 2dc7667b9d0674db6572723356fe3857031101a4 (diff) |
Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (44 commits)
[ARM] 3541/2: workaround for PXA27x erratum E7
[ARM] nommu: provide a way for correct control register value selection
[ARM] 3705/1: add supersection support to ioremap()
[ARM] 3707/1: iwmmxt: use the generic thread notifier infrastructure
[ARM] 3706/2: ep93xx: add cirrus logic edb9315a support
[ARM] 3704/1: format IOP Kconfig with tabs, create more consistency
[ARM] 3703/1: Add help description for ARCH_EP80219
[ARM] 3678/1: MMC: Make OMAP MMC work
[ARM] 3677/1: OMAP: Update H2 defconfig
[ARM] 3676/1: ARM: OMAP: Fix dmtimers and timer32k to compile on OMAP1
[ARM] Add section support to ioremap
[ARM] Fix sa11x0 SDRAM selection
[ARM] Set bit 4 on section mappings correctly depending on CPU
[ARM] 3666/1: TRIZEPS4 [1/5] core
ARM: OMAP: Multiplexing for 24xx GPMC wait pin monitoring
ARM: OMAP: Fix SRAM to use MT_MEMORY instead of MT_DEVICE
ARM: OMAP: Update dmtimers
ARM: OMAP: Make clock variables static
ARM: OMAP: Fix GPMC compilation when DEBUG is defined
ARM: OMAP: Mux updates for external DMA and GPIO
...
Diffstat (limited to 'arch/arm/plat-omap/cpu-omap.c')
-rw-r--r-- | arch/arm/plat-omap/cpu-omap.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/arch/arm/plat-omap/cpu-omap.c b/arch/arm/plat-omap/cpu-omap.c index 98edc9fdd6d1..a0c71dca2373 100644 --- a/arch/arm/plat-omap/cpu-omap.c +++ b/arch/arm/plat-omap/cpu-omap.c | |||
@@ -25,6 +25,14 @@ | |||
25 | #include <asm/io.h> | 25 | #include <asm/io.h> |
26 | #include <asm/system.h> | 26 | #include <asm/system.h> |
27 | 27 | ||
28 | #define VERY_HI_RATE 900000000 | ||
29 | |||
30 | #ifdef CONFIG_ARCH_OMAP1 | ||
31 | #define MPU_CLK "mpu" | ||
32 | #else | ||
33 | #define MPU_CLK "virt_prcm_set" | ||
34 | #endif | ||
35 | |||
28 | /* TODO: Add support for SDRAM timing changes */ | 36 | /* TODO: Add support for SDRAM timing changes */ |
29 | 37 | ||
30 | int omap_verify_speed(struct cpufreq_policy *policy) | 38 | int omap_verify_speed(struct cpufreq_policy *policy) |
@@ -36,7 +44,7 @@ int omap_verify_speed(struct cpufreq_policy *policy) | |||
36 | 44 | ||
37 | cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq, | 45 | cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq, |
38 | policy->cpuinfo.max_freq); | 46 | policy->cpuinfo.max_freq); |
39 | mpu_clk = clk_get(NULL, "mpu"); | 47 | mpu_clk = clk_get(NULL, MPU_CLK); |
40 | if (IS_ERR(mpu_clk)) | 48 | if (IS_ERR(mpu_clk)) |
41 | return PTR_ERR(mpu_clk); | 49 | return PTR_ERR(mpu_clk); |
42 | policy->min = clk_round_rate(mpu_clk, policy->min * 1000) / 1000; | 50 | policy->min = clk_round_rate(mpu_clk, policy->min * 1000) / 1000; |
@@ -56,7 +64,7 @@ unsigned int omap_getspeed(unsigned int cpu) | |||
56 | if (cpu) | 64 | if (cpu) |
57 | return 0; | 65 | return 0; |
58 | 66 | ||
59 | mpu_clk = clk_get(NULL, "mpu"); | 67 | mpu_clk = clk_get(NULL, MPU_CLK); |
60 | if (IS_ERR(mpu_clk)) | 68 | if (IS_ERR(mpu_clk)) |
61 | return 0; | 69 | return 0; |
62 | rate = clk_get_rate(mpu_clk) / 1000; | 70 | rate = clk_get_rate(mpu_clk) / 1000; |
@@ -73,7 +81,7 @@ static int omap_target(struct cpufreq_policy *policy, | |||
73 | struct cpufreq_freqs freqs; | 81 | struct cpufreq_freqs freqs; |
74 | int ret = 0; | 82 | int ret = 0; |
75 | 83 | ||
76 | mpu_clk = clk_get(NULL, "mpu"); | 84 | mpu_clk = clk_get(NULL, MPU_CLK); |
77 | if (IS_ERR(mpu_clk)) | 85 | if (IS_ERR(mpu_clk)) |
78 | return PTR_ERR(mpu_clk); | 86 | return PTR_ERR(mpu_clk); |
79 | 87 | ||
@@ -93,7 +101,7 @@ static int __init omap_cpu_init(struct cpufreq_policy *policy) | |||
93 | { | 101 | { |
94 | struct clk * mpu_clk; | 102 | struct clk * mpu_clk; |
95 | 103 | ||
96 | mpu_clk = clk_get(NULL, "mpu"); | 104 | mpu_clk = clk_get(NULL, MPU_CLK); |
97 | if (IS_ERR(mpu_clk)) | 105 | if (IS_ERR(mpu_clk)) |
98 | return PTR_ERR(mpu_clk); | 106 | return PTR_ERR(mpu_clk); |
99 | 107 | ||
@@ -102,7 +110,7 @@ static int __init omap_cpu_init(struct cpufreq_policy *policy) | |||
102 | policy->cur = policy->min = policy->max = omap_getspeed(0); | 110 | policy->cur = policy->min = policy->max = omap_getspeed(0); |
103 | policy->governor = CPUFREQ_DEFAULT_GOVERNOR; | 111 | policy->governor = CPUFREQ_DEFAULT_GOVERNOR; |
104 | policy->cpuinfo.min_freq = clk_round_rate(mpu_clk, 0) / 1000; | 112 | policy->cpuinfo.min_freq = clk_round_rate(mpu_clk, 0) / 1000; |
105 | policy->cpuinfo.max_freq = clk_round_rate(mpu_clk, 216000000) / 1000; | 113 | policy->cpuinfo.max_freq = clk_round_rate(mpu_clk, VERY_HI_RATE) / 1000; |
106 | policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL; | 114 | policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL; |
107 | clk_put(mpu_clk); | 115 | clk_put(mpu_clk); |
108 | 116 | ||