* [PATCH 1/4] ARM: dts: imx6sl: Adding cpu frequency table
@ 2013-12-18 23:50 John Tobias
2013-12-18 23:50 ` [PATCH 2/4] ARM: imx: Add cpu frequency scaling support John Tobias
` (3 more replies)
0 siblings, 4 replies; 10+ messages in thread
From: John Tobias @ 2013-12-18 23:50 UTC (permalink / raw)
To: linux-arm-kernel
Device tree for iMX6SL doesn't have an existing cpu frequency table.
Signed-off-by: John Tobias <john.tobias.ph@gmail.com>
---
arch/arm/boot/dts/imx6sl.dtsi | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/arch/arm/boot/dts/imx6sl.dtsi b/arch/arm/boot/dts/imx6sl.dtsi
index 28558f1..473d54b 100644
--- a/arch/arm/boot/dts/imx6sl.dtsi
+++ b/arch/arm/boot/dts/imx6sl.dtsi
@@ -38,6 +38,21 @@
device_type = "cpu";
reg = <0x0>;
next-level-cache = <&L2>;
+ operating-points = <
+ /* kHz uV */
+ 996000 1275000
+ 792000 1175000
+ 396000 975000
+ >;
+ clock-latency = <61036>; /* two CLK32 periods */
+ clocks = <&clks IMX6SL_CLK_ARM>, <&clks IMX6SL_CLK_PLL2_PFD2>,
+ <&clks IMX6SL_CLK_STEP>, <&clks IMX6SL_CLK_PLL1_SW>,
+ <&clks IMX6SL_CLK_PLL1_SYS>;
+ clock-names = "arm", "pll2_pfd2_396m", "step",
+ "pll1_sw", "pll1_sys";
+ arm-supply = <®_arm>;
+ pu-supply = <®_pu>;
+ soc-supply = <®_soc>;
};
};
--
1.8.3.2
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 2/4] ARM: imx: Add cpu frequency scaling support
2013-12-18 23:50 [PATCH 1/4] ARM: dts: imx6sl: Adding cpu frequency table John Tobias
@ 2013-12-18 23:50 ` John Tobias
2013-12-19 5:48 ` Shawn Guo
2013-12-18 23:50 ` [PATCH 3/4] cpufreq: imx6q: add of_init_opp_table John Tobias
` (2 subsequent siblings)
3 siblings, 1 reply; 10+ messages in thread
From: John Tobias @ 2013-12-18 23:50 UTC (permalink / raw)
To: linux-arm-kernel
Re-using iMX6Q driver for cpu frequency scaling.
Signed-off-by: John Tobias <john.tobias.ph@gmail.com>
---
arch/arm/mach-imx/mach-imx6sl.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-imx/mach-imx6sl.c b/arch/arm/mach-imx/mach-imx6sl.c
index 2f952e3..a8b1543 100644
--- a/arch/arm/mach-imx/mach-imx6sl.c
+++ b/arch/arm/mach-imx/mach-imx6sl.c
@@ -8,7 +8,6 @@
*/
#include <linux/irqchip.h>
-#include <linux/of.h>
#include <linux/of_platform.h>
#include <linux/mfd/syscon.h>
#include <linux/mfd/syscon/imx6q-iomuxc-gpr.h>
@@ -34,6 +33,17 @@ static void __init imx6sl_fec_init(void)
}
}
+static struct platform_device imx6q_cpufreq_pdev = {
+ .name = "imx6q-cpufreq",
+};
+
+static void __init imx6sl_init_late(void)
+{
+ if (IS_ENABLED(CONFIG_ARM_IMX6Q_CPUFREQ)) {
+ platform_device_register(&imx6q_cpufreq_pdev);
+ }
+}
+
static void __init imx6sl_init_machine(void)
{
struct device *parent;
@@ -70,6 +80,7 @@ DT_MACHINE_START(IMX6SL, "Freescale i.MX6 SoloLite (Device Tree)")
.map_io = debug_ll_io_init,
.init_irq = imx6sl_init_irq,
.init_machine = imx6sl_init_machine,
+ .init_late = imx6sl_init_late,
.dt_compat = imx6sl_dt_compat,
.restart = mxc_restart,
MACHINE_END
--
1.8.3.2
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 3/4] cpufreq: imx6q: add of_init_opp_table
2013-12-18 23:50 [PATCH 1/4] ARM: dts: imx6sl: Adding cpu frequency table John Tobias
2013-12-18 23:50 ` [PATCH 2/4] ARM: imx: Add cpu frequency scaling support John Tobias
@ 2013-12-18 23:50 ` John Tobias
2013-12-18 23:50 ` [PATCH 4/4] PM / OPP: export symbol find_device_opp John Tobias
2013-12-19 5:42 ` [PATCH 1/4] ARM: dts: imx6sl: Adding cpu frequency table Shawn Guo
3 siblings, 0 replies; 10+ messages in thread
From: John Tobias @ 2013-12-18 23:50 UTC (permalink / raw)
To: linux-arm-kernel
Add a routine check to see if the the platform supplied the OPP table.
Incase there's no OPP table exist, it will try to initialise it.
Signed-off-by: John Tobias <john.tobias.ph@gmail.com>
---
drivers/cpufreq/imx6q-cpufreq.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/cpufreq/imx6q-cpufreq.c b/drivers/cpufreq/imx6q-cpufreq.c
index 4b3f18e..47dbf3c 100644
--- a/drivers/cpufreq/imx6q-cpufreq.c
+++ b/drivers/cpufreq/imx6q-cpufreq.c
@@ -151,6 +151,7 @@ static int imx6q_cpufreq_probe(struct platform_device *pdev)
{
struct device_node *np;
struct dev_pm_opp *opp;
+ struct device_opp *tmp_dev_opp;
unsigned long min_volt, max_volt;
int num, ret;
@@ -166,6 +167,17 @@ static int imx6q_cpufreq_probe(struct platform_device *pdev)
return -ENOENT;
}
+ /* Get the OPP table, if the platform did not supply it. */
+ tmp_dev_opp = find_device_opp(cpu_dev);
+ if (IS_ERR(tmp_dev_opp)) {
+ ret = of_init_opp_table(cpu_dev);
+ if (ret < 0) {
+ dev_err(cpu_dev, "failed to init OPP table\n");
+ ret = -ENODEV;
+ goto put_node;
+ }
+ }
+
arm_clk = devm_clk_get(cpu_dev, "arm");
pll1_sys_clk = devm_clk_get(cpu_dev, "pll1_sys");
pll1_sw_clk = devm_clk_get(cpu_dev, "pll1_sw");
--
1.8.3.2
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 4/4] PM / OPP: export symbol find_device_opp
2013-12-18 23:50 [PATCH 1/4] ARM: dts: imx6sl: Adding cpu frequency table John Tobias
2013-12-18 23:50 ` [PATCH 2/4] ARM: imx: Add cpu frequency scaling support John Tobias
2013-12-18 23:50 ` [PATCH 3/4] cpufreq: imx6q: add of_init_opp_table John Tobias
@ 2013-12-18 23:50 ` John Tobias
2013-12-19 5:54 ` Shawn Guo
2013-12-19 5:42 ` [PATCH 1/4] ARM: dts: imx6sl: Adding cpu frequency table Shawn Guo
3 siblings, 1 reply; 10+ messages in thread
From: John Tobias @ 2013-12-18 23:50 UTC (permalink / raw)
To: linux-arm-kernel
imx6q-cpufreq.c need to have access to find_device_opp function, in order
to verify if the platform supplied an OPP table or not.
As an example here are the imx6q and imx6sl.
imx6q supplied the opp table due to some board specific requirement.
While, imx6sl doesn't have an opp table defined.
Signed-off-by: John Tobias <john.tobias.ph@gmail.com>
---
drivers/base/power/opp.c | 3 ++-
include/linux/pm_opp.h | 7 +++++++
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/base/power/opp.c b/drivers/base/power/opp.c
index fa41874..d758e42 100644
--- a/drivers/base/power/opp.c
+++ b/drivers/base/power/opp.c
@@ -116,7 +116,7 @@ static DEFINE_MUTEX(dev_opp_list_lock);
* is a RCU protected pointer. This means that device_opp is valid as long
* as we are under RCU lock.
*/
-static struct device_opp *find_device_opp(struct device *dev)
+struct device_opp *find_device_opp(struct device *dev)
{
struct device_opp *tmp_dev_opp, *dev_opp = ERR_PTR(-ENODEV);
@@ -134,6 +134,7 @@ static struct device_opp *find_device_opp(struct device *dev)
return dev_opp;
}
+EXPORT_SYMBOL_GPL(find_device_opp);
/**
* dev_pm_opp_get_voltage() - Gets the voltage corresponding to an available opp
diff --git a/include/linux/pm_opp.h b/include/linux/pm_opp.h
index 5151b00..cd13385 100644
--- a/include/linux/pm_opp.h
+++ b/include/linux/pm_opp.h
@@ -27,6 +27,8 @@ enum dev_pm_opp_event {
#if defined(CONFIG_PM_OPP)
+struct device_opp *find_device_opp(struct device *dev);
+
unsigned long dev_pm_opp_get_voltage(struct dev_pm_opp *opp);
unsigned long dev_pm_opp_get_freq(struct dev_pm_opp *opp);
@@ -52,6 +54,11 @@ int dev_pm_opp_disable(struct device *dev, unsigned long freq);
struct srcu_notifier_head *dev_pm_opp_get_notifier(struct device *dev);
#else
+static inline struct device_opp *find_device_opp(struct device *dev)
+{
+ return ERR_PTR(-EINVAL);
+}
+
static inline unsigned long dev_pm_opp_get_voltage(struct dev_pm_opp *opp)
{
return 0;
--
1.8.3.2
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 1/4] ARM: dts: imx6sl: Adding cpu frequency table
2013-12-18 23:50 [PATCH 1/4] ARM: dts: imx6sl: Adding cpu frequency table John Tobias
` (2 preceding siblings ...)
2013-12-18 23:50 ` [PATCH 4/4] PM / OPP: export symbol find_device_opp John Tobias
@ 2013-12-19 5:42 ` Shawn Guo
2013-12-19 6:54 ` John Tobias
3 siblings, 1 reply; 10+ messages in thread
From: Shawn Guo @ 2013-12-19 5:42 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Dec 18, 2013 at 03:50:53PM -0800, John Tobias wrote:
> Device tree for iMX6SL doesn't have an existing cpu frequency table.
>
> Signed-off-by: John Tobias <john.tobias.ph@gmail.com>
> ---
> arch/arm/boot/dts/imx6sl.dtsi | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/arch/arm/boot/dts/imx6sl.dtsi b/arch/arm/boot/dts/imx6sl.dtsi
> index 28558f1..473d54b 100644
> --- a/arch/arm/boot/dts/imx6sl.dtsi
> +++ b/arch/arm/boot/dts/imx6sl.dtsi
> @@ -38,6 +38,21 @@
> device_type = "cpu";
> reg = <0x0>;
> next-level-cache = <&L2>;
> + operating-points = <
> + /* kHz uV */
> + 996000 1275000
> + 792000 1175000
> + 396000 975000
> + >;
Anson is pushing VDDSOC/PU voltage settings upstream. We may want to
add the following VDDSOC/PU operating-points as well.
fsl,soc-operating-points = <
/* ARM kHz SOC-PU uV */
996000 1225000
792000 1175000
396000 1175000
>;
Shawn
> + clock-latency = <61036>; /* two CLK32 periods */
> + clocks = <&clks IMX6SL_CLK_ARM>, <&clks IMX6SL_CLK_PLL2_PFD2>,
> + <&clks IMX6SL_CLK_STEP>, <&clks IMX6SL_CLK_PLL1_SW>,
> + <&clks IMX6SL_CLK_PLL1_SYS>;
> + clock-names = "arm", "pll2_pfd2_396m", "step",
> + "pll1_sw", "pll1_sys";
> + arm-supply = <®_arm>;
> + pu-supply = <®_pu>;
> + soc-supply = <®_soc>;
> };
> };
>
> --
> 1.8.3.2
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 2/4] ARM: imx: Add cpu frequency scaling support
2013-12-18 23:50 ` [PATCH 2/4] ARM: imx: Add cpu frequency scaling support John Tobias
@ 2013-12-19 5:48 ` Shawn Guo
2013-12-19 6:36 ` John Tobias
0 siblings, 1 reply; 10+ messages in thread
From: Shawn Guo @ 2013-12-19 5:48 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Dec 18, 2013 at 03:50:54PM -0800, John Tobias wrote:
> Re-using iMX6Q driver for cpu frequency scaling.
>
> Signed-off-by: John Tobias <john.tobias.ph@gmail.com>
> ---
> arch/arm/mach-imx/mach-imx6sl.c | 13 ++++++++++++-
> 1 file changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-imx/mach-imx6sl.c b/arch/arm/mach-imx/mach-imx6sl.c
> index 2f952e3..a8b1543 100644
> --- a/arch/arm/mach-imx/mach-imx6sl.c
> +++ b/arch/arm/mach-imx/mach-imx6sl.c
> @@ -8,7 +8,6 @@
> */
>
> #include <linux/irqchip.h>
> -#include <linux/of.h>
This is an unrelated change to the patch.
> #include <linux/of_platform.h>
> #include <linux/mfd/syscon.h>
> #include <linux/mfd/syscon/imx6q-iomuxc-gpr.h>
> @@ -34,6 +33,17 @@ static void __init imx6sl_fec_init(void)
> }
> }
>
> +static struct platform_device imx6q_cpufreq_pdev = {
> + .name = "imx6q-cpufreq",
> +};
> +
> +static void __init imx6sl_init_late(void)
> +{
> + if (IS_ENABLED(CONFIG_ARM_IMX6Q_CPUFREQ)) {
Unnecessary braces.
> + platform_device_register(&imx6q_cpufreq_pdev);
Register the device in the following way will save imx6q_cpufreq_pdev.
platform_device_register_simple("imx6q-cpufreq", -1, NULL, 0);
Shawn
> + }
> +}
> +
> static void __init imx6sl_init_machine(void)
> {
> struct device *parent;
> @@ -70,6 +80,7 @@ DT_MACHINE_START(IMX6SL, "Freescale i.MX6 SoloLite (Device Tree)")
> .map_io = debug_ll_io_init,
> .init_irq = imx6sl_init_irq,
> .init_machine = imx6sl_init_machine,
> + .init_late = imx6sl_init_late,
> .dt_compat = imx6sl_dt_compat,
> .restart = mxc_restart,
> MACHINE_END
> --
> 1.8.3.2
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 4/4] PM / OPP: export symbol find_device_opp
2013-12-18 23:50 ` [PATCH 4/4] PM / OPP: export symbol find_device_opp John Tobias
@ 2013-12-19 5:54 ` Shawn Guo
2013-12-19 6:47 ` John Tobias
0 siblings, 1 reply; 10+ messages in thread
From: Shawn Guo @ 2013-12-19 5:54 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Dec 18, 2013 at 03:50:56PM -0800, John Tobias wrote:
> imx6q-cpufreq.c need to have access to find_device_opp function, in order
> to verify if the platform supplied an OPP table or not.
I think we can figure it out by checking the return of
dev_pm_opp_get_opp_count() call, so that we can save this patch
completely.
Note, imx6q-cpufreq driver already calls dev_pm_opp_get_opp_count().
You need to change the way how it handles the return.
Shawn
>
> As an example here are the imx6q and imx6sl.
> imx6q supplied the opp table due to some board specific requirement.
> While, imx6sl doesn't have an opp table defined.
>
> Signed-off-by: John Tobias <john.tobias.ph@gmail.com>
> ---
> drivers/base/power/opp.c | 3 ++-
> include/linux/pm_opp.h | 7 +++++++
> 2 files changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/base/power/opp.c b/drivers/base/power/opp.c
> index fa41874..d758e42 100644
> --- a/drivers/base/power/opp.c
> +++ b/drivers/base/power/opp.c
> @@ -116,7 +116,7 @@ static DEFINE_MUTEX(dev_opp_list_lock);
> * is a RCU protected pointer. This means that device_opp is valid as long
> * as we are under RCU lock.
> */
> -static struct device_opp *find_device_opp(struct device *dev)
> +struct device_opp *find_device_opp(struct device *dev)
> {
> struct device_opp *tmp_dev_opp, *dev_opp = ERR_PTR(-ENODEV);
>
> @@ -134,6 +134,7 @@ static struct device_opp *find_device_opp(struct device *dev)
>
> return dev_opp;
> }
> +EXPORT_SYMBOL_GPL(find_device_opp);
>
> /**
> * dev_pm_opp_get_voltage() - Gets the voltage corresponding to an available opp
> diff --git a/include/linux/pm_opp.h b/include/linux/pm_opp.h
> index 5151b00..cd13385 100644
> --- a/include/linux/pm_opp.h
> +++ b/include/linux/pm_opp.h
> @@ -27,6 +27,8 @@ enum dev_pm_opp_event {
>
> #if defined(CONFIG_PM_OPP)
>
> +struct device_opp *find_device_opp(struct device *dev);
> +
> unsigned long dev_pm_opp_get_voltage(struct dev_pm_opp *opp);
>
> unsigned long dev_pm_opp_get_freq(struct dev_pm_opp *opp);
> @@ -52,6 +54,11 @@ int dev_pm_opp_disable(struct device *dev, unsigned long freq);
>
> struct srcu_notifier_head *dev_pm_opp_get_notifier(struct device *dev);
> #else
> +static inline struct device_opp *find_device_opp(struct device *dev)
> +{
> + return ERR_PTR(-EINVAL);
> +}
> +
> static inline unsigned long dev_pm_opp_get_voltage(struct dev_pm_opp *opp)
> {
> return 0;
> --
> 1.8.3.2
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 2/4] ARM: imx: Add cpu frequency scaling support
2013-12-19 5:48 ` Shawn Guo
@ 2013-12-19 6:36 ` John Tobias
0 siblings, 0 replies; 10+ messages in thread
From: John Tobias @ 2013-12-19 6:36 UTC (permalink / raw)
To: linux-arm-kernel
Thanks for checking again. I should carefully check the unnecessary
braces and exercise the tools available in script.
Will re-submit again tomorrow.
Regards,
john
On Wed, Dec 18, 2013 at 9:48 PM, Shawn Guo <shawn.guo@linaro.org> wrote:
> On Wed, Dec 18, 2013 at 03:50:54PM -0800, John Tobias wrote:
>> Re-using iMX6Q driver for cpu frequency scaling.
>>
>> Signed-off-by: John Tobias <john.tobias.ph@gmail.com>
>> ---
>> arch/arm/mach-imx/mach-imx6sl.c | 13 ++++++++++++-
>> 1 file changed, 12 insertions(+), 1 deletion(-)
>>
>> diff --git a/arch/arm/mach-imx/mach-imx6sl.c b/arch/arm/mach-imx/mach-imx6sl.c
>> index 2f952e3..a8b1543 100644
>> --- a/arch/arm/mach-imx/mach-imx6sl.c
>> +++ b/arch/arm/mach-imx/mach-imx6sl.c
>> @@ -8,7 +8,6 @@
>> */
>>
>> #include <linux/irqchip.h>
>> -#include <linux/of.h>
>
> This is an unrelated change to the patch.
>
>> #include <linux/of_platform.h>
>> #include <linux/mfd/syscon.h>
>> #include <linux/mfd/syscon/imx6q-iomuxc-gpr.h>
>> @@ -34,6 +33,17 @@ static void __init imx6sl_fec_init(void)
>> }
>> }
>>
>> +static struct platform_device imx6q_cpufreq_pdev = {
>> + .name = "imx6q-cpufreq",
>> +};
>> +
>> +static void __init imx6sl_init_late(void)
>> +{
>> + if (IS_ENABLED(CONFIG_ARM_IMX6Q_CPUFREQ)) {
>
> Unnecessary braces.
>
>> + platform_device_register(&imx6q_cpufreq_pdev);
>
> Register the device in the following way will save imx6q_cpufreq_pdev.
>
> platform_device_register_simple("imx6q-cpufreq", -1, NULL, 0);
>
> Shawn
>
>> + }
>> +}
>> +
>> static void __init imx6sl_init_machine(void)
>> {
>> struct device *parent;
>> @@ -70,6 +80,7 @@ DT_MACHINE_START(IMX6SL, "Freescale i.MX6 SoloLite (Device Tree)")
>> .map_io = debug_ll_io_init,
>> .init_irq = imx6sl_init_irq,
>> .init_machine = imx6sl_init_machine,
>> + .init_late = imx6sl_init_late,
>> .dt_compat = imx6sl_dt_compat,
>> .restart = mxc_restart,
>> MACHINE_END
>> --
>> 1.8.3.2
>>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 4/4] PM / OPP: export symbol find_device_opp
2013-12-19 5:54 ` Shawn Guo
@ 2013-12-19 6:47 ` John Tobias
0 siblings, 0 replies; 10+ messages in thread
From: John Tobias @ 2013-12-19 6:47 UTC (permalink / raw)
To: linux-arm-kernel
My first implementation was to call dev_pm_opp_get_opp_count. But,
looking at the opp.c code, find_device_opp
was the most relevant function than dev_pm_opp_get_opp_count. I will
re-submit the patch using dev_pm_opp_get_opp_count.
Thanks,
john
On Wed, Dec 18, 2013 at 9:54 PM, Shawn Guo <shawn.guo@linaro.org> wrote:
> On Wed, Dec 18, 2013 at 03:50:56PM -0800, John Tobias wrote:
>> imx6q-cpufreq.c need to have access to find_device_opp function, in order
>> to verify if the platform supplied an OPP table or not.
>
> I think we can figure it out by checking the return of
> dev_pm_opp_get_opp_count() call, so that we can save this patch
> completely.
>
> Note, imx6q-cpufreq driver already calls dev_pm_opp_get_opp_count().
> You need to change the way how it handles the return.
>
> Shawn
>
>>
>> As an example here are the imx6q and imx6sl.
>> imx6q supplied the opp table due to some board specific requirement.
>> While, imx6sl doesn't have an opp table defined.
>>
>> Signed-off-by: John Tobias <john.tobias.ph@gmail.com>
>> ---
>> drivers/base/power/opp.c | 3 ++-
>> include/linux/pm_opp.h | 7 +++++++
>> 2 files changed, 9 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/base/power/opp.c b/drivers/base/power/opp.c
>> index fa41874..d758e42 100644
>> --- a/drivers/base/power/opp.c
>> +++ b/drivers/base/power/opp.c
>> @@ -116,7 +116,7 @@ static DEFINE_MUTEX(dev_opp_list_lock);
>> * is a RCU protected pointer. This means that device_opp is valid as long
>> * as we are under RCU lock.
>> */
>> -static struct device_opp *find_device_opp(struct device *dev)
>> +struct device_opp *find_device_opp(struct device *dev)
>> {
>> struct device_opp *tmp_dev_opp, *dev_opp = ERR_PTR(-ENODEV);
>>
>> @@ -134,6 +134,7 @@ static struct device_opp *find_device_opp(struct device *dev)
>>
>> return dev_opp;
>> }
>> +EXPORT_SYMBOL_GPL(find_device_opp);
>>
>> /**
>> * dev_pm_opp_get_voltage() - Gets the voltage corresponding to an available opp
>> diff --git a/include/linux/pm_opp.h b/include/linux/pm_opp.h
>> index 5151b00..cd13385 100644
>> --- a/include/linux/pm_opp.h
>> +++ b/include/linux/pm_opp.h
>> @@ -27,6 +27,8 @@ enum dev_pm_opp_event {
>>
>> #if defined(CONFIG_PM_OPP)
>>
>> +struct device_opp *find_device_opp(struct device *dev);
>> +
>> unsigned long dev_pm_opp_get_voltage(struct dev_pm_opp *opp);
>>
>> unsigned long dev_pm_opp_get_freq(struct dev_pm_opp *opp);
>> @@ -52,6 +54,11 @@ int dev_pm_opp_disable(struct device *dev, unsigned long freq);
>>
>> struct srcu_notifier_head *dev_pm_opp_get_notifier(struct device *dev);
>> #else
>> +static inline struct device_opp *find_device_opp(struct device *dev)
>> +{
>> + return ERR_PTR(-EINVAL);
>> +}
>> +
>> static inline unsigned long dev_pm_opp_get_voltage(struct dev_pm_opp *opp)
>> {
>> return 0;
>> --
>> 1.8.3.2
>>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/4] ARM: dts: imx6sl: Adding cpu frequency table
2013-12-19 5:42 ` [PATCH 1/4] ARM: dts: imx6sl: Adding cpu frequency table Shawn Guo
@ 2013-12-19 6:54 ` John Tobias
0 siblings, 0 replies; 10+ messages in thread
From: John Tobias @ 2013-12-19 6:54 UTC (permalink / raw)
To: linux-arm-kernel
Great! I will add it.
John
On Wed, Dec 18, 2013 at 9:42 PM, Shawn Guo <shawn.guo@linaro.org> wrote:
> On Wed, Dec 18, 2013 at 03:50:53PM -0800, John Tobias wrote:
>> Device tree for iMX6SL doesn't have an existing cpu frequency table.
>>
>> Signed-off-by: John Tobias <john.tobias.ph@gmail.com>
>> ---
>> arch/arm/boot/dts/imx6sl.dtsi | 15 +++++++++++++++
>> 1 file changed, 15 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/imx6sl.dtsi b/arch/arm/boot/dts/imx6sl.dtsi
>> index 28558f1..473d54b 100644
>> --- a/arch/arm/boot/dts/imx6sl.dtsi
>> +++ b/arch/arm/boot/dts/imx6sl.dtsi
>> @@ -38,6 +38,21 @@
>> device_type = "cpu";
>> reg = <0x0>;
>> next-level-cache = <&L2>;
>> + operating-points = <
>> + /* kHz uV */
>> + 996000 1275000
>> + 792000 1175000
>> + 396000 975000
>> + >;
>
> Anson is pushing VDDSOC/PU voltage settings upstream. We may want to
> add the following VDDSOC/PU operating-points as well.
>
> fsl,soc-operating-points = <
> /* ARM kHz SOC-PU uV */
> 996000 1225000
> 792000 1175000
> 396000 1175000
> >;
>
> Shawn
>
>> + clock-latency = <61036>; /* two CLK32 periods */
>> + clocks = <&clks IMX6SL_CLK_ARM>, <&clks IMX6SL_CLK_PLL2_PFD2>,
>> + <&clks IMX6SL_CLK_STEP>, <&clks IMX6SL_CLK_PLL1_SW>,
>> + <&clks IMX6SL_CLK_PLL1_SYS>;
>> + clock-names = "arm", "pll2_pfd2_396m", "step",
>> + "pll1_sw", "pll1_sys";
>> + arm-supply = <®_arm>;
>> + pu-supply = <®_pu>;
>> + soc-supply = <®_soc>;
>> };
>> };
>>
>> --
>> 1.8.3.2
>>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2013-12-19 6:54 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-18 23:50 [PATCH 1/4] ARM: dts: imx6sl: Adding cpu frequency table John Tobias
2013-12-18 23:50 ` [PATCH 2/4] ARM: imx: Add cpu frequency scaling support John Tobias
2013-12-19 5:48 ` Shawn Guo
2013-12-19 6:36 ` John Tobias
2013-12-18 23:50 ` [PATCH 3/4] cpufreq: imx6q: add of_init_opp_table John Tobias
2013-12-18 23:50 ` [PATCH 4/4] PM / OPP: export symbol find_device_opp John Tobias
2013-12-19 5:54 ` Shawn Guo
2013-12-19 6:47 ` John Tobias
2013-12-19 5:42 ` [PATCH 1/4] ARM: dts: imx6sl: Adding cpu frequency table Shawn Guo
2013-12-19 6:54 ` John Tobias
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).