From: Vishwanath Sripathy <vishwanath.bs@ti.com>
To: Gery Kahn <geryk@ti.com>
Cc: linux-omap@vger.kernel.org, patches@linaro.org,
Santosh Shilimkar <santosh.shilimkar@ti.com>
Subject: RE: [PATCH 08/13] OMAP3: cpufreq driver changes for DVFS support
Date: Mon, 14 Feb 2011 18:19:49 +0530 [thread overview]
Message-ID: <0a4ab0bfef880f12edb62915a3592104@mail.gmail.com> (raw)
In-Reply-To: <AANLkTinKFYHLSZBMxukb7dT6tenozmVHBm6JR4FCSbak@mail.gmail.com>
> -----Original Message-----
> From: Kahn, Gery [mailto:geryk@ti.com]
> Sent: Monday, February 14, 2011 3:04 PM
> To: Vishwanath BS
> Cc: linux-omap@vger.kernel.org; patches@linaro.org; Santosh Shilimkar
> Subject: Re: [PATCH 08/13] OMAP3: cpufreq driver changes for DVFS
> support
>
> Dear Vishwanath,
>
> On Fri, Jan 21, 2011 at 16:01, Vishwanath BS <vishwanath.bs@ti.com>
> wrote:
> > Changes in the omap cpufreq driver for DVFS support.
> >
> > Signed-off-by: Vishwanath BS <vishwanath.bs@ti.com>
> > Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
> > ---
> > arch/arm/plat-omap/cpu-omap.c | 35
> ++++++++++++++++++++++++++++++++---
> > 1 files changed, 32 insertions(+), 3 deletions(-)
> >
> > diff --git a/arch/arm/plat-omap/cpu-omap.c b/arch/arm/plat-
> omap/cpu-omap.c
> > index 1c1b80b..d965220 100644
> > --- a/arch/arm/plat-omap/cpu-omap.c
> > +++ b/arch/arm/plat-omap/cpu-omap.c
> > @@ -30,10 +30,12 @@
> > #include <mach/hardware.h>
> > #include <plat/clock.h>
> > #include <asm/system.h>
> > +#include <asm/cpu.h>
> >
> > #if defined(CONFIG_ARCH_OMAP3) &&
> !defined(CONFIG_OMAP_PM_NONE)
> > #include <plat/omap-pm.h>
> > #include <plat/common.h>
> > +#include <plat/dvfs.h>
> > #endif
> >
> > #define VERY_HI_RATE 900000000
> > @@ -85,11 +87,11 @@ static int omap_target(struct cpufreq_policy
> *policy,
> > unsigned int target_freq,
> > unsigned int relation)
> > {
> > -#ifdef CONFIG_ARCH_OMAP1
> > struct cpufreq_freqs freqs;
> > -#endif
> > #if defined(CONFIG_ARCH_OMAP3) &&
> !defined(CONFIG_OMAP_PM_NONE)
> > unsigned long freq;
> > + int i;
> > + struct cpufreq_freqs freqs_notify;
> > struct device *mpu_dev = omap2_get_mpuss_device();
> > #endif
> > int ret = 0;
> > @@ -116,9 +118,36 @@ static int omap_target(struct cpufreq_policy
> *policy,
> > ret = clk_set_rate(mpu_clk, freqs.new * 1000);
> > cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
> > #elif defined(CONFIG_ARCH_OMAP3) &&
> !defined(CONFIG_OMAP_PM_NONE)
> > + freqs.old = omap_getspeed(policy->cpu);;
> > + freqs_notify.new = clk_round_rate(mpu_clk, target_freq *
> 1000) / 1000;
> > + freqs.cpu = policy->cpu;
> > +
> > + if (freqs.old == freqs.new)
> > + return ret;
> > +
> > + /* pre notifiers */
> > + for_each_cpu(i, policy->cpus) {
> > + freqs.cpu = i;
> > + cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
> > + }
> > +
> > + /* scale the frequency */
> > freq = target_freq * 1000;
> > if (opp_find_freq_ceil(mpu_dev, &freq))
> > - omap_pm_cpu_set_freq(freq);
> > + omap_device_scale(mpu_dev, mpu_dev, freq);
> > +
> > + /* Update loops per jiffy */
> > + freqs.new = omap_getspeed(policy->cpu);
> > + for_each_cpu(i, policy->cpus)
> > + per_cpu(cpu_data, i).loops_per_jiffy =
> > + cpufreq_scale(per_cpu(cpu_data, i).loops_per_jiffy,
> > + freqs.old, freqs.new);
> > +
> > + /* post notifiers */
> > + for_each_cpu(i, policy->cpus) {
> > + freqs.cpu = i;
> > + cpufreq_notify_transition(&freqs,
> CPUFREQ_POSTCHANGE);
> > + }
> > #endif
> > return ret;
> > }
> > --
> > 1.7.0.4
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-omap"
in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> >
>
> I took those patches and applied to my .38-rc4 with help from Nishanth
> Menon.
>
> There is problem appeared during compilation:
>
> arch/arm/plat-omap/cpu-omap.c:142: error: 'struct cpuinfo_arm' has no
> member named 'loops_per_jiffy'
>
> My kernel is for Zoom3 board (OMAP3630-GP rev 2, CPU-OPP2 L3-
> 200MHz)
> Looking at the source, arch/arm/include/asm/cpu.h
> loops_per_jiffy is under CONFIG_SMP and since the omap2plus_defconfig
> builds for OMAP4 as well by default, I am guessing this bug was not
> immediately visible...
>
> Is there solution for the issue?
Yes this is an issue if CONFIG_SMP is disabled. We probably will need to
put this code under #ifdef CONFIG_SMP till lpj is handled for SMP in
generic cpufreq code itself .
Vishwa
>
> Regards,
> Gery
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2011-02-14 12:49 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-21 14:00 [PATCH 00/13] OMAP: Basic DVFS Framework Vishwanath BS
2011-01-21 14:00 ` [PATCH 01/13] OMAP: Introduce accessory APIs for DVFS Vishwanath BS
2011-02-03 1:07 ` Kevin Hilman
2011-02-08 11:22 ` Vishwanath Sripathy
2011-02-09 15:35 ` Kevin Hilman
2011-01-21 14:00 ` [PATCH 02/13] OMAP: Introduce device specific set rate and get rate in omap_device structure Vishwanath BS
2011-02-03 23:46 ` Kevin Hilman
2011-02-07 13:36 ` Vishwanath Sripathy
2011-01-21 14:00 ` [PATCH 03/13] OMAP: Implement Basic DVFS Vishwanath BS
2011-02-04 1:14 ` Kevin Hilman
2011-02-07 14:18 ` Vishwanath Sripathy
2011-02-09 15:59 ` Kevin Hilman
2011-02-09 16:24 ` Vishwanath Sripathy
2011-01-21 14:00 ` [PATCH 04/13] OMAP: Introduce dependent voltage domain support Vishwanath BS
2011-02-04 15:37 ` Kevin Hilman
2011-02-07 14:34 ` Vishwanath Sripathy
2011-02-10 16:36 ` Kevin Hilman
2011-02-11 4:41 ` Vishwanath Sripathy
2011-01-21 14:00 ` [PATCH 05/13] OMAP: Introduce device scale implementation Vishwanath BS
2011-02-04 16:04 ` Kevin Hilman
2011-02-07 14:56 ` Vishwanath Sripathy
2011-02-10 16:37 ` Kevin Hilman
2011-01-21 14:00 ` [PATCH 06/13] OMAP: Disable Smartreflex across DVFS Vishwanath BS
2011-02-04 16:06 ` Kevin Hilman
2011-02-07 14:58 ` Vishwanath Sripathy
2011-01-21 14:00 ` [PATCH 07/13] OMAP3: Introduce custom set rate and get rate APIs for scalable devices Vishwanath BS
2011-02-04 16:08 ` Kevin Hilman
2011-01-21 14:01 ` [PATCH 08/13] OMAP3: cpufreq driver changes for DVFS support Vishwanath BS
2011-02-04 16:09 ` Kevin Hilman
2011-02-14 9:34 ` Kahn, Gery
2011-02-14 12:49 ` Vishwanath Sripathy [this message]
2011-02-14 13:03 ` Menon, Nishanth
2011-02-14 13:42 ` Vishwanath Sripathy
2011-02-14 15:35 ` Kahn, Gery
2011-04-13 14:13 ` Jarkko Nikula
2011-04-13 17:57 ` Vishwanath Sripathy
2011-04-14 12:28 ` Jarkko Nikula
2011-01-21 14:01 ` [PATCH 09/13] OMAP3: Introduce voltage domain info in the hwmod structures Vishwanath BS
2011-02-04 16:10 ` Kevin Hilman
2011-01-21 14:01 ` [PATCH 10/13] OMAP3: Add voltage dependency table for VDD1 Vishwanath BS
2011-01-29 0:31 ` Kevin Hilman
2011-01-30 12:59 ` Vishwanath Sripathy
2011-01-31 15:38 ` Kevin Hilman
2011-02-28 11:48 ` Jarkko Nikula
2011-01-21 14:01 ` [PATCH 11/13] OMAP2PLUS: Replace voltage values with Macros Vishwanath BS
2011-02-04 16:44 ` Kevin Hilman
2011-01-21 14:01 ` [PATCH 12/13] OMAP2PLUS: Enable various options in defconfig Vishwanath BS
2011-01-21 14:01 ` [PATCH 13/13] OMAP: Add DVFS Documentation Vishwanath BS
2011-02-04 1:38 ` Kevin Hilman
2011-01-22 17:18 ` [PATCH 00/13] OMAP: Basic DVFS Framework Felipe Balbi
2011-01-24 6:01 ` Vishwanath Sripathy
2011-01-24 6:18 ` Felipe Balbi
2011-01-24 14:25 ` Vishwanath Sripathy
2011-01-24 15:25 ` Laurent Pinchart
2011-01-24 15:29 ` Felipe Balbi
2011-01-24 20:00 ` Kevin Hilman
2011-01-25 3:53 ` Felipe Balbi
2011-02-01 12:27 ` Vishwanath Sripathy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0a4ab0bfef880f12edb62915a3592104@mail.gmail.com \
--to=vishwanath.bs@ti.com \
--cc=geryk@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=patches@linaro.org \
--cc=santosh.shilimkar@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.