* Re: [PATCH 8/8] cpufreq: db8500: Use armss clk to update frequency [not found] ` <1349869349-8070-9-git-send-email-ulf.hansson@stericsson.com> @ 2012-10-26 8:10 ` Ulf Hansson 2012-10-26 11:20 ` Rafael J. Wysocki 0 siblings, 1 reply; 8+ messages in thread From: Ulf Hansson @ 2012-10-26 8:10 UTC (permalink / raw) To: Rafael J. Wysocki Cc: linux-arm-kernel, Mike Turquette, Mike Turquette, Samuel Ortiz, cpufreq, linux-pm, Linus Walleij, Lee Jones, Philippe Begnic, Rickard Andersson, Jonas Aberg, Vincent Guittot On 10 October 2012 13:42, Ulf Hansson <ulf.hansson@stericsson.com> wrote: > From: Ulf Hansson <ulf.hansson@linaro.org> > > Using the armss clk to update the frequency makes the driver no more > directly dependant on the prmcu API. > > Cc: Rafael J. Wysocki <rjw@sisk.pl> > Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> > --- > drivers/cpufreq/db8500-cpufreq.c | 24 ++++++++++++++++-------- > 1 file changed, 16 insertions(+), 8 deletions(-) > > diff --git a/drivers/cpufreq/db8500-cpufreq.c b/drivers/cpufreq/db8500-cpufreq.c > index dea9a49..4f154bc 100644 > --- a/drivers/cpufreq/db8500-cpufreq.c > +++ b/drivers/cpufreq/db8500-cpufreq.c > @@ -14,10 +14,11 @@ > #include <linux/delay.h> > #include <linux/slab.h> > #include <linux/platform_device.h> > -#include <linux/mfd/dbx500-prcmu.h> > +#include <linux/clk.h> > #include <mach/id.h> > > static struct cpufreq_frequency_table *freq_table; > +static struct clk *armss_clk; > > static struct freq_attr *db8500_cpufreq_attr[] = { > &cpufreq_freq_attr_scaling_available_freqs, > @@ -58,9 +59,9 @@ static int db8500_cpufreq_target(struct cpufreq_policy *policy, > for_each_cpu(freqs.cpu, policy->cpus) > cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); > > - /* request the PRCM unit for opp change */ > - if (prcmu_set_arm_opp(freq_table[idx].index)) { > - pr_err("db8500-cpufreq: Failed to set OPP level\n"); > + /* update armss clk frequency */ > + if (clk_set_rate(armss_clk, freq_table[idx].frequency * 1000)) { > + pr_err("db8500-cpufreq: Failed to update armss clk\n"); > return -EINVAL; > } > > @@ -74,16 +75,16 @@ static int db8500_cpufreq_target(struct cpufreq_policy *policy, > static unsigned int db8500_cpufreq_getspeed(unsigned int cpu) > { > int i = 0; > - /* request the prcm to get the current ARM opp */ > - int opp = prcmu_get_arm_opp(); > + unsigned long freq = clk_get_rate(armss_clk) / 1000; > > while (freq_table[i].frequency != CPUFREQ_TABLE_END) { > - if (opp == freq_table[i].index) > + if (freq <= freq_table[i].frequency) > return freq_table[i].frequency; > i++; > } > > - /* We could not find a corresponding opp frequency. */ > + /* We could not find a corresponding frequency. */ > + pr_err("db8500-cpufreq: Failed to find cpufreq speed\n"); > return 0; > } > > @@ -92,6 +93,12 @@ static int __cpuinit db8500_cpufreq_init(struct cpufreq_policy *policy) > int i = 0; > int res; > > + armss_clk = clk_get(NULL, "armss"); > + if (IS_ERR(armss_clk)) { > + pr_err("db8500-cpufreq : Failed to get armss clk\n"); > + return PTR_ERR(armss_clk); > + } > + > pr_info("db8500-cpufreq : Available frequencies:\n"); > while (freq_table[i].frequency != CPUFREQ_TABLE_END) { > pr_info(" %d Mhz\n", freq_table[i].frequency/1000); > @@ -104,6 +111,7 @@ static int __cpuinit db8500_cpufreq_init(struct cpufreq_policy *policy) > cpufreq_frequency_table_get_attr(freq_table, policy->cpu); > else { > pr_err("db8500-cpufreq : Failed to read policy table\n"); > + clk_put(armss_clk); > return res; > } > > -- > 1.7.10 > Just a kind reminder on this Rafael; trying to collect acks, do you think we can advise Mike to merge this though his clk tree? Kind regards Ulf Hansson ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 8/8] cpufreq: db8500: Use armss clk to update frequency 2012-10-26 8:10 ` [PATCH 8/8] cpufreq: db8500: Use armss clk to update frequency Ulf Hansson @ 2012-10-26 11:20 ` Rafael J. Wysocki 0 siblings, 0 replies; 8+ messages in thread From: Rafael J. Wysocki @ 2012-10-26 11:20 UTC (permalink / raw) To: Ulf Hansson Cc: linux-arm-kernel, Mike Turquette, Mike Turquette, Samuel Ortiz, cpufreq, linux-pm, Linus Walleij, Lee Jones, Philippe Begnic, Rickard Andersson, Jonas Aberg, Vincent Guittot On Friday, October 26, 2012 10:10:40 AM Ulf Hansson wrote: > On 10 October 2012 13:42, Ulf Hansson <ulf.hansson@stericsson.com> wrote: > > From: Ulf Hansson <ulf.hansson@linaro.org> > > > > Using the armss clk to update the frequency makes the driver no more > > directly dependant on the prmcu API. > > > > Cc: Rafael J. Wysocki <rjw@sisk.pl> > > Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> > > --- > > drivers/cpufreq/db8500-cpufreq.c | 24 ++++++++++++++++-------- > > 1 file changed, 16 insertions(+), 8 deletions(-) > > > > diff --git a/drivers/cpufreq/db8500-cpufreq.c b/drivers/cpufreq/db8500-cpufreq.c > > index dea9a49..4f154bc 100644 > > --- a/drivers/cpufreq/db8500-cpufreq.c > > +++ b/drivers/cpufreq/db8500-cpufreq.c > > @@ -14,10 +14,11 @@ > > #include <linux/delay.h> > > #include <linux/slab.h> > > #include <linux/platform_device.h> > > -#include <linux/mfd/dbx500-prcmu.h> > > +#include <linux/clk.h> > > #include <mach/id.h> > > > > static struct cpufreq_frequency_table *freq_table; > > +static struct clk *armss_clk; > > > > static struct freq_attr *db8500_cpufreq_attr[] = { > > &cpufreq_freq_attr_scaling_available_freqs, > > @@ -58,9 +59,9 @@ static int db8500_cpufreq_target(struct cpufreq_policy *policy, > > for_each_cpu(freqs.cpu, policy->cpus) > > cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); > > > > - /* request the PRCM unit for opp change */ > > - if (prcmu_set_arm_opp(freq_table[idx].index)) { > > - pr_err("db8500-cpufreq: Failed to set OPP level\n"); > > + /* update armss clk frequency */ > > + if (clk_set_rate(armss_clk, freq_table[idx].frequency * 1000)) { > > + pr_err("db8500-cpufreq: Failed to update armss clk\n"); > > return -EINVAL; > > } > > > > @@ -74,16 +75,16 @@ static int db8500_cpufreq_target(struct cpufreq_policy *policy, > > static unsigned int db8500_cpufreq_getspeed(unsigned int cpu) > > { > > int i = 0; > > - /* request the prcm to get the current ARM opp */ > > - int opp = prcmu_get_arm_opp(); > > + unsigned long freq = clk_get_rate(armss_clk) / 1000; > > > > while (freq_table[i].frequency != CPUFREQ_TABLE_END) { > > - if (opp == freq_table[i].index) > > + if (freq <= freq_table[i].frequency) > > return freq_table[i].frequency; > > i++; > > } > > > > - /* We could not find a corresponding opp frequency. */ > > + /* We could not find a corresponding frequency. */ > > + pr_err("db8500-cpufreq: Failed to find cpufreq speed\n"); > > return 0; > > } > > > > @@ -92,6 +93,12 @@ static int __cpuinit db8500_cpufreq_init(struct cpufreq_policy *policy) > > int i = 0; > > int res; > > > > + armss_clk = clk_get(NULL, "armss"); > > + if (IS_ERR(armss_clk)) { > > + pr_err("db8500-cpufreq : Failed to get armss clk\n"); > > + return PTR_ERR(armss_clk); > > + } > > + > > pr_info("db8500-cpufreq : Available frequencies:\n"); > > while (freq_table[i].frequency != CPUFREQ_TABLE_END) { > > pr_info(" %d Mhz\n", freq_table[i].frequency/1000); > > @@ -104,6 +111,7 @@ static int __cpuinit db8500_cpufreq_init(struct cpufreq_policy *policy) > > cpufreq_frequency_table_get_attr(freq_table, policy->cpu); > > else { > > pr_err("db8500-cpufreq : Failed to read policy table\n"); > > + clk_put(armss_clk); > > return res; > > } > > > > -- > > 1.7.10 > > > > Just a kind reminder on this Rafael; trying to collect acks, do you > think we can advise Mike to merge this though his clk tree? Yes, please. Thanks, Rafael -- I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center. ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <20121011134458.GB15428@gmail.com>]
[parent not found: <CACRpkdYEukMzMX1Q8nb5zKPMZEZfttzWVC24aOkv2g8SCQtTnQ@mail.gmail.com>]
[parent not found: <20121011151947.GD15428@gmail.com>]
* Re: [PATCH 0/8] clk: ux500: Fixup smp_twd clk for clk notifiers [not found] ` <20121011151947.GD15428@gmail.com> @ 2012-10-26 8:19 ` Ulf Hansson 2012-10-26 8:57 ` Linus Walleij 2012-10-28 22:59 ` Samuel Ortiz 0 siblings, 2 replies; 8+ messages in thread From: Ulf Hansson @ 2012-10-26 8:19 UTC (permalink / raw) To: Samuel Ortiz Cc: Linus Walleij, Ulf Hansson, linux-arm-kernel, Mike Turquette, Mike Turquette, Rafael J. Wysocki, cpufreq, linux-pm, Philippe Begnic, Rickard Andersson, Jonas Aberg, Vincent Guittot On 11 October 2012 17:19, Lee Jones <lee.jones@linaro.org> wrote: > On Thu, 11 Oct 2012, Linus Walleij wrote: > >> On Thu, Oct 11, 2012 at 3:44 PM, Lee Jones <lee.jones@linaro.org> wrote: >> >> >> Patches are based on Linus Torvalds tree with latest commit as of okt 10. >> > >> > Hmm... I get: >> > >> > Applying: clk: ux500: Support for prcmu_scalable_rate clock >> > error: drivers/clk/ux500/clk-prcmu.c: does not exist in index >> > error: drivers/clk/ux500/clk.h: does not exist in index >> > Patch failed at 0001 clk: ux500: Support for prcmu_scalable_rate clock >> > >> > So when did drivers/clk/ux500/* arrive? >> >> Exactly here, 10 days ago on Torvalds' master branch: > > Ah I see. Basing patches on commits half way through the merge > window. Good move! ;) > > -- > Lee Jones > Linaro ST-Ericsson Landing Team Lead > Linaro.org │ Open source software for ARM SoCs > Follow Linaro: Facebook | Twitter | Blog Samuel, a kind reminder on this, trying to collect acks to be able to advise Mike to take this series through his clk tree. There are two mfd patches. [PATCH 2/8] mfd: db8500: Provide cpufreq table as platform data [PATCH 5/8] mfd: db8500: Connect ARMSS clk to ARM OPP Kind regards Ulf Hansson ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/8] clk: ux500: Fixup smp_twd clk for clk notifiers 2012-10-26 8:19 ` [PATCH 0/8] clk: ux500: Fixup smp_twd clk for clk notifiers Ulf Hansson @ 2012-10-26 8:57 ` Linus Walleij 2012-10-26 18:03 ` Mike Turquette 2012-10-28 22:59 ` Samuel Ortiz 1 sibling, 1 reply; 8+ messages in thread From: Linus Walleij @ 2012-10-26 8:57 UTC (permalink / raw) To: Ulf Hansson Cc: Samuel Ortiz, Ulf Hansson, linux-arm-kernel, Mike Turquette, Mike Turquette, Rafael J. Wysocki, cpufreq, linux-pm, Philippe Begnic, Rickard Andersson, Jonas Aberg, Vincent Guittot On Fri, Oct 26, 2012 at 10:19 AM, Ulf Hansson <ulf.hansson@linaro.org> wrote: > Samuel, a kind reminder on this, trying to collect acks to be able to > advise Mike to take this series through his clk tree. There are two > mfd patches. > [PATCH 2/8] mfd: db8500: Provide cpufreq table as platform data > [PATCH 5/8] mfd: db8500: Connect ARMSS clk to ARM OPP Two weeks of slack for review is good enough, involved subsystem maintainers have been Cc:ed. Mike T, can you just apply the patches please. Yours, Linus Walleij ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/8] clk: ux500: Fixup smp_twd clk for clk notifiers 2012-10-26 8:57 ` Linus Walleij @ 2012-10-26 18:03 ` Mike Turquette 2012-10-26 23:34 ` Linus Walleij 0 siblings, 1 reply; 8+ messages in thread From: Mike Turquette @ 2012-10-26 18:03 UTC (permalink / raw) To: Linus Walleij, Ulf Hansson Cc: Samuel Ortiz, Ulf Hansson, linux-arm-kernel, Rafael J. Wysocki, cpufreq, linux-pm, Philippe Begnic, Rickard Andersson, Jonas Aberg, Vincent Guittot Quoting Linus Walleij (2012-10-26 01:57:49) > On Fri, Oct 26, 2012 at 10:19 AM, Ulf Hansson <ulf.hansson@linaro.org> wrote: > > > Samuel, a kind reminder on this, trying to collect acks to be able to > > advise Mike to take this series through his clk tree. There are two > > mfd patches. > > [PATCH 2/8] mfd: db8500: Provide cpufreq table as platform data > > [PATCH 5/8] mfd: db8500: Connect ARMSS clk to ARM OPP > > Two weeks of slack for review is good enough, involved > subsystem maintainers have been Cc:ed. > > Mike T, can you just apply the patches please. > Would be better to get ACKs but enough time has passed. I'll take these into clk-next (which will get built while I fly to Copenhagen for LCE). Expect to see a new clk-next on Monday. Regards, Mike > Yours, > Linus Walleij ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/8] clk: ux500: Fixup smp_twd clk for clk notifiers 2012-10-26 18:03 ` Mike Turquette @ 2012-10-26 23:34 ` Linus Walleij 0 siblings, 0 replies; 8+ messages in thread From: Linus Walleij @ 2012-10-26 23:34 UTC (permalink / raw) To: Mike Turquette Cc: Ulf Hansson, Samuel Ortiz, Ulf Hansson, linux-arm-kernel, Rafael J. Wysocki, cpufreq, linux-pm, Philippe Begnic, Rickard Andersson, Jonas Aberg, Vincent Guittot On Fri, Oct 26, 2012 at 8:03 PM, Mike Turquette <mturquette@ti.com> wrote: > Would be better to get ACKs but enough time has passed. I'll take these > into clk-next (which will get built while I fly to Copenhagen for LCE). OK FWIW: Acked-by: Linus Walleij <linus.walleij@linaro.org> for all. Yours, Linus Walleij ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/8] clk: ux500: Fixup smp_twd clk for clk notifiers 2012-10-26 8:19 ` [PATCH 0/8] clk: ux500: Fixup smp_twd clk for clk notifiers Ulf Hansson 2012-10-26 8:57 ` Linus Walleij @ 2012-10-28 22:59 ` Samuel Ortiz 2012-11-05 12:33 ` Ulf Hansson 1 sibling, 1 reply; 8+ messages in thread From: Samuel Ortiz @ 2012-10-28 22:59 UTC (permalink / raw) To: Ulf Hansson Cc: Linus Walleij, Ulf Hansson, linux-arm-kernel, Mike Turquette, Mike Turquette, Rafael J. Wysocki, cpufreq, linux-pm, Philippe Begnic, Rickard Andersson, Jonas Aberg, Vincent Guittot Hi Ulf, On Fri, Oct 26, 2012 at 10:19:24AM +0200, Ulf Hansson wrote: > On 11 October 2012 17:19, Lee Jones <lee.jones@linaro.org> wrote: > > On Thu, 11 Oct 2012, Linus Walleij wrote: > > > >> On Thu, Oct 11, 2012 at 3:44 PM, Lee Jones <lee.jones@linaro.org> wrote: > >> > >> >> Patches are based on Linus Torvalds tree with latest commit as of okt 10. > >> > > >> > Hmm... I get: > >> > > >> > Applying: clk: ux500: Support for prcmu_scalable_rate clock > >> > error: drivers/clk/ux500/clk-prcmu.c: does not exist in index > >> > error: drivers/clk/ux500/clk.h: does not exist in index > >> > Patch failed at 0001 clk: ux500: Support for prcmu_scalable_rate clock > >> > > >> > So when did drivers/clk/ux500/* arrive? > >> > >> Exactly here, 10 days ago on Torvalds' master branch: > > > > Ah I see. Basing patches on commits half way through the merge > > window. Good move! ;) > > > > -- > > Lee Jones > > Linaro ST-Ericsson Landing Team Lead > > Linaro.org │ Open source software for ARM SoCs > > Follow Linaro: Facebook | Twitter | Blog > > Samuel, a kind reminder on this, trying to collect acks to be able to > advise Mike to take this series through his clk tree. There are two > mfd patches. > [PATCH 2/8] mfd: db8500: Provide cpufreq table as platform data > [PATCH 5/8] mfd: db8500: Connect ARMSS clk to ARM OPP Sorry for the delay: Acked-by: Samuel Ortiz <sameo@linux.intel.com> Cheers, Samuel. -- Intel Open Source Technology Centre http://oss.intel.com/ ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/8] clk: ux500: Fixup smp_twd clk for clk notifiers 2012-10-28 22:59 ` Samuel Ortiz @ 2012-11-05 12:33 ` Ulf Hansson 0 siblings, 0 replies; 8+ messages in thread From: Ulf Hansson @ 2012-11-05 12:33 UTC (permalink / raw) To: Mike Turquette, Mike Turquette Cc: Philippe Begnic, Vincent Guittot, Samuel Ortiz, Jonas Aberg, linux-pm, Linus Walleij, cpufreq, Rickard Andersson, Rafael J. Wysocki, Ulf Hansson, linux-arm-kernel On 28 October 2012 23:59, Samuel Ortiz <sameo@linux.intel.com> wrote: > Hi Ulf, > > On Fri, Oct 26, 2012 at 10:19:24AM +0200, Ulf Hansson wrote: >> On 11 October 2012 17:19, Lee Jones <lee.jones@linaro.org> wrote: >> > On Thu, 11 Oct 2012, Linus Walleij wrote: >> > >> >> On Thu, Oct 11, 2012 at 3:44 PM, Lee Jones <lee.jones@linaro.org> wrote: >> >> >> >> >> Patches are based on Linus Torvalds tree with latest commit as of okt 10. >> >> > >> >> > Hmm... I get: >> >> > >> >> > Applying: clk: ux500: Support for prcmu_scalable_rate clock >> >> > error: drivers/clk/ux500/clk-prcmu.c: does not exist in index >> >> > error: drivers/clk/ux500/clk.h: does not exist in index >> >> > Patch failed at 0001 clk: ux500: Support for prcmu_scalable_rate clock >> >> > >> >> > So when did drivers/clk/ux500/* arrive? >> >> >> >> Exactly here, 10 days ago on Torvalds' master branch: >> > >> > Ah I see. Basing patches on commits half way through the merge >> > window. Good move! ;) >> > >> > -- >> > Lee Jones >> > Linaro ST-Ericsson Landing Team Lead >> > Linaro.org │ Open source software for ARM SoCs >> > Follow Linaro: Facebook | Twitter | Blog >> >> Samuel, a kind reminder on this, trying to collect acks to be able to >> advise Mike to take this series through his clk tree. There are two >> mfd patches. >> [PATCH 2/8] mfd: db8500: Provide cpufreq table as platform data >> [PATCH 5/8] mfd: db8500: Connect ARMSS clk to ARM OPP > Sorry for the delay: > > Acked-by: Samuel Ortiz <sameo@linux.intel.com> > > Cheers, > Samuel. > > -- > Intel Open Source Technology Centre > http://oss.intel.com/ > -- > To unsubscribe from this list: send the line "unsubscribe linux-pm" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html A kind ping for this this series for you Mike. I believe all patches has received acks now as well. Kind regards Ulf Hansson _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2012-11-05 12:33 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <1349869349-8070-1-git-send-email-ulf.hansson@stericsson.com> [not found] ` <1349869349-8070-9-git-send-email-ulf.hansson@stericsson.com> 2012-10-26 8:10 ` [PATCH 8/8] cpufreq: db8500: Use armss clk to update frequency Ulf Hansson 2012-10-26 11:20 ` Rafael J. Wysocki [not found] ` <20121011134458.GB15428@gmail.com> [not found] ` <CACRpkdYEukMzMX1Q8nb5zKPMZEZfttzWVC24aOkv2g8SCQtTnQ@mail.gmail.com> [not found] ` <20121011151947.GD15428@gmail.com> 2012-10-26 8:19 ` [PATCH 0/8] clk: ux500: Fixup smp_twd clk for clk notifiers Ulf Hansson 2012-10-26 8:57 ` Linus Walleij 2012-10-26 18:03 ` Mike Turquette 2012-10-26 23:34 ` Linus Walleij 2012-10-28 22:59 ` Samuel Ortiz 2012-11-05 12:33 ` Ulf Hansson
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).