Skip to contentSkip to conversation

ARM: highbank: cpuidle: convert to platform driver

PATCH New Daniel Lezcano 2 participants 6 messages Sep 27, 2013 – Oct 16, 2013

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

PATCH 1/1 ARM: highbank: cpuidle: convert to platform driver

As the ux500 and the kirkwood driver, make the calxeda driver a platform driver

[Compiled only]

---
 arch/arm/mach-highbank/highbank.c |    8 ++++++++
 drivers/cpuidle/cpuidle-calxeda.c |   18 ++++++++++++------
 2 files changed, 20 insertions(+), 6 deletions(-)
arch/arm/mach-highbank/highbank.c +8 -0
index 8e63ccd..a78ed62 100644
@@ -25,6 +25,7 @@
 #include <linux/of_address.h>
 #include <linux/amba/bus.h>
 #include <linux/clk-provider.h>
+#include <linux/platform_device.h>
 
 #include <asm/cacheflush.h>
 #include <asm/cputype.h>
@@ -153,6 +154,10 @@ static struct notifier_block highbank_platform_nb = {
 	.notifier_call = highbank_platform_notifier,
 };
 
+static struct platform_device highbank_cpuidle_device = {
+	.name = "cpuidle-calxeda",
+};
+
 static void __init highbank_init(void)
 {
 	pm_power_off = highbank_power_off;
@@ -162,6 +167,9 @@ static void __init highbank_init(void)
 	bus_register_notifier(&amba_bustype, &highbank_amba_nb);
 
 	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+
+	if (of_machine_is_compatible("calxeda,highbank"))
+		platform_device_register(&highbank_cpuidle_device);
 }
 
 static const char *highbank_match[] __initconst = {
drivers/cpuidle/cpuidle-calxeda.c +12 -6
index 3460584..7b6105b 100644
@@ -23,10 +23,10 @@
 #include <linux/cpuidle.h>
 #include <linux/init.h>
 #include <linux/io.h>
-#include <linux/of.h>
 #include <linux/time.h>
 #include <linux/delay.h>
 #include <linux/suspend.h>
+#include <linux/platform_device.h>
 #include <asm/cpuidle.h>
 #include <asm/proc-fns.h>
 #include <asm/smp_scu.h>
@@ -88,11 +88,17 @@ static struct cpuidle_driver calxeda_idle_driver = {
 	.state_count = 2,
 };
 
-static int __init calxeda_cpuidle_init(void)
+static int __init calxeda_cpuidle_probe(struct platform_device *pdev)
 {
-	if (!of_machine_is_compatible("calxeda,highbank"))
-		return -ENODEV;
-
 	return cpuidle_register(&calxeda_idle_driver, NULL);
 }
-module_init(calxeda_cpuidle_init);
+
+static struct platform_driver calxeda_cpuidle_plat_driver = {
+        .driver = {
+                .name = "cpuidle-calxeda",
+                .owner = THIS_MODULE,
+        },
+        .probe = calxeda_cpuidle_probe,
+};
+
+module_platform_driver(calxeda_cpuidle_plat_driver);
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 ARM: highbank: cpuidle: convert to platform driver

Quoted 9 lines · Daniel Lezcano

As the ux500 and the kirkwood driver, make the calxeda driver a platform driver

[Compiled only]

---
 arch/arm/mach-highbank/highbank.c |    8 ++++++++
 drivers/cpuidle/cpuidle-calxeda.c |   18 ++++++++++++------
 2 files changed, 20 insertions(+), 6 deletions(-)

Looks fine to me, but this will conflict with my series. Perhaps I can pick this up as part of that.

Rob

#2 lore raw

PATCH 1/1 ARM: highbank: cpuidle: convert to platform driver

Quoted 6 lines · Rob Herring
Quoted 4 lines · Daniel Lezcano

As the ux500 and the kirkwood driver, make the calxeda driver a platform driver

[Compiled only]

Quoted 8 lines
Quoted 5 lines
---
  arch/arm/mach-highbank/highbank.c |    8 ++++++++
  drivers/cpuidle/cpuidle-calxeda.c |   18 ++++++++++++------
  2 files changed, 20 insertions(+), 6 deletions(-)

Looks fine to me, but this will conflict with my series. Perhaps I can pick this up as part of that.

Yes I agree, it makes sense.

Signature · 5 lines
  <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
#3 lore raw

PATCH 1/1 ARM: highbank: cpuidle: convert to platform driver

Quoted 14 lines · Daniel Lezcano
Quoted 13 lines · Rob Herring
Quoted 10 lines · Daniel Lezcano

As the ux500 and the kirkwood driver, make the calxeda driver a platform driver

[Compiled only]

---
  arch/arm/mach-highbank/highbank.c |    8 ++++++++
  drivers/cpuidle/cpuidle-calxeda.c |   18 ++++++++++++------
  2 files changed, 20 insertions(+), 6 deletions(-)
Quoted 4 lines
Quoted 2 lines

Looks fine to me, but this will conflict with my series. Perhaps I can pick this up as part of that.

Yes I agree, it makes sense.

Hi Rob,

were you able to take the patch ? Where is the higbank git tree where I can see these patches ? I looked at
git://sources.calxeda.com/kernel/linux.git #fox-next but they don't appear, is it the right one ?

Thanks
-- Daniel

Signature · 5 lines
  <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
#4 lore raw

PATCH 1/1 ARM: highbank: cpuidle: convert to platform driver

Quoted 23 lines · Daniel Lezcano
Quoted 22 lines · Daniel Lezcano
Quoted 18 lines · Rob Herring
Quoted 11 lines · Daniel Lezcano

As the ux500 and the kirkwood driver, make the calxeda driver a platform driver

[Compiled only]

---
  arch/arm/mach-highbank/highbank.c |    8 ++++++++
  drivers/cpuidle/cpuidle-calxeda.c |   18 ++++++++++++------
  2 files changed, 20 insertions(+), 6 deletions(-)

Looks fine to me, but this will conflict with my series. Perhaps I can pick this up as part of that.

Quoted 8 lines
Quoted 1 line

Yes I agree, it makes sense.

Hi Rob,

were you able to take the patch ? Where is the higbank git tree where I can see these patches ? I looked at git://sources.calxeda.com/kernel/linux.git
#fox-next but they don't appear, is it the right one ?

I still need to send this series to arm-soc. I plan to do so this week.

Rob

#5 lore raw

PATCH 1/1 ARM: highbank: cpuidle: convert to platform driver

Quoted 28 lines · Rob Herring
Quoted 26 lines · Daniel Lezcano
Quoted 23 lines · Daniel Lezcano
Quoted 16 lines · Rob Herring
Quoted 11 lines · Daniel Lezcano

As the ux500 and the kirkwood driver, make the calxeda driver a platform driver

[Compiled only]

---
   arch/arm/mach-highbank/highbank.c |    8 ++++++++
   drivers/cpuidle/cpuidle-calxeda.c |   18 ++++++++++++------
   2 files changed, 20 insertions(+), 6 deletions(-)
Quoted 2 lines

Looks fine to me, but this will conflict with my series. Perhaps I can pick this up as part of that.

Yes I agree, it makes sense.

Quoted 7 lines
Quoted 5 lines

Hi Rob,

were you able to take the patch ? Where is the higbank git tree where I can see these patches ? I looked at git://sources.calxeda.com/kernel/linux.git
#fox-next but they don't appear, is it the right one ?

I still need to send this series to arm-soc. I plan to do so this week.

Ok, thanks.

-- Daniel

Signature · 5 lines
  <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog