All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/8] cpufreq: dt: Don't create platform-device from platform code
@ 2016-04-21  8:43 Viresh Kumar
  2016-04-21  8:43   ` Viresh Kumar
                   ` (8 more replies)
  0 siblings, 9 replies; 45+ messages in thread
From: Viresh Kumar @ 2016-04-21  8:43 UTC (permalink / raw)
  To: Rafael Wysocki
  Cc: linaro-kernel, linux-pm, arnd.bergmann, Viresh Kumar,
	Antoine Tenart, Chen-Yu Tsai, Heiko Stuebner, Leo Yan,
	Magnus Damm, Maxime Ripard, Michal Simek, Sascha Hauer,
	Sebastian Hesselbarth, Shawn Guo, Simon Horman,
	Sören Brinkmann, Tony Lindgren

Hi,

This migrates rest of the platforms to use cpufreq-dt-platdev.c. There
are few exceptions though:
- mvebu: it uses platform data and its problem will be solved in a
  separate series.
- highbank, s5pv210, sti, tegra124: these platforms already have cpufreq
  drivers in drivers/cpufreq/, which does some other stuff and finally
  create the device. There are sequencing issues, and so they will be
  left as it is.

I have pushed these for testing by:
- kernelci (build/boot testing for ARM)
- Intel's buildbot (build for ARM, build/boot for Intel)

Viresh Kumar (8):
  cpufreq: berlin: Use generic platdev driver
  cpufreq: imx: Use generic platdev driver
  cpufreq: omap: Use generic platdev driver
  cpufreq: rockchip: Use generic platdev driver
  cpufreq: shmobile: Use generic platdev driver
  cpufreq: sunxi: Use generic platdev driver
  cpufreq: zynq: Use generic platdev driver
  cpufreq: hisilicon: Use generic platdev driver

 arch/arm/mach-berlin/berlin.c        |  6 -----
 arch/arm/mach-imx/imx27-dt.c         |  4 ---
 arch/arm/mach-imx/mach-imx51.c       |  3 ---
 arch/arm/mach-imx/mach-imx53.c       |  2 --
 arch/arm/mach-imx/mach-imx7d.c       |  6 -----
 arch/arm/mach-omap2/pm.c             |  7 ++----
 arch/arm/mach-rockchip/rockchip.c    |  1 -
 arch/arm/mach-shmobile/Makefile      |  1 -
 arch/arm/mach-shmobile/common.h      |  7 ------
 arch/arm/mach-shmobile/cpufreq.c     | 19 ---------------
 arch/arm/mach-sunxi/sunxi.c          |  9 -------
 arch/arm/mach-zynq/common.c          |  2 --
 drivers/cpufreq/Kconfig.arm          |  9 -------
 drivers/cpufreq/Makefile             |  1 -
 drivers/cpufreq/cpufreq-dt-platdev.c | 47 ++++++++++++++++++++++++++++++++++++
 drivers/cpufreq/hisi-acpu-cpufreq.c  | 42 --------------------------------
 16 files changed, 49 insertions(+), 117 deletions(-)
 delete mode 100644 arch/arm/mach-shmobile/cpufreq.c
 delete mode 100644 drivers/cpufreq/hisi-acpu-cpufreq.c

-- 
2.7.1.410.g6faf27b


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [PATCH 1/8] cpufreq: berlin: Use generic platdev driver
  2016-04-21  8:43 [PATCH 0/8] cpufreq: dt: Don't create platform-device from platform code Viresh Kumar
@ 2016-04-21  8:43   ` Viresh Kumar
  2016-04-21  8:43   ` Viresh Kumar
                     ` (7 subsequent siblings)
  8 siblings, 0 replies; 45+ messages in thread
From: Viresh Kumar @ 2016-04-21  8:43 UTC (permalink / raw)
  To: Rafael Wysocki, Sebastian Hesselbarth, Viresh Kumar
  Cc: linaro-kernel, linux-pm, arnd.bergmann, Antoine Tenart,
	linux-arm-kernel, linux-kernel

The cpufreq-dt-platdev driver supports creation of cpufreq-dt platform
device now, reuse that and remove similar code from platform code.

Cc: Antoine Tenart <antoine.tenart@free-electrons.com>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 arch/arm/mach-berlin/berlin.c        | 6 ------
 drivers/cpufreq/cpufreq-dt-platdev.c | 2 ++
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-berlin/berlin.c b/arch/arm/mach-berlin/berlin.c
index 25d73870ccca..ac181c6797ee 100644
--- a/arch/arm/mach-berlin/berlin.c
+++ b/arch/arm/mach-berlin/berlin.c
@@ -18,11 +18,6 @@
 #include <asm/hardware/cache-l2x0.h>
 #include <asm/mach/arch.h>
 
-static void __init berlin_init_late(void)
-{
-	platform_device_register_simple("cpufreq-dt", -1, NULL, 0);
-}
-
 static const char * const berlin_dt_compat[] = {
 	"marvell,berlin",
 	NULL,
@@ -30,7 +25,6 @@ static const char * const berlin_dt_compat[] = {
 
 DT_MACHINE_START(BERLIN_DT, "Marvell Berlin")
 	.dt_compat	= berlin_dt_compat,
-	.init_late	= berlin_init_late,
 	/*
 	 * with DT probing for L2CCs, berlin_init_machine can be removed.
 	 * Note: 88DE3005 (Armada 1500-mini) uses pl310 l2cc
diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c
index f2ae7ad99a3c..3b3e6804cf14 100644
--- a/drivers/cpufreq/cpufreq-dt-platdev.c
+++ b/drivers/cpufreq/cpufreq-dt-platdev.c
@@ -12,6 +12,8 @@
 #include <linux/platform_device.h>
 
 static const struct of_device_id machines[] = {
+	{ .compatible = "marvell,berlin", },
+
 	{ .compatible = "samsung,exynos3250", },
 	{ .compatible = "samsung,exynos4210", },
 	{ .compatible = "samsung,exynos4212", },
-- 
2.7.1.410.g6faf27b

^ permalink raw reply related	[flat|nested] 45+ messages in thread

* [PATCH 1/8] cpufreq: berlin: Use generic platdev driver
@ 2016-04-21  8:43   ` Viresh Kumar
  0 siblings, 0 replies; 45+ messages in thread
From: Viresh Kumar @ 2016-04-21  8:43 UTC (permalink / raw)
  To: linux-arm-kernel

The cpufreq-dt-platdev driver supports creation of cpufreq-dt platform
device now, reuse that and remove similar code from platform code.

Cc: Antoine Tenart <antoine.tenart@free-electrons.com>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 arch/arm/mach-berlin/berlin.c        | 6 ------
 drivers/cpufreq/cpufreq-dt-platdev.c | 2 ++
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-berlin/berlin.c b/arch/arm/mach-berlin/berlin.c
index 25d73870ccca..ac181c6797ee 100644
--- a/arch/arm/mach-berlin/berlin.c
+++ b/arch/arm/mach-berlin/berlin.c
@@ -18,11 +18,6 @@
 #include <asm/hardware/cache-l2x0.h>
 #include <asm/mach/arch.h>
 
