c3b5ba6899965dd4e0d4918f114550019e2d786a
[openembedded.git] /
1 From 7fbd0c4b60534401287ae4a0410e82853f7dc015 Mon Sep 17 00:00:00 2001
2 From: Thara Gopinath <thara@ti.com>
3 Date: Fri, 2 Jul 2010 13:07:49 +0530
4 Subject: [PATCH 15/19] OMAP3: Update cpufreq driver to use the new set_rate API
5
6 This patch updates the cpufreq driver to use the device
7 set rate API to scale the mpu frequency for OMAP3.
8
9 Signed-off-by: Thara Gopinath <thara@ti.com>
10 ---
11  arch/arm/plat-omap/cpu-omap.c |   11 ++++-------
12  1 files changed, 4 insertions(+), 7 deletions(-)
13
14 diff --git a/arch/arm/plat-omap/cpu-omap.c b/arch/arm/plat-omap/cpu-omap.c
15 index 671e4b9..71777db 100644
16 --- a/arch/arm/plat-omap/cpu-omap.c
17 +++ b/arch/arm/plat-omap/cpu-omap.c
18 @@ -31,10 +31,7 @@
19  #include <plat/clock.h>
20  #include <plat/common.h>
21  #include <asm/system.h>
22 -
23 -#if defined(CONFIG_ARCH_OMAP3) && !defined(CONFIG_OMAP_PM_NONE)
24 -#include <plat/omap-pm.h>
25 -#endif
26 +#include <plat/omap_device.h>
27  
28  #define VERY_HI_RATE   900000000
29  
30 @@ -88,7 +85,7 @@ static int omap_target(struct cpufreq_policy *policy,
31  #ifdef CONFIG_ARCH_OMAP1
32         struct cpufreq_freqs freqs;
33  #endif
34 -#if defined(CONFIG_ARCH_OMAP3) && !defined(CONFIG_OMAP_PM_NONE)
35 +#if defined(CONFIG_ARCH_OMAP3)
36         unsigned long freq;
37         struct device *mpu_dev = omap2_get_mpuss_device();
38  #endif
39 @@ -115,10 +112,10 @@ static int omap_target(struct cpufreq_policy *policy,
40  #endif
41         ret = clk_set_rate(mpu_clk, freqs.new * 1000);
42         cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
43 -#elif defined(CONFIG_ARCH_OMAP3) && !defined(CONFIG_OMAP_PM_NONE)
44 +#elif defined(CONFIG_ARCH_OMAP3)
45         freq = target_freq * 1000;
46         if (opp_find_freq_ceil(mpu_dev, &freq))
47 -               omap_pm_cpu_set_freq(freq);
48 +               omap_device_scale(mpu_dev, mpu_dev, freq);
49  #endif
50         return ret;
51  }
52 -- 
53 1.6.6.1
54