Skip to contentSkip to conversation

ARM: mvebu: use the cpufreq-dt platform_data for independent clocks

PATCH New Thomas Petazzoni 3 participants 3 messages Dec 2, 2014 – Dec 4, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: mvebu: use the cpufreq-dt platform_data for independent clocks

This commit adjusts the registration of the cpufreq-dt driver in the mvebu platform to indicate to the cpufreq driver that the platform has independent clocks for each CPU.

---
Jason, this commit was part of my "[PATCHv2 0/4] cpufreq-dt, platform_data based proposal" series, which included 3 patches for drivers/cpufreq/, and this last patch for mach-mvebu to make use of the new cpufreq feature. However, in order to not confuse the cpufreq maintainer, when I sent "[PATCH v3 0/3] cpufreq: cpufreq-dt:
platform_data based proposal", I didn't include this patch for mach-mvebu.

But now, it means that this is the only missing piece to get cpufreq working on Armada XP. Do you think you could squeeze it into the things merged for 3.19 ? It's a very small patch, so hopefully it's still possible to do so.

The patch is based on mvebu/soc.

---
 arch/arm/mach-mvebu/pmsu.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
arch/arm/mach-mvebu/pmsu.c +7 -1
index 5a757f9..d8ab605 100644
@@ -20,6 +20,7 @@
 
 #include <linux/clk.h>
 #include <linux/cpu_pm.h>
+#include <linux/cpufreq-dt.h>
 #include <linux/delay.h>
 #include <linux/init.h>
 #include <linux/io.h>
@@ -571,6 +572,10 @@ int mvebu_pmsu_dfs_request(int cpu)
 	return 0;
 }
 
+struct cpufreq_dt_platform_data cpufreq_dt_pd = {
+	.independent_clocks = true,
+};
+
 static int __init armada_xp_pmsu_cpufreq_init(void)
 {
 	struct device_node *np;
@@ -643,7 +648,8 @@ static int __init armada_xp_pmsu_cpufreq_init(void)
 		}
 	}
 
-	platform_device_register_simple("cpufreq-dt", -1, NULL, 0);
+	platform_device_register_data(NULL, "cpufreq-dt", -1,
+				      &cpufreq_dt_pd, sizeof(cpufreq_dt_pd));
 	return 0;
 }
 
Signature · 1 line
2.1.0
#1 lore raw

PATCH 1/1 ARM: mvebu: use the cpufreq-dt platform_data for independent clocks

Arnd, ThomasP,

Quoted 14 lines · Thomas Petazzoni

This commit adjusts the registration of the cpufreq-dt driver in the mvebu platform to indicate to the cpufreq driver that the platform has independent clocks for each CPU.

---
Jason, this commit was part of my "[PATCHv2 0/4] cpufreq-dt, platform_data based proposal" series, which included 3 patches for drivers/cpufreq/, and this last patch for mach-mvebu to make use of the new cpufreq feature. However, in order to not confuse the cpufreq maintainer, when I sent "[PATCH v3 0/3] cpufreq: cpufreq-dt:
platform_data based proposal", I didn't include this patch for mach-mvebu.

Quoted 4 lines

But now, it means that this is the only missing piece to get cpufreq working on Armada XP. Do you think you could squeeze it into the things merged for 3.19 ? It's a very small patch, so hopefully it's still possible to do so.

I have no problem with it except logistical. :( I'm currently on travel and my well-tested, but hacked up connection to my development box went down. I've no way to apply this until this weekend at best.

Acked-by; Jason Cooper <[email protected]>

Arnd, would you mind taking this directly onto mvebu/soc? I've nothing else in the queue (just the one pending pull request for soc-suspend)

Or, would it be acceptable for this to be /fixes-non-critical for -rc1?

thx,

Jason.

Quoted 41 lines

The patch is based on mvebu/soc.

---
 arch/arm/mach-mvebu/pmsu.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
arch/arm/mach-mvebu/pmsu.c +7 -1
index 5a757f9..d8ab605 100644
@@ -20,6 +20,7 @@
 
 #include <linux/clk.h>
 #include <linux/cpu_pm.h>
+#include <linux/cpufreq-dt.h>
 #include <linux/delay.h>
 #include <linux/init.h>
 #include <linux/io.h>
@@ -571,6 +572,10 @@ int mvebu_pmsu_dfs_request(int cpu)
 	return 0;
 }
 
+struct cpufreq_dt_platform_data cpufreq_dt_pd = {
+	.independent_clocks = true,
+};
+
 static int __init armada_xp_pmsu_cpufreq_init(void)
 {
 	struct device_node *np;
@@ -643,7 +648,8 @@ static int __init armada_xp_pmsu_cpufreq_init(void)
 		}
 	}
 
-	platform_device_register_simple("cpufreq-dt", -1, NULL, 0);
+	platform_device_register_data(NULL, "cpufreq-dt", -1,
+				      &cpufreq_dt_pd, sizeof(cpufreq_dt_pd));
 	return 0;
 }
 
Signature · 1 line
2.1.0
#2 lore raw

PATCH 1/1 ARM: mvebu: use the cpufreq-dt platform_data for independent clocks

Quoted 8 lines · On Tuesday 02 December 2014 12:03:24 Jason Cooper wrote:

Acked-by; Jason Cooper <[email protected]>

Arnd, would you mind taking this directly onto mvebu/soc? I've nothing else in the queue (just the one pending pull request for soc-suspend)

Or, would it be acceptable for this to be /fixes-non-critical for -rc1?

I've put it into next/soc now, thanks,

Arnd