-static void __init berlin_init_late(void)
-{
-	platform_device_register_simple("cpufreq-dt", -1, NULL, 0);
-}
-
 static const char * const berlin_dt_compat[] = {
 	"marvell,berlin",
 	NULL,
@@ -30,7 +25,6 @@ static const char * const berlin_dt_compat[] = {
 
 DT_MACHINE_START(BERLIN_DT, "Marvell Berlin")
 	.dt_compat	= berlin_dt_compat,
-	.init_late	= berlin_init_late,
 	/*
 	 * with DT probing for L2CCs, berlin_init_machine can be removed.
 	 * Note: 88DE3005 (Armada 1500-mini) uses pl310 l2cc
diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c
index f2ae7ad99a3c..3b3e6804cf14 100644
--- a/drivers/cpufreq/cpufreq-dt-platdev.c
+++ b/drivers/cpufreq/cpufreq-dt-platdev.c
@@ -12,6 +12,8 @@
 #include <linux/platform_device.h>
 
 static const struct of_device_id machines[] = {
+	{ .compatible = "marvell,berlin", },
+
 	{ .compatible = "samsung,exynos3250", },
 	{ .compatible = "samsung,exynos4210", },
 	{ .compatible = "samsung,exynos4212", },
-- 
2.7.1.410.g6faf27b

^ permalink raw reply related	[flat|nested] 45+ messages in thread

* [PATCH 2/8] cpufreq: imx: Use generic platdev driver
  2016-04-21  8:43 [PATCH 0/8] cpufreq: dt: Don't create platform-device from platform code Viresh Kumar
  2016-04-21  8:43   ` Viresh Kumar
@ 2016-04-21  8:43   ` Viresh Kumar
  2016-04-21  8:43   ` Viresh Kumar
                     ` (6 subsequent siblings)
  8 siblings, 0 replies; 45+ messages in thread
From: Viresh Kumar @ 2016-04-21  8:43 UTC (permalink / raw)
  To: Rafael Wysocki, Shawn Guo, Sascha Hauer, Viresh Kumar
  Cc: linaro-kernel, linux-pm, arnd.bergmann, linux-arm-kernel, linux-kernel

The cpufreq-dt-platdev driver supports creation of cpufreq-dt platform
device now, reuse that and remove similar code from platform code.

Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Sascha Hauer <kernel@pengutronix.de>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 arch/arm/mach-imx/imx27-dt.c         | 4 ----
 arch/arm/mach-imx/mach-imx51.c       | 3 ---
 arch/arm/mach-imx/mach-imx53.c       | 2 --
 arch/arm/mach-imx/mach-imx7d.c       | 6 ------
 drivers/cpufreq/cpufreq-dt-platdev.c | 5 +++++
 5 files changed, 5 insertions(+), 15 deletions(-)

diff --git a/arch/arm/mach-imx/imx27-dt.c b/arch/arm/mach-imx/imx27-dt.c
index bd42d1bd10af..90c62bf01f9e 100644
--- a/arch/arm/mach-imx/imx27-dt.c
+++ b/arch/arm/mach-imx/imx27-dt.c
@@ -20,11 +20,7 @@
 
 static void __init imx27_dt_init(void)
 {
-	struct platform_device_info devinfo = { .name = "cpufreq-dt", };
-
 	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
-
-	platform_device_register_full(&devinfo);
 }
 
 static const char * const imx27_dt_board_compat[] __initconst = {
diff --git a/arch/arm/mach-imx/mach-imx51.c b/arch/arm/mach-imx/mach-imx51.c
index 6883fbaf9484..10a82a4f1e58 100644
--- a/arch/arm/mach-imx/mach-imx51.c
+++ b/arch/arm/mach-imx/mach-imx51.c
@@ -50,13 +50,10 @@ static void __init imx51_ipu_mipi_setup(void)
 
 static void __init imx51_dt_init(void)
 {
-	struct platform_device_info devinfo = { .name = "cpufreq-dt", };
-
 	imx51_ipu_mipi_setup();
 	imx_src_init();
 
 	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
-	platform_device_register_full(&devinfo);
 }
 
 static void __init imx51_init_late(void)
diff --git a/arch/arm/mach-imx/mach-imx53.c b/arch/arm/mach-imx/mach-imx53.c
index 86316a979297..18b5c5c136db 100644
--- a/arch/arm/mach-imx/mach-imx53.c
+++ b/arch/arm/mach-imx/mach-imx53.c
@@ -40,8 +40,6 @@ static void __init imx53_dt_init(void)
 static void __init imx53_init_late(void)
 {
 	imx53_pm_init();
-
-	platform_device_register_simple("cpufreq-dt", -1, NULL, 0);
 }
 
 static const char * const imx53_dt_board_compat[] __initconst = {
diff --git a/arch/arm/mach-imx/mach-imx7d.c b/arch/arm/mach-imx/mach-imx7d.c
index 5a27f20c9a82..b450f525a670 100644
--- a/arch/arm/mach-imx/mach-imx7d.c
+++ b/arch/arm/mach-imx/mach-imx7d.c
@@ -105,11 +105,6 @@ static void __init imx7d_init_irq(void)
 	irqchip_init();
 }
 
-static void __init imx7d_init_late(void)
-{
-	platform_device_register_simple("cpufreq-dt", -1, NULL, 0);
-}
-
 static const char *const imx7d_dt_compat[] __initconst = {
 	"fsl,imx7d",
 	NULL,
@@ -117,7 +112,6 @@ static const char *const imx7d_dt_compat[] __initconst = {
 
 DT_MACHINE_START(IMX7D, "Freescale i.MX7 Dual (Device Tree)")
 	.init_irq	= imx7d_init_irq,
-	.init_late	= imx7d_init_late,
 	.init_machine	= imx7d_init_machine,
 	.dt_compat	= imx7d_dt_compat,
 MACHINE_END
diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c
index 3b3e6804cf14..ac12c4a02964 100644
--- a/drivers/cpufreq/cpufreq-dt-platdev.c
+++ b/drivers/cpufreq/cpufreq-dt-platdev.c
@@ -12,6 +12,11 @@
 #include <linux/platform_device.h>
 
 static const struct of_device_id machines[] = {
+	{ .compatible = "fsl,imx27", },
+	{ .compatible = "fsl,imx51", },
+	{ .compatible = "fsl,imx53", },
+	{ .compatible = "fsl,imx7d", },
+
 	{ .compatible = "marvell,berlin", },
 
 	{ .compatible = "samsung,exynos3250", },
-- 
2.7.1.410.g6faf27b

^ permalink raw reply related	[flat|nested] 45+ messages in thread

* [PATCH 2/8] cpufreq: imx: Use generic platdev driver
@ 2016-04-21  8:43   ` Viresh Kumar
  0 siblings, 0 replies; 45+ messages in thread
From: Viresh Kumar @ 2016-04-21  8:43 UTC (permalink / raw)
  To: Rafael Wysocki, Shawn Guo, Sascha Hauer, Viresh Kumar
  Cc: arnd.bergmann, linaro-kernel, linux-kernel, linux-arm-kernel, linux-pm

The cpufreq-dt-platdev driver supports creation of cpufreq-dt platform
device now, reuse that and remove similar code from platform code.

Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Sascha Hauer <kernel@pengutronix.de>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 arch/arm/mach-imx/imx27-dt.c         | 4 ----
 arch/arm/mach-imx/mach-imx51.c       | 3 ---
 arch/arm/mach-imx/mach-imx53.c       | 2 --
 arch/arm/mach-imx/mach-imx7d.c       | 6 ------
 drivers/cpufreq/cpufreq-dt-platdev.c | 5 +++++
 5 files changed, 5 insertions(+), 15 deletions(-)

diff --git a/arch/arm/mach-imx/imx27-dt.c b/arch/arm/mach-imx/imx27-dt.c
index bd42d1bd10af..90c62bf01f9e 100644
--- a/arch/arm/mach-imx/imx27-dt.c
+++ b/arch/arm/mach-imx/imx27-dt.c
@@ -20,11 +20,7 @@
 
 static void __init imx27_dt_init(void)
 {
-	struct platform_device_info devinfo = { .name = "cpufreq-dt", };
-
 	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
-
-	platform_device_register_full(&devinfo);
 }
 
 static const char * const imx27_dt_board_compat[] __initconst = {
diff --git a/arch/arm/mach-imx/mach-imx51.c b/arch/arm/mach-imx/mach-imx51.c
index 6883fbaf9484..10a82a4f1e58 100644
--- a/arch/arm/mach-imx/mach-imx51.c
+++ b/arch/arm/mach-imx/mach-imx51.c
@@ -50,13 +50,10 @@ static void __init imx51_ipu_mipi_setup(void)
 
 static void __init imx51_dt_init(void)
 {
-	struct platform_device_info devinfo = { .name = "cpufreq-dt", };
-
 	imx51_ipu_mipi_setup();
 	imx_src_init();
 
 	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
-	platform_device_register_full(&devinfo);
 }
 
 static void __init imx51_init_late(void)
diff --git a/arch/arm/mach-imx/mach-imx53.c b/arch/arm/mach-imx/mach-imx53.c
index 86316a979297..18b5c5c136db 100644
--- a/arch/arm/mach-imx/mach-imx53.c
+++ b/arch/arm/mach-imx/mach-imx53.c
@@ -40,8 +40,6 @@ static void __init imx53_dt_init(void)
 static void __init imx53_init_late(void)
 {
 	imx53_pm_init();
-
-	platform_device_register_simple("cpufreq-dt", -1, NULL, 0);
 }
 
 static const char * const imx53_dt_board_compat[] __initconst = {
diff --git a/arch/arm/mach-imx/mach-imx7d.c b/arch/arm/mach-imx/mach-imx7d.c
index 5a27f20c9a82..b450f525a670 100644
--- a/arch/arm/mach-imx/mach-imx7d.c
+++ b/arch/arm/mach-imx/mach-imx7d.c
@@ -105,11 +105,6 @@ static void __init imx7d_init_irq(void)
 	irqchip_init();
 }
 
-static void __init imx7d_init_late(void)
-{
-	platform_device_register_simple("cpufreq-dt", -1, NULL, 0);
-}
-
 static const char *const imx7d_dt_compat[] __initconst = {
 	"fsl,imx7d",
 	NULL,
@@ -117,7 +112,6 @@ static const char *const imx7d_dt_compat[] __initconst = {
 
 DT_MACHINE_START(IMX7D, "Freescale i.MX7 Dual (Device Tree)")
 	.init_irq	= imx7d_init_irq,
-	.init_late	= imx7d_init_late,
 	.init_machine	= imx7d_init_machine,
 	.dt_compat	= imx7d_dt_compat,
 MACHINE_END
diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c
index 3b3e6804cf14..ac12c4a02964 100644
--- a/drivers/cpufreq/cpufreq-dt-platdev.c
+++ b/drivers/cpufreq/cpufreq-dt-platdev.c
@@ -12,6 +12,11 @@
 #include <linux/platform_device.h>
 
 static const struct of_device_id machines[] = {
+	{ .compatible = "fsl,imx27", },
+	{ .compatible = "fsl,imx51", },
+	{ .compatible = "fsl,imx53", },
+	{ .compatible = "fsl,imx7d", },
+
 	{ .compatible = "marvell,berlin", },
 
 	{ .compatible = "samsung,exynos3250", },
-- 
2.7.1.410.g6faf27b

^ permalink raw reply related	[flat|nested] 45+ messages in thread

* [PATCH 2/8] cpufreq: imx: Use generic platdev driver
@ 2016-04-21  8:43   ` Viresh Kumar
  0 siblings, 0 replies; 45+ messages in thread
From: Viresh Kumar @ 2016-04-21  8:43 UTC (permalink / raw)
  To: linux-arm-kernel

The cpufreq-dt-platdev driver supports creation of cpufreq-dt platform
device now, reuse that and remove similar code from platform code.

Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Sascha Hauer <kernel@pengutronix.de>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 arch/arm/mach-imx/imx27-dt.c         | 4 ----
 arch/arm/mach-imx/mach-imx51.c       | 3 ---
 arch/arm/mach-imx/mach-imx53.c       | 2 --
 arch/arm/mach-imx/mach-imx7d.c       | 6 ------
 drivers/cpufreq/cpufreq-dt-platdev.c | 5 +++++
 5 files changed, 5 insertions(+), 15 deletions(-)

diff --git a/arch/arm/mach-imx/imx27-dt.c b/arch/arm/mach-imx/imx27-dt.c
index bd42d1bd10af..90c62bf01f9e 100644
--- a/arch/arm/mach-imx/imx27-dt.c
+++ b/arch/arm/mach-imx/imx27-dt.c
@@ -20,11 +20,7 @@
 
 static void __init imx27_dt_init(void)
 {
-	struct platform_device_info devinfo = { .name = "cpufreq-dt", };
-
 	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
-
-	platform_device_register_full(&devinfo);
 }
 
 static const char * const imx27_dt_board_compat[] __initconst = {
diff --git a/arch/arm/mach-imx/mach-imx51.c b/arch/arm/mach-imx/mach-imx51.c
index 6883fbaf9484..10a82a4f1e58 100644
--- a/arch/arm/mach-imx/mach-imx51.c
+++ b/arch/arm/mach-imx/mach-imx51.c
@@ -50,13 +50,10 @@ static void __init imx51_ipu_mipi_setup(void)
 
 static void __init imx51_dt_init(void)
 {
-	struct platform_device_info devinfo = { .name = "cpufreq-dt", };
-
 	imx51_ipu_mipi_setup();
 	imx_src_init();
 
 	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
-	platform_device_register_full(&devinfo);
 }
 
 static void __init imx51_init_late(void)
diff --git a/arch/arm/mach-imx/mach-imx53.c b/arch/arm/mach-imx/mach-imx53.c
index 86316a979297..18b5c5c136db 100644
--- a/arch/arm/mach-imx/mach-imx53.c
+++ b/arch/arm/mach-imx/mach-imx53.c
@@ -40,8 +40,6 @@ static void __init imx53_dt_init(void)
 static void __init imx53_init_late(void)
 {
 	imx53_pm_init();
-
-	platform_device_register_simple("cpufreq-dt", -1, NULL, 0);
 }
 
 static const char * const imx53_dt_board_compat[] __initconst = {
diff --git a/arch/arm/mach-imx/mach-imx7d.c b/arch/arm/mach-imx/mach-imx7d.c
index 5a27f20c9a82..b450f525a670 100644
--- a/arch/arm/mach-imx/mach-imx7d.c
+++ b/arch/arm/mach-imx/mach-imx7d.c
@@ -105,11 +105,6 @@ static void __init imx7d_init_irq(void)
 	irqchip_init();
 }
 
-static void __init imx7d_init_late(void)
-{
-	platform_device_register_simple("cpufreq-dt", -1, NULL, 0);
-}
-
 static const char *const imx7d_dt_compat[] __initconst = {
 	"fsl,imx7d",
 	NULL,
@@ -117,7 +112,6 @@ static const char *const imx7d_dt_compat[] __initconst = {
 
 DT_MACHINE_START(IMX7D, "Freescale i.MX7 Dual (Device Tree)")
 	.init_irq	= imx7d_init_irq,
-	.init_late	= imx7d_init_late,
 	.init_machine	= imx7d_init_machine,
 	.dt_compat	= imx7d_dt_compat,
 MACHINE_END
diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c
index 3b3e6804cf14..ac12c4a02964 100644
--- a/drivers/cpufreq/cpufreq-dt-platdev.c
+++ b/drivers/cpufreq/cpufreq-dt-platdev.c
@@ -12,6 +12,11 @@
 #include <linux/platform_device.h>
 
 static const struct of_device_id machines[] = {
+	{ .compatible = "fsl,imx27", },
+	{ .compatible = "fsl,imx51", },
+	{ .compatible = "fsl,imx53", },
+	{ .compatible = "fsl,imx7d", },
+
 	{ .compatible = "marvell,berlin", },
 
 	{ .compatible = "samsung,exynos3250", },
-- 
2.7.1.410.g6faf27b

^ permalink raw reply related	[flat|nested] 45+ messages in thread

* [PATCH 3/8] cpufreq: omap: Use generic platdev driver
  2016-04-21  8:43 [PATCH 0/8] cpufreq: dt: Don't create platform-device from platform code Viresh Kumar
@ 2016-04-21  8:43   ` Viresh Kumar
  2016-04-21  8:43   ` Viresh Kumar
                     ` (7 subsequent siblings)
  8 siblings, 0 replies; 45+ messages in thread
From: Viresh Kumar @ 2016-04-21  8:43 UTC (permalink / raw)
  To: Rafael Wysocki, Kevin Hilman, Tony Lindgren, Viresh Kumar
  Cc: linaro-kernel, linux-pm, arnd.bergmann, linux-omap,
	linux-arm-kernel, linux-kernel

The cpufreq-dt-platdev driver supports creation of cpufreq-dt platform
device now, reuse that and remove similar code from platform code.

Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 arch/arm/mach-omap2/pm.c             | 7 ++-----
 drivers/cpufreq/cpufreq-dt-platdev.c | 5 +++++
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
index 58920bc8807b..2f7b11da7d5d 100644
--- a/arch/arm/mach-omap2/pm.c
+++ b/arch/arm/mach-omap2/pm.c
@@ -277,13 +277,10 @@ static void __init omap4_init_voltages(void)
 
 static inline void omap_init_cpufreq(void)
 {
-	struct platform_device_info devinfo = { };
+	struct platform_device_info devinfo = { .name = "omap-cpufreq" };
 
 	if (!of_have_populated_dt())
-		devinfo.name = "omap-cpufreq";
-	else
-		devinfo.name = "cpufreq-dt";
-	platform_device_register_full(&devinfo);
+		platform_device_register_full(&devinfo);
 }
 
 static int __init omap2_common_pm_init(void)
diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c
index ac12c4a02964..3d7d459aed25 100644
--- a/drivers/cpufreq/cpufreq-dt-platdev.c
+++ b/drivers/cpufreq/cpufreq-dt-platdev.c
@@ -28,6 +28,11 @@ static const struct of_device_id machines[] = {
 	{ .compatible = "samsung,exynos5420", },
 	{ .compatible = "samsung,exynos5800", },
 #endif
+
+	{ .compatible = "ti,omap2", },
+	{ .compatible = "ti,omap3", },
+	{ .compatible = "ti,omap4", },
+	{ .compatible = "ti,omap5", },
 };
 
 static int __init cpufreq_dt_platdev_init(void)
-- 
2.7.1.410.g6faf27b

^ permalink raw reply related	[flat|nested] 45+ messages in thread

* [PATCH 3/8] cpufreq: omap: Use generic platdev driver
@ 2016-04-21  8:43   ` Viresh Kumar
  0 siblings, 0 replies; 45+ messages in thread
From: Viresh Kumar @ 2016-04-21  8:43 UTC (permalink / raw)
  To: linux-arm-kernel

The cpufreq-dt-platdev driver supports creation of cpufreq-dt platform
device now, reuse that and remove similar code from platform code.

Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 arch/arm/mach-omap2/pm.c             | 7 ++-----
 drivers/cpufreq/cpufreq-dt-platdev.c | 5 +++++
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
index 58920bc8807b..2f7b11da7d5d 100644
--- a/arch/arm/mach-omap2/pm.c
+++ b/arch/arm/mach-omap2/pm.c
@@ -277,13 +277,10 @@ static void __init omap4_init_voltages(void)
 
 static inline void omap_init_cpufreq(void)
 {
-	struct platform_device_info devinfo = { };
+	struct platform_device_info devinfo = { .name = "omap-cpufreq" };
 
 	if (!of_have_populated_dt())
-		devinfo.name = "omap-cpufreq";
-	else
-		devinfo.name = "cpufreq-dt";
-	platform_device_register_full(&devinfo);
+		platform_device_register_full(&devinfo);
 }
 
 static int __init omap2_common_pm_init(void)
diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c
index ac12c4a02964..3d7d459aed25 100644
--- a/drivers/cpufreq/cpufreq-dt-platdev.c
+++ b/drivers/cpufreq/cpufreq-dt-platdev.c
@@ -28,6 +28,11 @@ static const struct of_device_id machines[] = {
 	{ .compatible = "samsung,exynos5420", },
 	{ .compatible = "samsung,exynos5800", },
 #endif
+
+	{ .compatible = "ti,omap2", },
+	{ .compatible = "ti,omap3", },
+	{ .compatible = "ti,omap4", },
+	{ .compatible = "ti,omap5", },
 };
 
 static int __init cpufreq_dt_platdev_init(void)
-- 
2.7.1.410.g6faf27b

^ permalink raw reply related	[flat|nested] 45+ messages in thread

* [PATCH 4/8] cpufreq: rockchip: Use generic platdev driver
  2016-04-21  8:43 [PATCH 0/8] cpufreq: dt: Don't create platform-device from platform code Viresh Kumar
@ 2016-04-21  8:43   ` Viresh Kumar
  2016-04-21  8:43   ` Viresh Kumar
                     ` (7 subsequent siblings)
  8 siblings, 0 replies; 45+ messages in thread
From: Viresh Kumar @ 2016-04-21  8:43 UTC (permalink / raw)
  To: Rafael Wysocki, Heiko Stuebner, Viresh Kumar
  Cc: linaro-kernel, linux-pm, arnd.bergmann, linux-arm-kernel,
	linux-rockchip, linux-kernel

The cpufreq-dt-platdev driver supports creation of cpufreq-dt platform
device now, reuse that and remove similar code from platform code.

Cc: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 arch/arm/mach-rockchip/rockchip.c    | 1 -
 drivers/cpufreq/cpufreq-dt-platdev.c | 7 +++++++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-rockchip/rockchip.c b/arch/arm/mach-rockchip/rockchip.c
index 3f07cc5dfe5f..beb71da5d9c8 100644
--- a/arch/arm/mach-rockchip/rockchip.c
+++ b/arch/arm/mach-rockchip/rockchip.c
@@ -74,7 +74,6 @@ static void __init rockchip_dt_init(void)
 {
 	rockchip_suspend_init();
 	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
-	platform_device_register_simple("cpufreq-dt", 0, NULL, 0);
 }
 
 static const char * const rockchip_board_dt_compat[] = {
diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c
index 3d7d459aed25..b831f1463227 100644
--- a/drivers/cpufreq/cpufreq-dt-platdev.c
+++ b/drivers/cpufreq/cpufreq-dt-platdev.c
@@ -29,6 +29,13 @@ static const struct of_device_id machines[] = {
 	{ .compatible = "samsung,exynos5800", },
 #endif
 
+	{ .compatible = "rockchip,rk2928", },
+	{ .compatible = "rockchip,rk3066a", },
+	{ .compatible = "rockchip,rk3066b", },
+	{ .compatible = "rockchip,rk3188", },
+	{ .compatible = "rockchip,rk3228", },
+	{ .compatible = "rockchip,rk3288", },
+
 	{ .compatible = "ti,omap2", },
 	{ .compatible = "ti,omap3", },
 	{ .compatible = "ti,omap4", },
-- 
2.7.1.410.g6faf27b

^ permalink raw reply related	[flat|nested] 45+ messages in thread

* [PATCH 4/8] cpufreq: rockchip: Use generic platdev driver
@ 2016-04-21  8:43   ` Viresh Kumar
  0 siblings, 0 replies; 45+ messages in thread
From: Viresh Kumar @ 2016-04-21  8:43 UTC (permalink / raw)
  To: linux-arm-kernel

The cpufreq-dt-platdev driver supports creation of cpufreq-dt platform
device now, reuse that and remove similar code from platform code.

Cc: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 arch/arm/mach-rockchip/rockchip.c    | 1 -
 drivers/cpufreq/cpufreq-dt-platdev.c | 7 +++++++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-rockchip/rockchip.c b/arch/arm/mach-rockchip/rockchip.c
index 3f07cc5dfe5f..beb71da5d9c8 100644
--- a/arch/arm/mach-rockchip/rockchip.c
+++ b/arch/arm/mach-rockchip/rockchip.c
@@ -74,7 +74,6 @@ static void __init rockchip_dt_init(void)
 {
 	rockchip_suspend_init();
 	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
-	platform_device_register_simple("cpufreq-dt", 0, NULL, 0);
 }
 
 static const char * const rockchip_board_dt_compat[] = {
diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c
index 3d7d459aed25..b831f1463227 100644
--- a/drivers/cpufreq/cpufreq-dt-platdev.c
+++ b/drivers/cpufreq/cpufreq-dt-platdev.c
@@ -29,6 +29,13 @@ static const struct of_device_id machines[] = {
 	{ .compatible = "samsung,exynos5800", },
 #endif
 
+	{ .compatible = "rockchip,rk2928", },
+	{ .compatible = "rockchip,rk3066a", },
+	{ .compatible = "rockchip,rk3066b", },
+	{ .compatible = "rockchip,rk3188", },
+	{ .compatible = "rockchip,rk3228", },
+	{ .compatible = "rockchip,rk3288", },
+
 	{ .compatible = "ti,omap2", },
 	{ .compatible = "ti,omap3", },
 	{ .compatible = "ti,omap4", },
-- 
2.7.1.410.g6faf27b

^ permalink raw reply related	[flat|nested] 45+ messages in thread

* [PATCH 5/8] cpufreq: shmobile: Use generic platdev driver
  2016-04-21  8:43 [PATCH 0/8] cpufreq: dt: Don't create platform-device from platform code Viresh Kumar
  2016-04-21  8:43   ` Viresh Kumar
@ 2016-04-21  8:43   ` Viresh Kumar
  2016-04-21  8:43   ` Viresh Kumar
                     ` (6 subsequent siblings)
  8 siblings, 0 replies; 45+ messages in thread
From: Viresh Kumar @ 2016-04-21  8:43 UTC (permalink / raw)
  To: Rafael Wysocki, Simon Horman, Magnus Damm, Viresh Kumar
  Cc: linaro-kernel, linux-pm, arnd.bergmann, linux-arm-kernel,
	linux-renesas-soc, linux-kernel

The cpufreq-dt-platdev driver supports creation of cpufreq-dt platform
device now, reuse that and remove similar code from platform code.

Cc: Simon Horman <horms@verge.net.au>
Cc: Magnus Damm <magnus.damm@gmail.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 arch/arm/mach-shmobile/Makefile      |  1 -
 arch/arm/mach-shmobile/common.h      |  7 -------
 arch/arm/mach-shmobile/cpufreq.c     | 19 -------------------
 drivers/cpufreq/cpufreq-dt-platdev.c | 12 ++++++++++++
 4 files changed, 12 insertions(+), 27 deletions(-)
 delete mode 100644 arch/arm/mach-shmobile/cpufreq.c

diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile
index a65c80ac9009..c9ea0e6ff4f9 100644
--- a/arch/arm/mach-shmobile/Makefile
+++ b/arch/arm/mach-shmobile/Makefile
@@ -38,7 +38,6 @@ smp-$(CONFIG_ARCH_EMEV2)	+= smp-emev2.o headsmp-scu.o platsmp-scu.o
 
 # PM objects
 obj-$(CONFIG_SUSPEND)		+= suspend.o
-obj-$(CONFIG_CPU_FREQ)		+= cpufreq.o
 obj-$(CONFIG_PM_RCAR)		+= pm-rcar.o
 obj-$(CONFIG_PM_RMOBILE)	+= pm-rmobile.o
 obj-$(CONFIG_ARCH_RCAR_GEN2)	+= pm-rcar-gen2.o
diff --git a/arch/arm/mach-shmobile/common.h b/arch/arm/mach-shmobile/common.h
index 5464b7a75e30..3b562d87826d 100644
--- a/arch/arm/mach-shmobile/common.h
+++ b/arch/arm/mach-shmobile/common.h
@@ -25,16 +25,9 @@ static inline int shmobile_suspend_init(void) { return 0; }
 static inline void shmobile_smp_apmu_suspend_init(void) { }
 #endif
 
-#ifdef CONFIG_CPU_FREQ
-int shmobile_cpufreq_init(void);
-#else
-static inline int shmobile_cpufreq_init(void) { return 0; }
-#endif
-
 static inline void __init shmobile_init_late(void)
 {
 	shmobile_suspend_init();
-	shmobile_cpufreq_init();
 }
 
 #endif /* __ARCH_MACH_COMMON_H */
diff --git a/arch/arm/mach-shmobile/cpufreq.c b/arch/arm/mach-shmobile/cpufreq.c
deleted file mode 100644
index 634d701c56a7..000000000000
--- a/arch/arm/mach-shmobile/cpufreq.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * CPUFreq support code for SH-Mobile ARM
- *
- *  Copyright (C) 2014 Gaku Inami
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- */
-
-#include <linux/platform_device.h>
-
-#include "common.h"
-
-int __init shmobile_cpufreq_init(void)
-{
-	platform_device_register_simple("cpufreq-dt", -1, NULL, 0);
-	return 0;
-}
diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c
index b831f1463227..05ac0ea25c49 100644
--- a/drivers/cpufreq/cpufreq-dt-platdev.c
+++ b/drivers/cpufreq/cpufreq-dt-platdev.c
@@ -29,6 +29,18 @@ static const struct of_device_id machines[] = {
 	{ .compatible = "samsung,exynos5800", },
 #endif
 
+	{ .compatible = "renesas,emev2", },
+	{ .compatible = "renesas,r7s72100", },
+	{ .compatible = "renesas,r8a73a4", },
+	{ .compatible = "renesas,r8a7740", },
+	{ .compatible = "renesas,r8a7778", },
+	{ .compatible = "renesas,r8a7779", },
+	{ .compatible = "renesas,r8a7790", },
+	{ .compatible = "renesas,r8a7791", },
+	{ .compatible = "renesas,r8a7793", },
+	{ .compatible = "renesas,r8a7794", },
+	{ .compatible = "renesas,sh73a0", },
+
 	{ .compatible = "rockchip,rk2928", },
 	{ .compatible = "rockchip,rk3066a", },
 	{ .compatible = "rockchip,rk3066b", },
-- 
2.7.1.410.g6faf27b

^ permalink raw reply related	[flat|nested] 45+ messages in thread

* [PATCH 5/8] cpufreq: shmobile: Use generic platdev driver
@ 2016-04-21  8:43   ` Viresh Kumar
  0 siblings, 0 replies; 45+ messages in thread
From: Viresh Kumar @ 2016-04-21  8:43 UTC (permalink / raw)
  To: Rafael Wysocki, Simon Horman, Magnus Damm, Viresh Kumar
  Cc: linaro-kernel, linux-pm, linux-kernel, linux-renesas-soc,
	arnd.bergmann, linux-arm-kernel

The cpufreq-dt-platdev driver supports creation of cpufreq-dt platform
device now, reuse that and remove similar code from platform code.

Cc: Simon Horman <horms@verge.net.au>
Cc: Magnus Damm <magnus.damm@gmail.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 arch/arm/mach-shmobile/Makefile      |  1 -
 arch/arm/mach-shmobile/common.h      |  7 -------
 arch/arm/mach-shmobile/cpufreq.c     | 19 -------------------
 drivers/cpufreq/cpufreq-dt-platdev.c | 12 ++++++++++++
 4 files changed, 12 insertions(+), 27 deletions(-)
 delete mode 100644 arch/arm/mach-shmobile/cpufreq.c

diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile
index a65c80ac9009..c9ea0e6ff4f9 100644
--- a/arch/arm/mach-shmobile/Makefile
+++ b/arch/arm/mach-shmobile/Makefile
@@ -38,7 +38,6 @@ smp-$(CONFIG_ARCH_EMEV2)	+= smp-emev2.o headsmp-scu.o platsmp-scu.o
 
 # PM objects
 obj-$(CONFIG_SUSPEND)		+= suspend.o
-obj-$(CONFIG_CPU_FREQ)		+= cpufreq.o
 obj-$(CONFIG_PM_RCAR)		+= pm-rcar.o
 obj-$(CONFIG_PM_RMOBILE)	+= pm-rmobile.o
 obj-$(CONFIG_ARCH_RCAR_GEN2)	+= pm-rcar-gen2.o
diff --git a/arch/arm/mach-shmobile/common.h b/arch/arm/mach-shmobile/common.h
index 5464b7a75e30..3b562d87826d 100644
--- a/arch/arm/mach-shmobile/common.h
+++ b/arch/arm/mach-shmobile/common.h
@@ -25,16 +25,9 @@ static inline int shmobile_suspend_init(void) { return 0; }
 static inline void shmobile_smp_apmu_suspend_init(void) { }
 #endif
 
-#ifdef CONFIG_CPU_FREQ
-int shmobile_cpufreq_init(void);
-#else
-static inline int shmobile_cpufreq_init(void) { return 0; }
-#endif
-
 static inline void __init shmobile_init_late(void)
 {
 	shmobile_suspend_init();
-	shmobile_cpufreq_init();
 }
 
 #endif /* __ARCH_MACH_COMMON_H */
diff --git a/arch/arm/mach-shmobile/cpufreq.c b/arch/arm/mach-shmobile/cpufreq.c
deleted file mode 100644
index 634d701c56a7..000000000000
--- a/arch/arm/mach-shmobile/cpufreq.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * CPUFreq support code for SH-Mobile ARM
- *
- *  Copyright (C) 2014 Gaku Inami
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- */
-
-#include <linux/platform_device.h>
-
-#include "common.h"
-
-int __init shmobile_cpufreq_init(void)
-{
-	platform_device_register_simple("cpufreq-dt", -1, NULL, 0);
-	return 0;
-}
diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c
index b831f1463227..05ac0ea25c49 100644
--- a/drivers/cpufreq/cpufreq-dt-platdev.c
+++ b/drivers/cpufreq/cpufreq-dt-platdev.c
@@ -29,6 +29,18 @@ static const struct of_device_id machines[] = {
 	{ .compatible = "samsung,exynos5800", },
 #endif
 
+	{ .compatible = "renesas,emev2", },
+	{ .compatible = "renesas,r7s72100", },
+	{ .compatible = "renesas,r8a73a4", },
+	{ .compatible = "renesas,r8a7740", },
+	{ .compatible = "renesas,r8a7778", },
+	{ .compatible = "renesas,r8a7779", },
+	{ .compatible = "renesas,r8a7790", },
+	{ .compatible = "renesas,r8a7791", },
+	{ .compatible = "renesas,r8a7793", },
+	{ .compatible = "renesas,r8a7794", },
+	{ .compatible = "renesas,sh73a0", },
+
 	{ .compatible = "rockchip,rk2928", },
 	{ .compatible = "rockchip,rk3066a", },
 	{ .compatible = "rockchip,rk3066b", },
-- 
2.7.1.410.g6faf27b

^ permalink raw reply related	[flat|nested] 45+ messages in thread

* [PATCH 5/8] cpufreq: shmobile: Use generic platdev driver
@ 2016-04-21  8:43   ` Viresh Kumar
  0 siblings, 0 replies; 45+ messages in thread
From: Viresh Kumar @ 2016-04-21  8:43 UTC (permalink / raw)
  To: linux-arm-kernel

The cpufreq-dt-platdev driver supports creation of cpufreq-dt platform
device now, reuse that and remove similar code from platform code.

Cc: Simon Horman <horms@verge.net.au>
Cc: Magnus Damm <magnus.damm@gmail.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 arch/arm/mach-shmobile/Makefile      |  1 -
 arch/arm/mach-shmobile/common.h      |  7 -------
 arch/arm/mach-shmobile/cpufreq.c     | 19 -------------------
 drivers/cpufreq/cpufreq-dt-platdev.c | 12 ++++++++++++
 4 files changed, 12 insertions(+), 27 deletions(-)
 delete mode 100644 arch/arm/mach-shmobile/cpufreq.c

diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile
index a65c80ac9009..c9ea0e6ff4f9 100644
--- a/arch/arm/mach-shmobile/Makefile
+++ b/arch/arm/mach-shmobile/Makefile
@@ -38,7 +38,6 @@ smp-$(CONFIG_ARCH_EMEV2)	+= smp-emev2.o headsmp-scu.o platsmp-scu.o
 
 # PM objects
 obj-$(CONFIG_SUSPEND)		+= suspend.o
-obj-$(CONFIG_CPU_FREQ)		+= cpufreq.o
 obj-$(CONFIG_PM_RCAR)		+= pm-rcar.o
 obj-$(CONFIG_PM_RMOBILE)	+= pm-rmobile.o
 obj-$(CONFIG_ARCH_RCAR_GEN2)	+= pm-rcar-gen2.o
diff --git a/arch/arm/mach-shmobile/common.h b/arch/arm/mach-shmobile/common.h
index 5464b7a75e30..3b562d87826d 100644
--- a/arch/arm/mach-shmobile/common.h
+++ b/arch/arm/mach-shmobile/common.h
@@ -25,16 +25,9 @@ static inline int shmobile_suspend_init(void) { return 0; }
 static inline void shmobile_smp_apmu_suspend_init(void) { }
 #endif
 
-#ifdef CONFIG_CPU_FREQ
-int shmobile_cpufreq_init(void);
-#else
-static inline int shmobile_cpufreq_init(void) { return 0; }
-#endif
-
 static inline void __init shmobile_init_late(void)
 {
 	shmobile_suspend_init();
-	shmobile_cpufreq_init();
 }
 
 #endif /* __ARCH_MACH_COMMON_H */
diff --git a/arch/arm/mach-shmobile/cpufreq.c b/arch/arm/mach-shmobile/cpufreq.c
deleted file mode 100644
index 634d701c56a7..000000000000
--- a/arch/arm/mach-shmobile/cpufreq.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * CPUFreq support code for SH-Mobile ARM
- *
- *  Copyright (C) 2014 Gaku Inami
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- */
-
-#include <linux/platform_device.h>
-
-#include "common.h"
-
-int __init shmobile_cpufreq_init(void)
-{
-	platform_device_register_simple("cpufreq-dt", -1, NULL, 0);
-	return 0;
-}
diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c
index b831f1463227..05ac0ea25c49 100644
--- a/drivers/cpufreq/cpufreq-dt-platdev.c
+++ b/drivers/cpufreq/cpufreq-dt-platdev.c
@@ -29,6 +29,18 @@ static const struct of_device_id machines[] = {
 	{ .compatible = "samsung,exynos5800", },
 #endif
 
+	{ .compatible = "renesas,emev2", },
+	{ .compatible = "renesas,r7s72100", },
+	{ .compatible = "renesas,r8a73a4", },
+	{ .compatible = "renesas,r8a7740", },
+	{ .compatible = "renesas,r8a7778", },
+	{ .compatible = "renesas,r8a7779", },
+	{ .compatible = "renesas,r8a7790", },
+	{ .compatible = "renesas,r8a7791", },
+	{ .compatible = "renesas,r8a7793", },
+	{ .compatible = "renesas,r8a7794", },
+	{ .compatible = "renesas,sh73a0", },
+
 	{ .compatible = "rockchip,rk2928", },
 	{ .compatible = "rockchip,rk3066a", },
 	{ .compatible = "rockchip,rk3066b", },
-- 
2.7.1.410.g6faf27b

^ permalink raw reply related	[flat|nested] 45+ messages in thread

* [PATCH 6/8] cpufreq: sunxi: Use generic platdev driver
  2016-04-21  8:43 [PATCH 0/8] cpufreq: dt: Don't create platform-device from platform code Viresh Kumar
  2016-04-21  8:43   ` Viresh Kumar
@ 2016-04-21  8:43   ` Viresh Kumar
  2016-04-21  8:43   ` Viresh Kumar
                     ` (6 subsequent siblings)
  8 siblings, 0 replies; 45+ messages in thread
From: Viresh Kumar @ 2016-04-21  8:43 UTC (permalink / raw)
  To: Rafael Wysocki, Maxime Ripard, Chen-Yu Tsai, Viresh Kumar
  Cc: linaro-kernel, linux-pm, arnd.bergmann, linux-arm-kernel, linux-kernel

The cpufreq-dt-platdev driver supports creation of cpufreq-dt platform
device now, reuse that and remove similar code from platform code.

Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 arch/arm/mach-sunxi/sunxi.c          |  9 ---------
 drivers/cpufreq/cpufreq-dt-platdev.c | 12 ++++++++++++
 2 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/arch/arm/mach-sunxi/sunxi.c b/arch/arm/mach-sunxi/sunxi.c
index 3c156190a1d4..95dca8c2c9ed 100644
--- a/arch/arm/mach-sunxi/sunxi.c
+++ b/arch/arm/mach-sunxi/sunxi.c
@@ -17,11 +17,6 @@
 
 #include <asm/mach/arch.h>
 
-static void __init sunxi_dt_cpufreq_init(void)
-{
-	platform_device_register_simple("cpufreq-dt", -1, NULL, 0);
-}
-
 static const char * const sunxi_board_dt_compat[] = {
 	"allwinner,sun4i-a10",
 	"allwinner,sun5i-a10s",
@@ -32,7 +27,6 @@ static const char * const sunxi_board_dt_compat[] = {
 
 DT_MACHINE_START(SUNXI_DT, "Allwinner sun4i/sun5i Families")
 	.dt_compat	= sunxi_board_dt_compat,
-	.init_late	= sunxi_dt_cpufreq_init,
 MACHINE_END
 
 static const char * const sun6i_board_dt_compat[] = {
@@ -53,7 +47,6 @@ static void __init sun6i_timer_init(void)
 DT_MACHINE_START(SUN6I_DT, "Allwinner sun6i (A31) Family")
 	.init_time	= sun6i_timer_init,
 	.dt_compat	= sun6i_board_dt_compat,
-	.init_late	= sunxi_dt_cpufreq_init,
 MACHINE_END
 
 static const char * const sun7i_board_dt_compat[] = {
@@ -63,7 +56,6 @@ static const char * const sun7i_board_dt_compat[] = {
 
 DT_MACHINE_START(SUN7I_DT, "Allwinner sun7i (A20) Family")
 	.dt_compat	= sun7i_board_dt_compat,
-	.init_late	= sunxi_dt_cpufreq_init,
 MACHINE_END
 
 static const char * const sun8i_board_dt_compat[] = {
@@ -77,7 +69,6 @@ static const char * const sun8i_board_dt_compat[] = {
 DT_MACHINE_START(SUN8I_DT, "Allwinner sun8i Family")
 	.init_time	= sun6i_timer_init,
 	.dt_compat	= sun8i_board_dt_compat,
-	.init_late	= sunxi_dt_cpufreq_init,
 MACHINE_END
 
 static const char * const sun9i_board_dt_compat[] = {
diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c
index 05ac0ea25c49..db6767a1f975 100644
--- a/drivers/cpufreq/cpufreq-dt-platdev.c
+++ b/drivers/cpufreq/cpufreq-dt-platdev.c
@@ -12,6 +12,18 @@
 #include <linux/platform_device.h>
 
 static const struct of_device_id machines[] = {
+	{ .compatible = "allwinner,sun4i-a10", },
+	{ .compatible = "allwinner,sun5i-a10s", },
+	{ .compatible = "allwinner,sun5i-a13", },
+	{ .compatible = "allwinner,sun5i-r8", },
+	{ .compatible = "allwinner,sun6i-a31", },
+	{ .compatible = "allwinner,sun6i-a31s", },
+	{ .compatible = "allwinner,sun7i-a20", },
+	{ .compatible = "allwinner,sun8i-a23", },
+	{ .compatible = "allwinner,sun8i-a33", },
+	{ .compatible = "allwinner,sun8i-a83t", },
+	{ .compatible = "allwinner,sun8i-h3", },
+
 	{ .compatible = "fsl,imx27", },
 	{ .compatible = "fsl,imx51", },
 	{ .compatible = "fsl,imx53", },
-- 
2.7.1.410.g6faf27b

^ permalink raw reply related	[flat|nested] 45+ messages in thread

* [PATCH 6/8] cpufreq: sunxi: Use generic platdev driver
@ 2016-04-21  8:43   ` Viresh Kumar
  0 siblings, 0 replies; 45+ messages in thread
From: Viresh Kumar @ 2016-04-21  8:43 UTC (permalink / raw)
  To: Rafael Wysocki, Maxime Ripard, Chen-Yu Tsai, Viresh Kumar
  Cc: arnd.bergmann, linaro-kernel, linux-kernel, linux-arm-kernel, linux-pm

The cpufreq-dt-platdev driver supports creation of cpufreq-dt platform
device now, reuse that and remove similar code from platform code.

Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 arch/arm/mach-sunxi/sunxi.c          |  9 ---------
 drivers/cpufreq/cpufreq-dt-platdev.c | 12 ++++++++++++
 2 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/arch/arm/mach-sunxi/sunxi.c b/arch/arm/mach-sunxi/sunxi.c
index 3c156190a1d4..95dca8c2c9ed 100644
--- a/arch/arm/mach-sunxi/sunxi.c
+++ b/arch/arm/mach-sunxi/sunxi.c
@@ -17,11 +17,6 @@
 
 #include <asm/mach/arch.h>
 
-static void __init sunxi_dt_cpufreq_init(void)
-{
-	platform_device_register_simple("cpufreq-dt", -1, NULL, 0);
-}
-
 static const char * const sunxi_board_dt_compat[] = {
 	"allwinner,sun4i-a10",
 	"allwinner,sun5i-a10s",
@@ -32,7 +27,6 @@ static const char * const sunxi_board_dt_compat[] = {
 
 DT_MACHINE_START(SUNXI_DT, "Allwinner sun4i/sun5i Families")
 	.dt_compat	= sunxi_board_dt_compat,
-	.init_late	= sunxi_dt_cpufreq_init,
 MACHINE_END
 
 static const char * const sun6i_board_dt_compat[] = {
@@ -53,7 +47,6 @@ static void __init sun6i_timer_init(void)
 DT_MACHINE_START(SUN6I_DT, "Allwinner sun6i (A31) Family")
 	.init_time	= sun6i_timer_init,
 	.dt_compat	= sun6i_board_dt_compat,
-	.init_late	= sunxi_dt_cpufreq_init,
 MACHINE_END
 
 static const char * const sun7i_board_dt_compat[] = {
@@ -63,7 +56,6 @@ static const char * const sun7i_board_dt_compat[] = {
 
 DT_MACHINE_START(SUN7I_DT, "Allwinner sun7i (A20) Family")
 	.dt_compat	= sun7i_board_dt_compat,
-	.init_late	= sunxi_dt_cpufreq_init,
 MACHINE_END
 
 static const char * const sun8i_board_dt_compat[] = {
@@ -77,7 +69,6 @@ static const char * const sun8i_board_dt_compat[] = {
 DT_MACHINE_START(SUN8I_DT, "Allwinner sun8i Family")
 	.init_time	= sun6i_timer_init,
 	.dt_compat	= sun8i_board_dt_compat,
-	.init_late	= sunxi_dt_cpufreq_init,
 MACHINE_END
 
 static const char * const sun9i_board_dt_compat[] = {
diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c
index 05ac0ea25c49..db6767a1f975 100644
--- a/drivers/cpufreq/cpufreq-dt-platdev.c
+++ b/drivers/cpufreq/cpufreq-dt-platdev.c
@@ -12,6 +12,18 @@
 #include <linux/platform_device.h>
 
 static const struct of_device_id machines[] = {
+	{ .compatible = "allwinner,sun4i-a10", },
+	{ .compatible = "allwinner,sun5i-a10s", },
+	{ .compatible = "allwinner,sun5i-a13", },
+	{ .compatible = "allwinner,sun5i-r8", },
+	{ .compatible = "allwinner,sun6i-a31", },
+	{ .compatible = "allwinner,sun6i-a31s", },
+	{ .compatible = "allwinner,sun7i-a20", },
+	{ .compatible = "allwinner,sun8i-a23", },
+	{ .compatible = "allwinner,sun8i-a33", },
+	{ .compatible = "allwinner,sun8i-a83t", },
+	{ .compatible = "allwinner,sun8i-h3", },
+
 	{ .compatible = "fsl,imx27", },
 	{ .compatible = "fsl,imx51", },
 	{ .compatible = "fsl,imx53", },
-- 
2.7.1.410.g6faf27b

^ permalink raw reply related	[flat|nested] 45+ messages in thread

* [PATCH 6/8] cpufreq: sunxi: Use generic platdev driver
@ 2016-04-21  8:43   ` Viresh Kumar
  0 siblings, 0 replies; 45+ messages in thread
From: Viresh Kumar @ 2016-04-21  8:43 UTC (permalink / raw)
  To: linux-arm-kernel

The cpufreq-dt-platdev driver supports creation of cpufreq-dt platform
device now, reuse that and remove similar code from platform code.

Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 arch/arm/mach-sunxi/sunxi.c          |  9 ---------
 drivers/cpufreq/cpufreq-dt-platdev.c | 12 ++++++++++++
 2 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/arch/arm/mach-sunxi/sunxi.c b/arch/arm/mach-sunxi/sunxi.c
index 3c156190a1d4..95dca8c2c9ed 100644
--- a/arch/arm/mach-sunxi/sunxi.c
+++ b/arch/arm/mach-sunxi/sunxi.c
@@ -17,11 +17,6 @@
 
 #include <asm/mach/arch.h>
 
-static void __init sunxi_dt_cpufreq_init(void)
-{
-	platform_device_register_simple("cpufreq-dt", -1, NULL, 0);
-}
-
 static const char * const sunxi_board_dt_compat[] = {
 	"allwinner,sun4i-a10",
 	"allwinner,sun5i-a10s",
@@ -32,7 +27,6 @@ static const char * const sunxi_board_dt_compat[] = {
 
 DT_MACHINE_START(SUNXI_DT, "Allwinner sun4i/sun5i Families")
 	.dt_compat	= sunxi_board_dt_compat,
-	.init_late	= sunxi_dt_cpufreq_init,
 MACHINE_END
 
 static const char * const sun6i_board_dt_compat[] = {
@@ -53,7 +47,6 @@ static void __init sun6i_timer_init(void)
 DT_MACHINE_START(SUN6I_DT, "Allwinner sun6i (A31) Family")
 	.init_time	= sun6i_timer_init,
 	.dt_compat	= sun6i_board_dt_compat,
-	.init_late	= sunxi_dt_cpufreq_init,
 MACHINE_END
 
 static const char * const sun7i_board_dt_compat[] = {
@@ -63,7 +56,6 @@ static const char * const sun7i_board_dt_compat[] = {
 
 DT_MACHINE_START(SUN7I_DT, "Allwinner sun7i (A20) Family")
 	.dt_compat	= sun7i_board_dt_compat,
-	.init_late	= sunxi_dt_cpufreq_init,
 MACHINE_END
 
 static const char * const sun8i_board_dt_compat[] = {
@@ -77,7 +69,6 @@ static const char * const sun8i_board_dt_compat[] = {
 DT_MACHINE_START(SUN8I_DT, "Allwinner sun8i Family")
 	.init_time	= sun6i_timer_init,
 	.dt_compat	= sun8i_board_dt_compat,
-	.init_late	= sunxi_dt_cpufreq_init,
 MACHINE_END
 
 static const char * const sun9i_board_dt_compat[] = {
diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c
index 05ac0ea25c49..db6767a1f975 100644
--- a/drivers/cpufreq/cpufreq-dt-platdev.c
+++ b/drivers/cpufreq/cpufreq-dt-platdev.c
@@ -12,6 +12,18 @@
 #include <linux/platform_device.h>
 
 static const struct of_device_id machines[] = {
+	{ .compatible = "allwinner,sun4i-a10", },
+	{ .compatible = "allwinner,sun5i-a10s", },
+	{ .compatible = "allwinner,sun5i-a13", },
+	{ .compatible = "allwinner,sun5i-r8", },
+	{ .compatible = "allwinner,sun6i-a31", },
+	{ .compatible = "allwinner,sun6i-a31s", },
+	{ .compatible = "allwinner,sun7i-a20", },
+	{ .compatible = "allwinner,sun8i-a23", },
+	{ .compatible = "allwinner,sun8i-a33", },
+	{ .compatible = "allwinner,sun8i-a83t", },
+	{ .compatible = "allwinner,sun8i-h3", },
+
 	{ .compatible = "fsl,imx27", },
 	{ .compatible = "fsl,imx51", },
 	{ .compatible = "fsl,imx53", },
-- 
2.7.1.410.g6faf27b

^ permalink raw reply related	[flat|nested] 45+ messages in thread

* [PATCH 7/8] cpufreq: zynq: Use generic platdev driver
  2016-04-21  8:43 [PATCH 0/8] cpufreq: dt: Don't create platform-device from platform code Viresh Kumar
@ 2016-04-21  8:43   ` Viresh Kumar
  2016-04-21  8:43   ` Viresh Kumar
                     ` (7 subsequent siblings)
  8 siblings, 0 replies; 45+ messages in thread
From: Viresh Kumar @ 2016-04-21  8:43 UTC (permalink / raw)
  To: Rafael Wysocki, Michal Simek, Sören Brinkmann, Viresh Kumar
  Cc: linaro-kernel, linux-pm, arnd.bergmann, linux-arm-kernel, linux-kernel

The cpufreq-dt-platdev driver supports creation of cpufreq-dt platform
device now, reuse that and remove similar code from platform code.

Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Sören Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 arch/arm/mach-zynq/common.c          | 2 --
 drivers/cpufreq/cpufreq-dt-platdev.c | 2 ++
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-zynq/common.c b/arch/arm/mach-zynq/common.c
index 860ffb663f02..da876d28ccbc 100644
--- a/arch/arm/mach-zynq/common.c
+++ b/arch/arm/mach-zynq/common.c
@@ -110,7 +110,6 @@ static void __init zynq_init_late(void)
  */
 static void __init zynq_init_machine(void)
 {
-	struct platform_device_info devinfo = { .name = "cpufreq-dt", };
 	struct soc_device_attribute *soc_dev_attr;
 	struct soc_device *soc_dev;
 	struct device *parent = NULL;
@@ -145,7 +144,6 @@ static void __init zynq_init_machine(void)
 	of_platform_populate(NULL, of_default_bus_match_table, NULL, parent);
 
 	platform_device_register(&zynq_cpuidle_device);
-	platform_device_register_full(&devinfo);
 }
 
 static void __init zynq_timer_init(void)
diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c
index db6767a1f975..c8a3eceac356 100644
--- a/drivers/cpufreq/cpufreq-dt-platdev.c
+++ b/drivers/cpufreq/cpufreq-dt-platdev.c
@@ -64,6 +64,8 @@ static const struct of_device_id machines[] = {
 	{ .compatible = "ti,omap3", },
 	{ .compatible = "ti,omap4", },
 	{ .compatible = "ti,omap5", },
+
+	{ .compatible = "xlnx,zynq-7000", },
 };
 
 static int __init cpufreq_dt_platdev_init(void)
-- 
2.7.1.410.g6faf27b

^ permalink raw reply related	[flat|nested] 45+ messages in thread

* [PATCH 7/8] cpufreq: zynq: Use generic platdev driver
@ 2016-04-21  8:43   ` Viresh Kumar
  0 siblings, 0 replies; 45+ messages in thread
From: Viresh Kumar @ 2016-04-21  8:43 UTC (permalink / raw)
  To: linux-arm-kernel

The cpufreq-dt-platdev driver supports creation of cpufreq-dt platform
device now, reuse that and remove similar code from platform code.

Cc: Michal Simek <michal.simek@xilinx.com>
Cc: S?ren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 arch/arm/mach-zynq/common.c          | 2 --
 drivers/cpufreq/cpufreq-dt-platdev.c | 2 ++
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-zynq/common.c b/arch/arm/mach-zynq/common.c
index 860ffb663f02..da876d28ccbc 100644
--- a/arch/arm/mach-zynq/common.c
+++ b/arch/arm/mach-zynq/common.c
@@ -110,7 +110,6 @@ static void __init zynq_init_late(void)
  */
 static void __init zynq_init_machine(void)
 {
-	struct platform_device_info devinfo = { .name = "cpufreq-dt", };
 	struct soc_device_attribute *soc_dev_attr;
 	struct soc_device *soc_dev;
 	struct device *parent = NULL;
@@ -145,7 +144,6 @@ static void __init zynq_init_machine(void)
 	of_platform_populate(NULL, of_default_bus_match_table, NULL, parent);
 
 	platform_device_register(&zynq_cpuidle_device);
-	platform_device_register_full(&devinfo);
 }
 
 static void __init zynq_timer_init(void)
diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c
index db6767a1f975..c8a3eceac356 100644
--- a/drivers/cpufreq/cpufreq-dt-platdev.c
+++ b/drivers/cpufreq/cpufreq-dt-platdev.c
@@ -64,6 +64,8 @@ static const struct of_device_id machines[] = {
 	{ .compatible = "ti,omap3", },
 	{ .compatible = "ti,omap4", },
 	{ .compatible = "ti,omap5", },
+
+	{ .compatible = "xlnx,zynq-7000", },
 };
 
 static int __init cpufreq_dt_platdev_init(void)
-- 
2.7.1.410.g6faf27b

^ permalink raw reply related	[flat|nested] 45+ messages in thread

* [PATCH 8/8] cpufreq: hisilicon: Use generic platdev driver
  2016-04-21  8:43 [PATCH 0/8] cpufreq: dt: Don't create platform-device from platform code Viresh Kumar
                   ` (6 preceding siblings ...)
  2016-04-21  8:43   ` Viresh Kumar
@ 2016-04-21  8:43 ` Viresh Kumar
  2016-04-23 17:14   ` Leo Yan
  2016-04-21  9:49 ` [PATCH 0/8] cpufreq: dt: Don't create platform-device from platform code Arnd Bergmann
  8 siblings, 1 reply; 45+ messages in thread
From: Viresh Kumar @ 2016-04-21  8:43 UTC (permalink / raw)
  To: Rafael Wysocki, Viresh Kumar
  Cc: linaro-kernel, linux-pm, arnd.bergmann, Leo Yan, linux-kernel

The cpufreq-dt-platdev driver supports creation of cpufreq-dt platform
device now, reuse that and remove similar code from platform code.

Cc: Leo Yan <leo.yan@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 drivers/cpufreq/Kconfig.arm          |  9 --------
 drivers/cpufreq/Makefile             |  1 -
 drivers/cpufreq/cpufreq-dt-platdev.c |  2 ++
 drivers/cpufreq/hisi-acpu-cpufreq.c  | 42 ------------------------------------
 4 files changed, 2 insertions(+), 52 deletions(-)
 delete mode 100644 drivers/cpufreq/hisi-acpu-cpufreq.c

diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm
index 14b1f9393b05..d89b8afe23b6 100644
--- a/drivers/cpufreq/Kconfig.arm
+++ b/drivers/cpufreq/Kconfig.arm
@@ -50,15 +50,6 @@ config ARM_HIGHBANK_CPUFREQ
 
 	  If in doubt, say N.
 
-config ARM_HISI_ACPU_CPUFREQ
-	tristate "Hisilicon ACPU CPUfreq driver"
-	depends on ARCH_HISI && CPUFREQ_DT
-	select PM_OPP
-	help
-	  This enables the hisilicon ACPU CPUfreq driver.
-
-	  If in doubt, say N.
-
 config ARM_IMX6Q_CPUFREQ
 	tristate "Freescale i.MX6 cpufreq support"
 	depends on ARCH_MXC
diff --git a/drivers/cpufreq/Makefile b/drivers/cpufreq/Makefile
index d7b646c0f2e9..2cce2cd400f9 100644
--- a/drivers/cpufreq/Makefile
+++ b/drivers/cpufreq/Makefile
@@ -55,7 +55,6 @@ obj-$(CONFIG_ARCH_DAVINCI)		+= davinci-cpufreq.o
 obj-$(CONFIG_UX500_SOC_DB8500)		+= dbx500-cpufreq.o
 obj-$(CONFIG_ARM_EXYNOS5440_CPUFREQ)	+= exynos5440-cpufreq.o
 obj-$(CONFIG_ARM_HIGHBANK_CPUFREQ)	+= highbank-cpufreq.o
-obj-$(CONFIG_ARM_HISI_ACPU_CPUFREQ)	+= hisi-acpu-cpufreq.o
 obj-$(CONFIG_ARM_IMX6Q_CPUFREQ)		+= imx6q-cpufreq.o
 obj-$(CONFIG_ARM_INTEGRATOR)		+= integrator-cpufreq.o
 obj-$(CONFIG_ARM_KIRKWOOD_CPUFREQ)	+= kirkwood-cpufreq.o
diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c
index c8a3eceac356..69b2a222c84e 100644
--- a/drivers/cpufreq/cpufreq-dt-platdev.c
+++ b/drivers/cpufreq/cpufreq-dt-platdev.c
@@ -24,6 +24,8 @@ static const struct of_device_id machines[] = {
 	{ .compatible = "allwinner,sun8i-a83t", },
 	{ .compatible = "allwinner,sun8i-h3", },
 
+	{ .compatible = "hisilicon,hi6220", },
+
 	{ .compatible = "fsl,imx27", },
 	{ .compatible = "fsl,imx51", },
 	{ .compatible = "fsl,imx53", },
diff --git a/drivers/cpufreq/hisi-acpu-cpufreq.c b/drivers/cpufreq/hisi-acpu-cpufreq.c
deleted file mode 100644
index 026d5b2224de..000000000000
--- a/drivers/cpufreq/hisi-acpu-cpufreq.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Hisilicon Platforms Using ACPU CPUFreq Support
- *
- * Copyright (c) 2015 Hisilicon Limited.
- * Copyright (c) 2015 Linaro Limited.
- *
- * Leo Yan <leo.yan@linaro.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * This program is distributed "as is" WITHOUT ANY WARRANTY of any
- * kind, whether express or implied; without even the implied warranty
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
-
-#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
-
-#include <linux/err.h>
-#include <linux/init.h>
-#include <linux/kernel.h>
-#include <linux/module.h>
-#include <linux/of.h>
-#include <linux/platform_device.h>
-
-static int __init hisi_acpu_cpufreq_driver_init(void)
-{
-	struct platform_device *pdev;
-
-	if (!of_machine_is_compatible("hisilicon,hi6220"))
-		return -ENODEV;
-
-	pdev = platform_device_register_simple("cpufreq-dt", -1, NULL, 0);
-	return PTR_ERR_OR_ZERO(pdev);
-}
-module_init(hisi_acpu_cpufreq_driver_init);
-
-MODULE_AUTHOR("Leo Yan <leo.yan@linaro.org>");
-MODULE_DESCRIPTION("Hisilicon acpu cpufreq driver");
-MODULE_LICENSE("GPL v2");
-- 
2.7.1.410.g6faf27b

^ permalink raw reply related	[flat|nested] 45+ messages in thread

* Re: [PATCH 6/8] cpufreq: sunxi: Use generic platdev driver
  2016-04-21  8:43   ` Viresh Kumar
@ 2016-04-21  8:54     ` Maxime Ripard
  -1 siblings, 0 replies; 45+ messages in thread
From: Maxime Ripard @ 2016-04-21  8:54 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: Rafael Wysocki, Chen-Yu Tsai, linaro-kernel, linux-pm,
	arnd.bergmann, linux-arm-kernel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 554 bytes --]

On Thu, Apr 21, 2016 at 02:13:52PM +0530, Viresh Kumar wrote:
> The cpufreq-dt-platdev driver supports creation of cpufreq-dt platform
> device now, reuse that and remove similar code from platform code.
> 
> Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
> Cc: Chen-Yu Tsai <wens@csie.org>
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>

Thanks,
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 45+ messages in thread

* [PATCH 6/8] cpufreq: sunxi: Use generic platdev driver
@ 2016-04-21  8:54     ` Maxime Ripard
  0 siblings, 0 replies; 45+ messages in thread
From: Maxime Ripard @ 2016-04-21  8:54 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Apr 21, 2016 at 02:13:52PM +0530, Viresh Kumar wrote:
> The cpufreq-dt-platdev driver supports creation of cpufreq-dt platform
> device now, reuse that and remove similar code from platform code.
> 
> Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
> Cc: Chen-Yu Tsai <wens@csie.org>
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>

Thanks,
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160421/9c237690/attachment.sig>

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 1/8] cpufreq: berlin: Use generic platdev driver
  2016-04-21  8:43   ` Viresh Kumar
@ 2016-04-21  9:05     ` Antoine Tenart
  -1 siblings, 0 replies; 45+ messages in thread
From: Antoine Tenart @ 2016-04-21  9:05 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: Rafael Wysocki, Sebastian Hesselbarth, linaro-kernel, linux-pm,
	arnd.bergmann, Antoine Tenart, linux-arm-kernel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 2171 bytes --]

Hi,

On Thu, Apr 21, 2016 at 02:13:47PM +0530, Viresh Kumar wrote:
> The cpufreq-dt-platdev driver supports creation of cpufreq-dt platform
> device now, reuse that and remove similar code from platform code.
> 
> Cc: Antoine Tenart <antoine.tenart@free-electrons.com>
> Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

Acked-by: Antoine Tenart <antoine.tenart@free-electrons.com>

Thanks!

Antoine

> ---
>  arch/arm/mach-berlin/berlin.c        | 6 ------
>  drivers/cpufreq/cpufreq-dt-platdev.c | 2 ++
>  2 files changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/arm/mach-berlin/berlin.c b/arch/arm/mach-berlin/berlin.c
> index 25d73870ccca..ac181c6797ee 100644
> --- a/arch/arm/mach-berlin/berlin.c
> +++ b/arch/arm/mach-berlin/berlin.c
> @@ -18,11 +18,6 @@
>  #include <asm/hardware/cache-l2x0.h>
>  #include <asm/mach/arch.h>
>  
> -static void __init berlin_init_late(void)
> -{
> -	platform_device_register_simple("cpufreq-dt", -1, NULL, 0);
> -}
> -
>  static const char * const berlin_dt_compat[] = {
>  	"marvell,berlin",
>  	NULL,
> @@ -30,7 +25,6 @@ static const char * const berlin_dt_compat[] = {
>  
>  DT_MACHINE_START(BERLIN_DT, "Marvell Berlin")
>  	.dt_compat	= berlin_dt_compat,
> -	.init_late	= berlin_init_late,
>  	/*
>  	 * with DT probing for L2CCs, berlin_init_machine can be removed.
>  	 * Note: 88DE3005 (Armada 1500-mini) uses pl310 l2cc
> diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c
> index f2ae7ad99a3c..3b3e6804cf14 100644
> --- a/drivers/cpufreq/cpufreq-dt-platdev.c
> +++ b/drivers/cpufreq/cpufreq-dt-platdev.c
> @@ -12,6 +12,8 @@
>  #include <linux/platform_device.h>
>  
>  static const struct of_device_id machines[] = {
> +	{ .compatible = "marvell,berlin", },
> +
>  	{ .compatible = "samsung,exynos3250", },
>  	{ .compatible = "samsung,exynos4210", },
>  	{ .compatible = "samsung,exynos4212", },
> -- 
> 2.7.1.410.g6faf27b
> 

-- 
Antoine Ténart, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 45+ messages in thread

* [PATCH 1/8] cpufreq: berlin: Use generic platdev driver
@ 2016-04-21  9:05     ` Antoine Tenart
  0 siblings, 0 replies; 45+ messages in thread
From: Antoine Tenart @ 2016-04-21  9:05 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On Thu, Apr 21, 2016 at 02:13:47PM +0530, Viresh Kumar wrote:
> The cpufreq-dt-platdev driver supports creation of cpufreq-dt platform
> device now, reuse that and remove similar code from platform code.
> 
> Cc: Antoine Tenart <antoine.tenart@free-electrons.com>
> Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

Acked-by: Antoine Tenart <antoine.tenart@free-electrons.com>

Thanks!

Antoine

> ---
>  arch/arm/mach-berlin/berlin.c        | 6 ------
>  drivers/cpufreq/cpufreq-dt-platdev.c | 2 ++
>  2 files changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/arm/mach-berlin/berlin.c b/arch/arm/mach-berlin/berlin.c
> index 25d73870ccca..ac181c6797ee 100644
> --- a/arch/arm/mach-berlin/berlin.c
> +++ b/arch/arm/mach-berlin/berlin.c
> @@ -18,11 +18,6 @@
>  #include <asm/hardware/cache-l2x0.h>
>  #include <asm/mach/arch.h>
>  
> -static void __init berlin_init_late(void)
> -{
> -	platform_device_register_simple("cpufreq-dt", -1, NULL, 0);
> -}
> -
>  static const char * const berlin_dt_compat[] = {
>  	"marvell,berlin",
>  	NULL,
> @@ -30,7 +25,6 @@ static const char * const berlin_dt_compat[] = {
>  
>  DT_MACHINE_START(BERLIN_DT, "Marvell Berlin")
>  	.dt_compat	= berlin_dt_compat,
> -	.init_late	= berlin_init_late,
>  	/*
>  	 * with DT probing for L2CCs, berlin_init_machine can be removed.
>  	 * Note: 88DE3005 (Armada 1500-mini) uses pl310 l2cc
> diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c
> index f2ae7ad99a3c..3b3e6804cf14 100644
> --- a/drivers/cpufreq/cpufreq-dt-platdev.c
> +++ b/drivers/cpufreq/cpufreq-dt-platdev.c
> @@ -12,6 +12,8 @@
>  #include <linux/platform_device.h>
>  
>  static const struct of_device_id machines[] = {
> +	{ .compatible = "marvell,berlin", },
> +
>  	{ .compatible = "samsung,exynos3250", },
>  	{ .compatible = "samsung,exynos4210", },
>  	{ .compatible = "samsung,exynos4212", },
> -- 
> 2.7.1.410.g6faf27b
> 

-- 
Antoine T?nart, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160421/88b91cfd/attachment.sig>

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 2/8] cpufreq: imx: Use generic platdev driver
  2016-04-21  8:43   ` Viresh Kumar
@ 2016-04-21  9:19     ` Lucas Stach
  -1 siblings, 0 replies; 45+ messages in thread
From: Lucas Stach @ 2016-04-21  9:19 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: Rafael Wysocki, Shawn Guo, Sascha Hauer, arnd.bergmann,
	linaro-kernel, linux-kernel, linux-arm-kernel, linux-pm

Am Donnerstag, den 21.04.2016, 14:13 +0530 schrieb Viresh Kumar:
> The cpufreq-dt-platdev driver supports creation of cpufreq-dt platform
> device now, reuse that and remove similar code from platform code.
> 
> Cc: Shawn Guo <shawnguo@kernel.org>
> Cc: Sascha Hauer <kernel@pengutronix.de>
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

Looks good to me:

Acked-by: Lucas Stach <l.stach@pengutronix.de>

> ---
>  arch/arm/mach-imx/imx27-dt.c         | 4 ----
>  arch/arm/mach-imx/mach-imx51.c       | 3 ---
>  arch/arm/mach-imx/mach-imx53.c       | 2 --
>  arch/arm/mach-imx/mach-imx7d.c       | 6 ------
>  drivers/cpufreq/cpufreq-dt-platdev.c | 5 +++++
>  5 files changed, 5 insertions(+), 15 deletions(-)
> 
> diff --git a/arch/arm/mach-imx/imx27-dt.c b/arch/arm/mach-imx/imx27-dt.c
> index bd42d1bd10af..90c62bf01f9e 100644
> --- a/arch/arm/mach-imx/imx27-dt.c
> +++ b/arch/arm/mach-imx/imx27-dt.c
> @@ -20,11 +20,7 @@
>  
>  static void __init imx27_dt_init(void)
>  {
> -	struct platform_device_info devinfo = { .name = "cpufreq-dt", };
> -
>  	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
> -
> -	platform_device_register_full(&devinfo);
>  }
>  
>  static const char * const imx27_dt_board_compat[] __initconst = {
> diff --git a/arch/arm/mach-imx/mach-imx51.c b/arch/arm/mach-imx/mach-imx51.c
> index 6883fbaf9484..10a82a4f1e58 100644
> --- a/arch/arm/mach-imx/mach-imx51.c
> +++ b/arch/arm/mach-imx/mach-imx51.c
> @@ -50,13 +50,10 @@ static void __init imx51_ipu_mipi_setup(void)
>  
>  static void __init imx51_dt_init(void)
>  {
> -	struct platform_device_info devinfo = { .name = "cpufreq-dt", };
> -
>  	imx51_ipu_mipi_setup();
>  	imx_src_init();
>  
>  	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
> -	platform_device_register_full(&devinfo);
>  }
>  
>  static void __init imx51_init_late(void)
> diff --git a/arch/arm/mach-imx/mach-imx53.c b/arch/arm/mach-imx/mach-imx53.c
> index 86316a979297..18b5c5c136db 100644
> --- a/arch/arm/mach-imx/mach-imx53.c
> +++ b/arch/arm/mach-imx/mach-imx53.c
> @@ -40,8 +40,6 @@ static void __init imx53_dt_init(void)
>  static void __init imx53_init_late(void)
>  {
>  	imx53_pm_init();
> -
> -	platform_device_register_simple("cpufreq-dt", -1, NULL, 0);
>  }
>  
>  static const char * const imx53_dt_board_compat[] __initconst = {
> diff --git a/arch/arm/mach-imx/mach-imx7d.c b/arch/arm/mach-imx/mach-imx7d.c
> index 5a27f20c9a82..b450f525a670 100644
> --- a/arch/arm/mach-imx/mach-imx7d.c
> +++ b/arch/arm/mach-imx/mach-imx7d.c
> @@ -105,11 +105,6 @@ static void __init imx7d_init_irq(void)
>  	irqchip_init();
>  }
>  
> -static void __init imx7d_init_late(void)
> -{
> -	platform_device_register_simple("cpufreq-dt", -1, NULL, 0);
> -}
> -
>  static const char *const imx7d_dt_compat[] __initconst = {
>  	"fsl,imx7d",
>  	NULL,
> @@ -117,7 +112,6 @@ static const char *const imx7d_dt_compat[] __initconst = {
>  
>  DT_MACHINE_START(IMX7D, "Freescale i.MX7 Dual (Device Tree)")
>  	.init_irq	= imx7d_init_irq,
> -	.init_late	= imx7d_init_late,
>  	.init_machine	= imx7d_init_machine,
>  	.dt_compat	= imx7d_dt_compat,
>  MACHINE_END
> diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c
> index 3b3e6804cf14..ac12c4a02964 100644
> --- a/drivers/cpufreq/cpufreq-dt-platdev.c
> +++ b/drivers/cpufreq/cpufreq-dt-platdev.c
> @@ -12,6 +12,11 @@
>  #include <linux/platform_device.h>
>  
>  static const struct of_device_id machines[] = {
> +	{ .compatible = "fsl,imx27", },
> +	{ .compatible = "fsl,imx51", },
> +	{ .compatible = "fsl,imx53", },
> +	{ .compatible = "fsl,imx7d", },
> +
>  	{ .compatible = "marvell,berlin", },
>  
>  	{ .compatible = "samsung,exynos3250", },

^ permalink raw reply	[flat|nested] 45+ messages in thread

* [PATCH 2/8] cpufreq: imx: Use generic platdev driver
@ 2016-04-21  9:19     ` Lucas Stach
  0 siblings, 0 replies; 45+ messages in thread
From: Lucas Stach @ 2016-04-21  9:19 UTC (permalink / raw)
  To: linux-arm-kernel

Am Donnerstag, den 21.04.2016, 14:13 +0530 schrieb Viresh Kumar:
> The cpufreq-dt-platdev driver supports creation of cpufreq-dt platform
> device now, reuse that and remove similar code from platform code.
> 
> Cc: Shawn Guo <shawnguo@kernel.org>
> Cc: Sascha Hauer <kernel@pengutronix.de>
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

Looks good to me:

Acked-by: Lucas Stach <l.stach@pengutronix.de>

> ---
>  arch/arm/mach-imx/imx27-dt.c         | 4 ----
>  arch/arm/mach-imx/mach-imx51.c       | 3 ---
>  arch/arm/mach-imx/mach-imx53.c       | 2 --
>  arch/arm/mach-imx/mach-imx7d.c       | 6 ------
>  drivers/cpufreq/cpufreq-dt-platdev.c | 5 +++++
>  5 files changed, 5 insertions(+), 15 deletions(-)
> 
> diff --git a/arch/arm/mach-imx/imx27-dt.c b/arch/arm/mach-imx/imx27-dt.c
> index bd42d1bd10af..90c62bf01f9e 100644
> --- a/arch/arm/mach-imx/imx27-dt.c
> +++ b/arch/arm/mach-imx/imx27-dt.c
> @@ -20,11 +20,7 @@
>  
>  static void __init imx27_dt_init(void)
>  {
> -	struct platform_device_info devinfo = { .name = "cpufreq-dt", };
> -
>  	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
> -
> -	platform_device_register_full(&devinfo);
>  }
>  
>  static const char * const imx27_dt_board_compat[] __initconst = {
> diff --git a/arch/arm/mach-imx/mach-imx51.c b/arch/arm/mach-imx/mach-imx51.c
> index 6883fbaf9484..10a82a4f1e58 100644
> --- a/arch/arm/mach-imx/mach-imx51.c
> +++ b/arch/arm/mach-imx/mach-imx51.c
> @@ -50,13 +50,10 @@ static void __init imx51_ipu_mipi_setup(void)
>  
>  static void __init imx51_dt_init(void)
>  {
> -	struct platform_device_info devinfo = { .name = "cpufreq-dt", };
> -
>  	imx51_ipu_mipi_setup();
>  	imx_src_init();
>  
>  	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
> -	platform_device_register_full(&devinfo);
>  }
>  
>  static void __init imx51_init_late(void)
> diff --git a/arch/arm/mach-imx/mach-imx53.c b/arch/arm/mach-imx/mach-imx53.c
> index 86316a979297..18b5c5c136db 100644
> --- a/arch/arm/mach-imx/mach-imx53.c
> +++ b/arch/arm/mach-imx/mach-imx53.c
> @@ -40,8 +40,6 @@ static void __init imx53_dt_init(void)
>  static void __init imx53_init_late(void)
>  {
>  	imx53_pm_init();
> -
> -	platform_device_register_simple("cpufreq-dt", -1, NULL, 0);
>  }
>  
>  static const char * const imx53_dt_board_compat[] __initconst = {
> diff --git a/arch/arm/mach-imx/mach-imx7d.c b/arch/arm/mach-imx/mach-imx7d.c
> index 5a27f20c9a82..b450f525a670 100644
> --- a/arch/arm/mach-imx/mach-imx7d.c
> +++ b/arch/arm/mach-imx/mach-imx7d.c
> @@ -105,11 +105,6 @@ static void __init imx7d_init_irq(void)
>  	irqchip_init();
>  }
>  
> -static void __init imx7d_init_late(void)
> -{
> -	platform_device_register_simple("cpufreq-dt", -1, NULL, 0);
> -}
> -
>  static const char *const imx7d_dt_compat[] __initconst = {
>  	"fsl,imx7d",
>  	NULL,
> @@ -117,7 +112,6 @@ static const char *const imx7d_dt_compat[] __initconst = {
>  
>  DT_MACHINE_START(IMX7D, "Freescale i.MX7 Dual (Device Tree)")
>  	.init_irq	= imx7d_init_irq,
> -	.init_late	= imx7d_init_late,
>  	.init_machine	= imx7d_init_machine,
>  	.dt_compat	= imx7d_dt_compat,
>  MACHINE_END
> diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c
> index 3b3e6804cf14..ac12c4a02964 100644
> --- a/drivers/cpufreq/cpufreq-dt-platdev.c
> +++ b/drivers/cpufreq/cpufreq-dt-platdev.c
> @@ -12,6 +12,11 @@
>  #include <linux/platform_device.h>
>  
>  static const struct of_device_id machines[] = {
> +	{ .compatible = "fsl,imx27", },
> +	{ .compatible = "fsl,imx51", },
> +	{ .compatible = "fsl,imx53", },
> +	{ .compatible = "fsl,imx7d", },
> +
>  	{ .compatible = "marvell,berlin", },
>  
>  	{ .compatible = "samsung,exynos3250", },

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 2/8] cpufreq: imx: Use generic platdev driver
  2016-04-21  8:43   ` Viresh Kumar
@ 2016-04-21  9:46     ` Arnd Bergmann
  -1 siblings, 0 replies; 45+ messages in thread
From: Arnd Bergmann @ 2016-04-21  9:46 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Viresh Kumar, Rafael Wysocki, Shawn Guo, Sascha Hauer,
	arnd.bergmann, linaro-kernel, linux-kernel, linux-pm

On Thursday 21 April 2016 14:13:48 Viresh Kumar wrote:
> The cpufreq-dt-platdev driver supports creation of cpufreq-dt platform
> device now, reuse that and remove similar code from platform code.
> 
> Cc: Shawn Guo <shawnguo@kernel.org>
> Cc: Sascha Hauer <kernel@pengutronix.de>
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
>  arch/arm/mach-imx/imx27-dt.c         | 4 ----
>  arch/arm/mach-imx/mach-imx51.c       | 3 ---
>  arch/arm/mach-imx/mach-imx53.c       | 2 --
>  arch/arm/mach-imx/mach-imx7d.c       | 6 ------
>  drivers/cpufreq/cpufreq-dt-platdev.c | 5 +++++
>  5 files changed, 5 insertions(+), 15 deletions(-)
> 
> diff --git a/arch/arm/mach-imx/imx27-dt.c b/arch/arm/mach-imx/imx27-dt.c
> index bd42d1bd10af..90c62bf01f9e 100644
> --- a/arch/arm/mach-imx/imx27-dt.c
> +++ b/arch/arm/mach-imx/imx27-dt.c
> @@ -20,11 +20,7 @@
>  
>  static void __init imx27_dt_init(void)
>  {
> -	struct platform_device_info devinfo = { .name = "cpufreq-dt", };
> -
>  	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
> -
> -	platform_device_register_full(&devinfo);
>  }
>

Please remove the entire function now, a NULL .init_machine machine
callback pointer has the same effect as the remaining line.

The rest of the patch is fine.

	Arnd

^ permalink raw reply	[flat|nested] 45+ messages in thread

* [PATCH 2/8] cpufreq: imx: Use generic platdev driver
@ 2016-04-21  9:46     ` Arnd Bergmann
  0 siblings, 0 replies; 45+ messages in thread
From: Arnd Bergmann @ 2016-04-21  9:46 UTC (permalink / raw)
  To: linux-arm-kernel

On Thursday 21 April 2016 14:13:48 Viresh Kumar wrote:
> The cpufreq-dt-platdev driver supports creation of cpufreq-dt platform
> device now, reuse that and remove similar code from platform code.
> 
> Cc: Shawn Guo <shawnguo@kernel.org>
> Cc: Sascha Hauer <kernel@pengutronix.de>
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
>  arch/arm/mach-imx/imx27-dt.c         | 4 ----
>  arch/arm/mach-imx/mach-imx51.c       | 3 ---
>  arch/arm/mach-imx/mach-imx53.c       | 2 --
>  arch/arm/mach-imx/mach-imx7d.c       | 6 ------
>  drivers/cpufreq/cpufreq-dt-platdev.c | 5 +++++
>  5 files changed, 5 insertions(+), 15 deletions(-)
> 
> diff --git a/arch/arm/mach-imx/imx27-dt.c b/arch/arm/mach-imx/imx27-dt.c
> index bd42d1bd10af..90c62bf01f9e 100644
> --- a/arch/arm/mach-imx/imx27-dt.c
> +++ b/arch/arm/mach-imx/imx27-dt.c
> @@ -20,11 +20,7 @@
>  
>  static void __init imx27_dt_init(void)
>  {
> -	struct platform_device_info devinfo = { .name = "cpufreq-dt", };
> -
>  	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
> -
> -	platform_device_register_full(&devinfo);
>  }
>

Please remove the entire function now, a NULL .init_machine machine
callback pointer has the same effect as the remaining line.

The rest of the patch is fine.

	Arnd

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 0/8] cpufreq: dt: Don't create platform-device from platform code
  2016-04-21  8:43 [PATCH 0/8] cpufreq: dt: Don't create platform-device from platform code Viresh Kumar
                   ` (7 preceding siblings ...)
  2016-04-21  8:43 ` [PATCH 8/8] cpufreq: hisilicon: " Viresh Kumar
@ 2016-04-21  9:49 ` Arnd Bergmann
  8 siblings, 0 replies; 45+ messages in thread
From: Arnd Bergmann @ 2016-04-21  9:49 UTC (permalink / raw)
  To: linaro-kernel
  Cc: Viresh Kumar, Rafael Wysocki, Heiko Stuebner, linux-pm,
	Tony Lindgren, Antoine Tenart, Magnus Damm, Michal Simek,
	Chen-Yu Tsai, Simon Horman, Sascha Hauer, Leo Yan, Shawn Guo,
	Maxime Ripard, Sören Brinkmann, Sebastian Hesselbarth

On Thursday 21 April 2016 14:13:46 Viresh Kumar wrote:
> Hi,
> 
> This migrates rest of the platforms to use cpufreq-dt-platdev.c. There
> are few exceptions though:
> - mvebu: it uses platform data and its problem will be solved in a
>   separate series.
> - highbank, s5pv210, sti, tegra124: these platforms already have cpufreq
>   drivers in drivers/cpufreq/, which does some other stuff and finally
>   create the device. There are sequencing issues, and so they will be
>   left as it is.

Looks good overall, one minor comment for patch 3, thanks a lot for your
work on this!

Acked-by: Arnd Bergmann <arnd@arndb.de>


^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 2/8] cpufreq: imx: Use generic platdev driver
  2016-04-21  9:46     ` Arnd Bergmann
@ 2016-04-21  9:50       ` Viresh Kumar
  -1 siblings, 0 replies; 45+ messages in thread
From: Viresh Kumar @ 2016-04-21  9:50 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: linux-arm-kernel, Rafael Wysocki, Shawn Guo, Sascha Hauer,
	arnd.bergmann, linaro-kernel, linux-kernel, linux-pm

On 21-04-16, 11:46, Arnd Bergmann wrote:
> On Thursday 21 April 2016 14:13:48 Viresh Kumar wrote:
> > The cpufreq-dt-platdev driver supports creation of cpufreq-dt platform
> > device now, reuse that and remove similar code from platform code.
> > 
> > Cc: Shawn Guo <shawnguo@kernel.org>
> > Cc: Sascha Hauer <kernel@pengutronix.de>
> > Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> > ---
> >  arch/arm/mach-imx/imx27-dt.c         | 4 ----
> >  arch/arm/mach-imx/mach-imx51.c       | 3 ---
> >  arch/arm/mach-imx/mach-imx53.c       | 2 --
> >  arch/arm/mach-imx/mach-imx7d.c       | 6 ------
> >  drivers/cpufreq/cpufreq-dt-platdev.c | 5 +++++
> >  5 files changed, 5 insertions(+), 15 deletions(-)
> > 
> > diff --git a/arch/arm/mach-imx/imx27-dt.c b/arch/arm/mach-imx/imx27-dt.c
> > index bd42d1bd10af..90c62bf01f9e 100644
> > --- a/arch/arm/mach-imx/imx27-dt.c
> > +++ b/arch/arm/mach-imx/imx27-dt.c
> > @@ -20,11 +20,7 @@
> >  
> >  static void __init imx27_dt_init(void)
> >  {
> > -	struct platform_device_info devinfo = { .name = "cpufreq-dt", };
> > -
> >  	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
> > -
> > -	platform_device_register_full(&devinfo);
> >  }
> >
> 
> Please remove the entire function now, a NULL .init_machine machine
> callback pointer has the same effect as the remaining line.
> 
> The rest of the patch is fine.

Perhaps that should be done in a separate patch I feel. Will do so after this is
merged.

-- 
viresh

^ permalink raw reply	[flat|nested] 45+ messages in thread

* [PATCH 2/8] cpufreq: imx: Use generic platdev driver
@ 2016-04-21  9:50       ` Viresh Kumar
  0 siblings, 0 replies; 45+ messages in thread
From: Viresh Kumar @ 2016-04-21  9:50 UTC (permalink / raw)
  To: linux-arm-kernel

On 21-04-16, 11:46, Arnd Bergmann wrote:
> On Thursday 21 April 2016 14:13:48 Viresh Kumar wrote:
> > The cpufreq-dt-platdev driver supports creation of cpufreq-dt platform
> > device now, reuse that and remove similar code from platform code.
> > 
> > Cc: Shawn Guo <shawnguo@kernel.org>
> > Cc: Sascha Hauer <kernel@pengutronix.de>
> > Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> > ---
> >  arch/arm/mach-imx/imx27-dt.c         | 4 ----
> >  arch/arm/mach-imx/mach-imx51.c       | 3 ---
> >  arch/arm/mach-imx/mach-imx53.c       | 2 --
> >  arch/arm/mach-imx/mach-imx7d.c       | 6 ------
> >  drivers/cpufreq/cpufreq-dt-platdev.c | 5 +++++
> >  5 files changed, 5 insertions(+), 15 deletions(-)
> > 
> > diff --git a/arch/arm/mach-imx/imx27-dt.c b/arch/arm/mach-imx/imx27-dt.c
> > index bd42d1bd10af..90c62bf01f9e 100644
> > --- a/arch/arm/mach-imx/imx27-dt.c
> > +++ b/arch/arm/mach-imx/imx27-dt.c
> > @@ -20,11 +20,7 @@
> >  
> >  static void __init imx27_dt_init(void)
> >  {
> > -	struct platform_device_info devinfo = { .name = "cpufreq-dt", };
> > -
> >  	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
> > -
> > -	platform_device_register_full(&devinfo);
> >  }
> >
> 
> Please remove the entire function now, a NULL .init_machine machine
> callback pointer has the same effect as the remaining line.
> 
> The rest of the patch is fine.

Perhaps that should be done in a separate patch I feel. Will do so after this is
merged.

-- 
viresh

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 2/8] cpufreq: imx: Use generic platdev driver
  2016-04-21  9:50       ` Viresh Kumar
@ 2016-04-21 10:17         ` Arnd Bergmann
  -1 siblings, 0 replies; 45+ messages in thread
From: Arnd Bergmann @ 2016-04-21 10:17 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Viresh Kumar, linaro-kernel, linux-pm, Rafael Wysocki,
	linux-kernel, Sascha Hauer, arnd.bergmann, Shawn Guo

On Thursday 21 April 2016 15:20:32 Viresh Kumar wrote:
> > > diff --git a/arch/arm/mach-imx/imx27-dt.c b/arch/arm/mach-imx/imx27-dt.c
> > > index bd42d1bd10af..90c62bf01f9e 100644
> > > --- a/arch/arm/mach-imx/imx27-dt.c
> > > +++ b/arch/arm/mach-imx/imx27-dt.c
> > > @@ -20,11 +20,7 @@
> > >  
> > >  static void __init imx27_dt_init(void)
> > >  {
> > > -   struct platform_device_info devinfo = { .name = "cpufreq-dt", };
> > > -
> > >     of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
> > > -
> > > -   platform_device_register_full(&devinfo);
> > >  }
> > >
> > 
> > Please remove the entire function now, a NULL .init_machine machine
> > callback pointer has the same effect as the remaining line.
> > 
> > The rest of the patch is fine.
> 
> Perhaps that should be done in a separate patch I feel. Will do so after this is
> merged.
> 

I would do it in the same patch, just like you remove some of the
.init_late() callbacks elsewhere, but it clearly works either way, so
do as you like unless Shawn or Sascha have a strong opinion on the
matter.

	Arnd

^ permalink raw reply	[flat|nested] 45+ messages in thread

* [PATCH 2/8] cpufreq: imx: Use generic platdev driver
@ 2016-04-21 10:17         ` Arnd Bergmann
  0 siblings, 0 replies; 45+ messages in thread
From: Arnd Bergmann @ 2016-04-21 10:17 UTC (permalink / raw)
  To: linux-arm-kernel

On Thursday 21 April 2016 15:20:32 Viresh Kumar wrote:
> > > diff --git a/arch/arm/mach-imx/imx27-dt.c b/arch/arm/mach-imx/imx27-dt.c
> > > index bd42d1bd10af..90c62bf01f9e 100644
> > > --- a/arch/arm/mach-imx/imx27-dt.c
> > > +++ b/arch/arm/mach-imx/imx27-dt.c
> > > @@ -20,11 +20,7 @@
> > >  
> > >  static void __init imx27_dt_init(void)
> > >  {
> > > -   struct platform_device_info devinfo = { .name = "cpufreq-dt", };
> > > -
> > >     of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
> > > -
> > > -   platform_device_register_full(&devinfo);
> > >  }
> > >
> > 
> > Please remove the entire function now, a NULL .init_machine machine
> > callback pointer has the same effect as the remaining line.
> > 
> > The rest of the patch is fine.
> 
> Perhaps that should be done in a separate patch I feel. Will do so after this is
> merged.
> 

I would do it in the same patch, just like you remove some of the
.init_late() callbacks elsewhere, but it clearly works either way, so
do as you like unless Shawn or Sascha have a strong opinion on the
matter.

	Arnd

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 5/8] cpufreq: shmobile: Use generic platdev driver
  2016-04-21  8:43   ` Viresh Kumar
  (?)
@ 2016-04-21 13:04     ` Geert Uytterhoeven
  -1 siblings, 0 replies; 45+ messages in thread
From: Geert Uytterhoeven @ 2016-04-21 13:04 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: Rafael Wysocki, Simon Horman, Magnus Damm, linaro-kernel,
	Linux PM list, Arnd Bergmann, linux-arm-kernel,
	linux-renesas-soc, linux-kernel

Hi Viresh,

On Thu, Apr 21, 2016 at 10:43 AM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> --- a/drivers/cpufreq/cpufreq-dt-platdev.c
> +++ b/drivers/cpufreq/cpufreq-dt-platdev.c
> @@ -29,6 +29,18 @@ static const struct of_device_id machines[] = {
>         { .compatible = "samsung,exynos5800", },
>  #endif
>

I think an #ifdef CONFIG_ARCH_RENESAS block wouldn't hurt, likewise
for the other SoCs.
Soon you'll have this file filled with lots of compatible values for random\
SoCs...

> +       { .compatible = "renesas,emev2", },
> +       { .compatible = "renesas,r7s72100", },
> +       { .compatible = "renesas,r8a73a4", },
> +       { .compatible = "renesas,r8a7740", },
> +       { .compatible = "renesas,r8a7778", },
> +       { .compatible = "renesas,r8a7779", },
> +       { .compatible = "renesas,r8a7790", },
> +       { .compatible = "renesas,r8a7791", },
> +       { .compatible = "renesas,r8a7793", },
> +       { .compatible = "renesas,r8a7794", },
> +       { .compatible = "renesas,sh73a0", },
> +
>         { .compatible = "rockchip,rk2928", },
>         { .compatible = "rockchip,rk3066a", },
>         { .compatible = "rockchip,rk3066b", },

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 5/8] cpufreq: shmobile: Use generic platdev driver
@ 2016-04-21 13:04     ` Geert Uytterhoeven
  0 siblings, 0 replies; 45+ messages in thread
From: Geert Uytterhoeven @ 2016-04-21 13:04 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: Rafael Wysocki, Simon Horman, Magnus Damm, linaro-kernel,
	Linux PM list, Arnd Bergmann, linux-arm-kernel,
	linux-renesas-soc, linux-kernel

Hi Viresh,

On Thu, Apr 21, 2016 at 10:43 AM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> --- a/drivers/cpufreq/cpufreq-dt-platdev.c
> +++ b/drivers/cpufreq/cpufreq-dt-platdev.c
> @@ -29,6 +29,18 @@ static const struct of_device_id machines[] = {
>         { .compatible = "samsung,exynos5800", },
>  #endif
>

I think an #ifdef CONFIG_ARCH_RENESAS block wouldn't hurt, likewise
for the other SoCs.
Soon you'll have this file filled with lots of compatible values for random\
SoCs...

> +       { .compatible = "renesas,emev2", },
> +       { .compatible = "renesas,r7s72100", },
> +       { .compatible = "renesas,r8a73a4", },
> +       { .compatible = "renesas,r8a7740", },
> +       { .compatible = "renesas,r8a7778", },
> +       { .compatible = "renesas,r8a7779", },
> +       { .compatible = "renesas,r8a7790", },
> +       { .compatible = "renesas,r8a7791", },
> +       { .compatible = "renesas,r8a7793", },
> +       { .compatible = "renesas,r8a7794", },
> +       { .compatible = "renesas,sh73a0", },
> +
>         { .compatible = "rockchip,rk2928", },
>         { .compatible = "rockchip,rk3066a", },
>         { .compatible = "rockchip,rk3066b", },

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 45+ messages in thread

* [PATCH 5/8] cpufreq: shmobile: Use generic platdev driver
@ 2016-04-21 13:04     ` Geert Uytterhoeven
  0 siblings, 0 replies; 45+ messages in thread
From: Geert Uytterhoeven @ 2016-04-21 13:04 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Viresh,

On Thu, Apr 21, 2016 at 10:43 AM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> --- a/drivers/cpufreq/cpufreq-dt-platdev.c
> +++ b/drivers/cpufreq/cpufreq-dt-platdev.c
> @@ -29,6 +29,18 @@ static const struct of_device_id machines[] = {
>         { .compatible = "samsung,exynos5800", },
>  #endif
>

I think an #ifdef CONFIG_ARCH_RENESAS block wouldn't hurt, likewise
for the other SoCs.
Soon you'll have this file filled with lots of compatible values for random\
SoCs...

> +       { .compatible = "renesas,emev2", },
> +       { .compatible = "renesas,r7s72100", },
> +       { .compatible = "renesas,r8a73a4", },
> +       { .compatible = "renesas,r8a7740", },
> +       { .compatible = "renesas,r8a7778", },
> +       { .compatible = "renesas,r8a7779", },
> +       { .compatible = "renesas,r8a7790", },
> +       { .compatible = "renesas,r8a7791", },
> +       { .compatible = "renesas,r8a7793", },
> +       { .compatible = "renesas,r8a7794", },
> +       { .compatible = "renesas,sh73a0", },
> +
>         { .compatible = "rockchip,rk2928", },
>         { .compatible = "rockchip,rk3066a", },
>         { .compatible = "rockchip,rk3066b", },

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 5/8] cpufreq: shmobile: Use generic platdev driver
  2016-04-21 13:04     ` Geert Uytterhoeven
  (?)
@ 2016-04-22  3:21       ` Viresh Kumar
  -1 siblings, 0 replies; 45+ messages in thread
From: Viresh Kumar @ 2016-04-22  3:21 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Rafael Wysocki, Simon Horman, Magnus Damm, linaro-kernel,
	Linux PM list, Arnd Bergmann, linux-arm-kernel,
	linux-renesas-soc, linux-kernel

On 21-04-16, 15:04, Geert Uytterhoeven wrote:
> Hi Viresh,
> 
> On Thu, Apr 21, 2016 at 10:43 AM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> > --- a/drivers/cpufreq/cpufreq-dt-platdev.c
> > +++ b/drivers/cpufreq/cpufreq-dt-platdev.c
> > @@ -29,6 +29,18 @@ static const struct of_device_id machines[] = {
> >         { .compatible = "samsung,exynos5800", },
> >  #endif
> >
> 
> I think an #ifdef CONFIG_ARCH_RENESAS block wouldn't hurt, likewise
> for the other SoCs.
> Soon you'll have this file filled with lots of compatible values for random\
> SoCs...

This is going to be done once per boot and this shouldn't hurt. And for new
platforms we may do things differently as they are going to use opp-v2 bindings.

And, so I am not really in favor of ifdef hackery :)

-- 
viresh

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 5/8] cpufreq: shmobile: Use generic platdev driver
@ 2016-04-22  3:21       ` Viresh Kumar
  0 siblings, 0 replies; 45+ messages in thread
From: Viresh Kumar @ 2016-04-22  3:21 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Rafael Wysocki, Simon Horman, Magnus Damm, linaro-kernel,
	Linux PM list, Arnd Bergmann, linux-arm-kernel,
	linux-renesas-soc, linux-kernel

On 21-04-16, 15:04, Geert Uytterhoeven wrote:
> Hi Viresh,
> 
> On Thu, Apr 21, 2016 at 10:43 AM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> > --- a/drivers/cpufreq/cpufreq-dt-platdev.c
> > +++ b/drivers/cpufreq/cpufreq-dt-platdev.c
> > @@ -29,6 +29,18 @@ static const struct of_device_id machines[] = {
> >         { .compatible = "samsung,exynos5800", },
> >  #endif
> >
> 
> I think an #ifdef CONFIG_ARCH_RENESAS block wouldn't hurt, likewise
> for the other SoCs.
> Soon you'll have this file filled with lots of compatible values for random\
> SoCs...

This is going to be done once per boot and this shouldn't hurt. And for new
platforms we may do things differently as they are going to use opp-v2 bindings.

And, so I am not really in favor of ifdef hackery :)

-- 
viresh

^ permalink raw reply	[flat|nested] 45+ messages in thread

* [PATCH 5/8] cpufreq: shmobile: Use generic platdev driver
@ 2016-04-22  3:21       ` Viresh Kumar
  0 siblings, 0 replies; 45+ messages in thread
From: Viresh Kumar @ 2016-04-22  3:21 UTC (permalink / raw)
  To: linux-arm-kernel

On 21-04-16, 15:04, Geert Uytterhoeven wrote:
> Hi Viresh,
> 
> On Thu, Apr 21, 2016 at 10:43 AM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> > --- a/drivers/cpufreq/cpufreq-dt-platdev.c
> > +++ b/drivers/cpufreq/cpufreq-dt-platdev.c
> > @@ -29,6 +29,18 @@ static const struct of_device_id machines[] = {
> >         { .compatible = "samsung,exynos5800", },
> >  #endif
> >
> 
> I think an #ifdef CONFIG_ARCH_RENESAS block wouldn't hurt, likewise
> for the other SoCs.
> Soon you'll have this file filled with lots of compatible values for random\
> SoCs...

This is going to be done once per boot and this shouldn't hurt. And for new
platforms we may do things differently as they are going to use opp-v2 bindings.

And, so I am not really in favor of ifdef hackery :)

-- 
viresh

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 5/8] cpufreq: shmobile: Use generic platdev driver
  2016-04-22  3:21       ` Viresh Kumar
  (?)
@ 2016-04-22  6:41         ` Geert Uytterhoeven
  -1 siblings, 0 replies; 45+ messages in thread
From: Geert Uytterhoeven @ 2016-04-22  6:41 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: Rafael Wysocki, Simon Horman, Magnus Damm, linaro-kernel,
	Linux PM list, Arnd Bergmann, linux-arm-kernel,
	linux-renesas-soc, linux-kernel

Hi Viresh,

On Fri, Apr 22, 2016 at 5:21 AM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> On 21-04-16, 15:04, Geert Uytterhoeven wrote:
>> On Thu, Apr 21, 2016 at 10:43 AM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
>> > --- a/drivers/cpufreq/cpufreq-dt-platdev.c
>> > +++ b/drivers/cpufreq/cpufreq-dt-platdev.c
>> > @@ -29,6 +29,18 @@ static const struct of_device_id machines[] = {
>> >         { .compatible = "samsung,exynos5800", },
>> >  #endif
>> >
>>
>> I think an #ifdef CONFIG_ARCH_RENESAS block wouldn't hurt, likewise
>> for the other SoCs.
>> Soon you'll have this file filled with lots of compatible values for random\
>> SoCs...
>
> This is going to be done once per boot and this shouldn't hurt. And for new
> platforms we may do things differently as they are going to use opp-v2 bindings.

I was mainly thinking about kernel size.
If this is done once per boot, the array should be __initconst,
(looking at the code
in next) which is fine as cpufreq_dt_platdev_init() is already __init.

Thanks!

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 5/8] cpufreq: shmobile: Use generic platdev driver
@ 2016-04-22  6:41         ` Geert Uytterhoeven
  0 siblings, 0 replies; 45+ messages in thread
From: Geert Uytterhoeven @ 2016-04-22  6:41 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: Rafael Wysocki, Simon Horman, Magnus Damm, linaro-kernel,
	Linux PM list, Arnd Bergmann, linux-arm-kernel,
	linux-renesas-soc, linux-kernel

Hi Viresh,

On Fri, Apr 22, 2016 at 5:21 AM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> On 21-04-16, 15:04, Geert Uytterhoeven wrote:
>> On Thu, Apr 21, 2016 at 10:43 AM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
>> > --- a/drivers/cpufreq/cpufreq-dt-platdev.c
>> > +++ b/drivers/cpufreq/cpufreq-dt-platdev.c
>> > @@ -29,6 +29,18 @@ static const struct of_device_id machines[] = {
>> >         { .compatible = "samsung,exynos5800", },
>> >  #endif
>> >
>>
>> I think an #ifdef CONFIG_ARCH_RENESAS block wouldn't hurt, likewise
>> for the other SoCs.
>> Soon you'll have this file filled with lots of compatible values for random\
>> SoCs...
>
> This is going to be done once per boot and this shouldn't hurt. And for new
> platforms we may do things differently as they are going to use opp-v2 bindings.

I was mainly thinking about kernel size.
If this is done once per boot, the array should be __initconst,
(looking at the code
in next) which is fine as cpufreq_dt_platdev_init() is already __init.

Thanks!

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 45+ messages in thread

* [PATCH 5/8] cpufreq: shmobile: Use generic platdev driver
@ 2016-04-22  6:41         ` Geert Uytterhoeven
  0 siblings, 0 replies; 45+ messages in thread
From: Geert Uytterhoeven @ 2016-04-22  6:41 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Viresh,

On Fri, Apr 22, 2016 at 5:21 AM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> On 21-04-16, 15:04, Geert Uytterhoeven wrote:
>> On Thu, Apr 21, 2016 at 10:43 AM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
>> > --- a/drivers/cpufreq/cpufreq-dt-platdev.c
>> > +++ b/drivers/cpufreq/cpufreq-dt-platdev.c
>> > @@ -29,6 +29,18 @@ static const struct of_device_id machines[] = {
>> >         { .compatible = "samsung,exynos5800", },
>> >  #endif
>> >
>>
>> I think an #ifdef CONFIG_ARCH_RENESAS block wouldn't hurt, likewise
>> for the other SoCs.
>> Soon you'll have this file filled with lots of compatible values for random\
>> SoCs...
>
> This is going to be done once per boot and this shouldn't hurt. And for new
> platforms we may do things differently as they are going to use opp-v2 bindings.

I was mainly thinking about kernel size.
If this is done once per boot, the array should be __initconst,
(looking at the code
in next) which is fine as cpufreq_dt_platdev_init() is already __init.

Thanks!

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 5/8] cpufreq: shmobile: Use generic platdev driver
  2016-04-22  6:41         ` Geert Uytterhoeven
  (?)
@ 2016-04-22  6:47           ` Viresh Kumar
  -1 siblings, 0 replies; 45+ messages in thread
From: Viresh Kumar @ 2016-04-22  6:47 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Rafael Wysocki, Simon Horman, Magnus Damm, linaro-kernel,
	Linux PM list, Arnd Bergmann, linux-arm-kernel,
	linux-renesas-soc, linux-kernel

On 22-04-16, 08:41, Geert Uytterhoeven wrote:
> I was mainly thinking about kernel size.

Ahh, I see..

> If this is done once per boot, the array should be __initconst,
> (looking at the code
> in next) which is fine as cpufreq_dt_platdev_init() is already __init.

Sure, makes sense.. I will do that as a separate patch.

Though just to correct what I earlier said, if cpufreq-dt is developed as a
module, its done once per module insertion :)

-- 
viresh

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 5/8] cpufreq: shmobile: Use generic platdev driver
@ 2016-04-22  6:47           ` Viresh Kumar
  0 siblings, 0 replies; 45+ messages in thread
From: Viresh Kumar @ 2016-04-22  6:47 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Rafael Wysocki, Simon Horman, Magnus Damm, linaro-kernel,
	Linux PM list, Arnd Bergmann, linux-arm-kernel,
	linux-renesas-soc, linux-kernel

On 22-04-16, 08:41, Geert Uytterhoeven wrote:
> I was mainly thinking about kernel size.

Ahh, I see..

> If this is done once per boot, the array should be __initconst,
> (looking at the code
> in next) which is fine as cpufreq_dt_platdev_init() is already __init.

Sure, makes sense.. I will do that as a separate patch.

Though just to correct what I earlier said, if cpufreq-dt is developed as a
module, its done once per module insertion :)

-- 
viresh

^ permalink raw reply	[flat|nested] 45+ messages in thread

* [PATCH 5/8] cpufreq: shmobile: Use generic platdev driver
@ 2016-04-22  6:47           ` Viresh Kumar
  0 siblings, 0 replies; 45+ messages in thread
From: Viresh Kumar @ 2016-04-22  6:47 UTC (permalink / raw)
  To: linux-arm-kernel

On 22-04-16, 08:41, Geert Uytterhoeven wrote:
> I was mainly thinking about kernel size.

Ahh, I see..

> If this is done once per boot, the array should be __initconst,
> (looking at the code
> in next) which is fine as cpufreq_dt_platdev_init() is already __init.

Sure, makes sense.. I will do that as a separate patch.

Though just to correct what I earlier said, if cpufreq-dt is developed as a
module, its done once per module insertion :)

-- 
viresh

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 8/8] cpufreq: hisilicon: Use generic platdev driver
  2016-04-21  8:43 ` [PATCH 8/8] cpufreq: hisilicon: " Viresh Kumar
@ 2016-04-23 17:14   ` Leo Yan
  0 siblings, 0 replies; 45+ messages in thread
From: Leo Yan @ 2016-04-23 17:14 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: Rafael Wysocki, linaro-kernel, linux-pm, arnd.bergmann, linux-kernel

On Thu, Apr 21, 2016 at 02:13:54PM +0530, Viresh Kumar wrote:
> The cpufreq-dt-platdev driver supports creation of cpufreq-dt platform
> device now, reuse that and remove similar code from platform code.
> 
> Cc: Leo Yan <leo.yan@linaro.org>
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

Have tested this patch on Hikey, it works well with new driver
cpufreq-dt-platdev.c.

Tested-by: Leo Yan <leo.yan@linaro.org>

Thanks,
Leo Yan

> ---
>  drivers/cpufreq/Kconfig.arm          |  9 --------
>  drivers/cpufreq/Makefile             |  1 -
>  drivers/cpufreq/cpufreq-dt-platdev.c |  2 ++
>  drivers/cpufreq/hisi-acpu-cpufreq.c  | 42 ------------------------------------
>  4 files changed, 2 insertions(+), 52 deletions(-)
>  delete mode 100644 drivers/cpufreq/hisi-acpu-cpufreq.c
> 
> diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm
> index 14b1f9393b05..d89b8afe23b6 100644
> --- a/drivers/cpufreq/Kconfig.arm
> +++ b/drivers/cpufreq/Kconfig.arm
> @@ -50,15 +50,6 @@ config ARM_HIGHBANK_CPUFREQ
>  
>  	  If in doubt, say N.
>  
> -config ARM_HISI_ACPU_CPUFREQ
> -	tristate "Hisilicon ACPU CPUfreq driver"
> -	depends on ARCH_HISI && CPUFREQ_DT
> -	select PM_OPP
> -	help
> -	  This enables the hisilicon ACPU CPUfreq driver.
> -
> -	  If in doubt, say N.
> -
>  config ARM_IMX6Q_CPUFREQ
>  	tristate "Freescale i.MX6 cpufreq support"
>  	depends on ARCH_MXC
> diff --git a/drivers/cpufreq/Makefile b/drivers/cpufreq/Makefile
> index d7b646c0f2e9..2cce2cd400f9 100644
> --- a/drivers/cpufreq/Makefile
> +++ b/drivers/cpufreq/Makefile
> @@ -55,7 +55,6 @@ obj-$(CONFIG_ARCH_DAVINCI)		+= davinci-cpufreq.o
>  obj-$(CONFIG_UX500_SOC_DB8500)		+= dbx500-cpufreq.o
>  obj-$(CONFIG_ARM_EXYNOS5440_CPUFREQ)	+= exynos5440-cpufreq.o
>  obj-$(CONFIG_ARM_HIGHBANK_CPUFREQ)	+= highbank-cpufreq.o
> -obj-$(CONFIG_ARM_HISI_ACPU_CPUFREQ)	+= hisi-acpu-cpufreq.o
>  obj-$(CONFIG_ARM_IMX6Q_CPUFREQ)		+= imx6q-cpufreq.o
>  obj-$(CONFIG_ARM_INTEGRATOR)		+= integrator-cpufreq.o
>  obj-$(CONFIG_ARM_KIRKWOOD_CPUFREQ)	+= kirkwood-cpufreq.o
> diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c
> index c8a3eceac356..69b2a222c84e 100644
> --- a/drivers/cpufreq/cpufreq-dt-platdev.c
> +++ b/drivers/cpufreq/cpufreq-dt-platdev.c
> @@ -24,6 +24,8 @@ static const struct of_device_id machines[] = {
>  	{ .compatible = "allwinner,sun8i-a83t", },
>  	{ .compatible = "allwinner,sun8i-h3", },
>  
> +	{ .compatible = "hisilicon,hi6220", },
> +
>  	{ .compatible = "fsl,imx27", },
>  	{ .compatible = "fsl,imx51", },
>  	{ .compatible = "fsl,imx53", },
> diff --git a/drivers/cpufreq/hisi-acpu-cpufreq.c b/drivers/cpufreq/hisi-acpu-cpufreq.c
> deleted file mode 100644
> index 026d5b2224de..000000000000
> --- a/drivers/cpufreq/hisi-acpu-cpufreq.c
> +++ /dev/null
> @@ -1,42 +0,0 @@
> -/*
> - * Hisilicon Platforms Using ACPU CPUFreq Support
> - *
> - * Copyright (c) 2015 Hisilicon Limited.
> - * Copyright (c) 2015 Linaro Limited.
> - *
> - * Leo Yan <leo.yan@linaro.org>
> - *
> - * This program is free software; you can redistribute it and/or modify
> - * it under the terms of the GNU General Public License version 2 as
> - * published by the Free Software Foundation.
> - *
> - * This program is distributed "as is" WITHOUT ANY WARRANTY of any
> - * kind, whether express or implied; without even the implied warranty
> - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> - * GNU General Public License for more details.
> - */
> -
> -#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> -
> -#include <linux/err.h>
> -#include <linux/init.h>
> -#include <linux/kernel.h>
> -#include <linux/module.h>
> -#include <linux/of.h>
> -#include <linux/platform_device.h>
> -
> -static int __init hisi_acpu_cpufreq_driver_init(void)
> -{
> -	struct platform_device *pdev;
> -
> -	if (!of_machine_is_compatible("hisilicon,hi6220"))
> -		return -ENODEV;
> -
> -	pdev = platform_device_register_simple("cpufreq-dt", -1, NULL, 0);
> -	return PTR_ERR_OR_ZERO(pdev);
> -}
> -module_init(hisi_acpu_cpufreq_driver_init);
> -
> -MODULE_AUTHOR("Leo Yan <leo.yan@linaro.org>");
> -MODULE_DESCRIPTION("Hisilicon acpu cpufreq driver");
> -MODULE_LICENSE("GPL v2");
> -- 
> 2.7.1.410.g6faf27b
> 

^ permalink raw reply	[flat|nested] 45+ messages in thread

end of thread, other threads:[~2016-04-23 17:14 UTC | newest]

Thread overview: 45+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-21  8:43 [PATCH 0/8] cpufreq: dt: Don't create platform-device from platform code Viresh Kumar
2016-04-21  8:43 ` [PATCH 1/8] cpufreq: berlin: Use generic platdev driver Viresh Kumar
2016-04-21  8:43   ` Viresh Kumar
2016-04-21  9:05   ` Antoine Tenart
2016-04-21  9:05     ` Antoine Tenart
2016-04-21  8:43 ` [PATCH 2/8] cpufreq: imx: " Viresh Kumar
2016-04-21  8:43   ` Viresh Kumar
2016-04-21  8:43   ` Viresh Kumar
2016-04-21  9:19   ` Lucas Stach
2016-04-21  9:19     ` Lucas Stach
2016-04-21  9:46   ` Arnd Bergmann
2016-04-21  9:46     ` Arnd Bergmann
2016-04-21  9:50     ` Viresh Kumar
2016-04-21  9:50       ` Viresh Kumar
2016-04-21 10:17       ` Arnd Bergmann
2016-04-21 10:17         ` Arnd Bergmann
2016-04-21  8:43 ` [PATCH 3/8] cpufreq: omap: " Viresh Kumar
2016-04-21  8:43   ` Viresh Kumar
2016-04-21  8:43 ` [PATCH 4/8] cpufreq: rockchip: " Viresh Kumar
2016-04-21  8:43   ` Viresh Kumar
2016-04-21  8:43 ` [PATCH 5/8] cpufreq: shmobile: " Viresh Kumar
2016-04-21  8:43   ` Viresh Kumar
2016-04-21  8:43   ` Viresh Kumar
2016-04-21 13:04   ` Geert Uytterhoeven
2016-04-21 13:04     ` Geert Uytterhoeven
2016-04-21 13:04     ` Geert Uytterhoeven
2016-04-22  3:21     ` Viresh Kumar
2016-04-22  3:21       ` Viresh Kumar
2016-04-22  3:21       ` Viresh Kumar
2016-04-22  6:41       ` Geert Uytterhoeven
2016-04-22  6:41         ` Geert Uytterhoeven
2016-04-22  6:41         ` Geert Uytterhoeven
2016-04-22  6:47         ` Viresh Kumar
2016-04-22  6:47           ` Viresh Kumar
2016-04-22  6:47           ` Viresh Kumar
2016-04-21  8:43 ` [PATCH 6/8] cpufreq: sunxi: " Viresh Kumar
2016-04-21  8:43   ` Viresh Kumar
2016-04-21  8:43   ` Viresh Kumar
2016-04-21  8:54   ` Maxime Ripard
2016-04-21  8:54     ` Maxime Ripard
2016-04-21  8:43 ` [PATCH 7/8] cpufreq: zynq: " Viresh Kumar
2016-04-21  8:43   ` Viresh Kumar
2016-04-21  8:43 ` [PATCH 8/8] cpufreq: hisilicon: " Viresh Kumar
2016-04-23 17:14   ` Leo Yan
2016-04-21  9:49 ` [PATCH 0/8] cpufreq: dt: Don't create platform-device from platform code Arnd Bergmann

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.