linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/14] ARM: shmobile: Cleanups and machine descriptor rework
@ 2013-08-09  9:47 Magnus Damm
  2013-08-09  9:47 ` [PATCH 01/14] ARM: shmobile: r8a7779: Remove ->init_machine() special case Magnus Damm
                   ` (13 more replies)
  0 siblings, 14 replies; 25+ messages in thread
From: Magnus Damm @ 2013-08-09  9:47 UTC (permalink / raw)
  To: linux-arm-kernel

ARM: shmobile: Cleanups and machine descriptor rework

[PATCH 01/14] ARM: shmobile: r8a7779: Remove ->init_machine() special case
[PATCH 02/14] ARM: shmobile: r8a7740: Remove ->init_machine() special case
[PATCH 03/14] ARM: shmobile: sh7372: Remove ->init_machine() special case 
[PATCH 04/14] ARM: shmobile: sh73a0: Remove ->init_machine() special case 
[PATCH 05/14] ARM: shmobile: Remove r8a7740_add_early_devices_dt()
[PATCH 06/14] ARM: shmobile: Remove sh73a0_init_irq_dt()
[PATCH 07/14] ARM: shmobile: Remove r8a7779 ->nr_irqs
[PATCH 08/14] ARM: shmobile: Remove sh73a0 ->nr_irqs
[PATCH 09/14] ARM: shmobile: Rename to sh7372_init_early()
[PATCH 10/14] ARM: shmobile: Rename to emev2_init_early(), use smp_set_ops()
[PATCH 11/14] ARM: shmobile: Rename to r8a7779_init_early(), use smp_set_ops()
[PATCH 12/14] ARM: shmobile: Rename to r8a7740_init_early()
[PATCH 13/14] ARM: shmobile: Rename to r8a7778_init_early()
[PATCH 14/14] ARM: shmobile: Rename to sh73a0_init_early(), use smp_set_ops()

This series contains various machine descriptor related cleanups
and removal of unused code.

Signed-off-by: Magnus Damm <damm@opensource.se>
---

 Written against renesas.git renesas-devel-20130807 and
 [PATCH 00/02] ARM: shmobile: Rename to r8a73a4/r8a7790_init_early()

 arch/arm/mach-shmobile/board-armadillo800eva-reference.c |    6 +-
 arch/arm/mach-shmobile/board-bockw-reference.c           |    2 
 arch/arm/mach-shmobile/board-bockw.c                     |    2 
 arch/arm/mach-shmobile/board-kzm9d-reference.c           |    3 -
 arch/arm/mach-shmobile/board-kzm9d.c                     |    3 -
 arch/arm/mach-shmobile/board-kzm9g-reference.c           |   13 +++-
 arch/arm/mach-shmobile/board-kzm9g.c                     |    1 
 arch/arm/mach-shmobile/board-marzen-reference.c          |   11 ++-
 arch/arm/mach-shmobile/board-marzen.c                    |    1 
 arch/arm/mach-shmobile/include/mach/emev2.h              |    2 
 arch/arm/mach-shmobile/include/mach/r8a7740.h            |    4 -
 arch/arm/mach-shmobile/include/mach/r8a7778.h            |    2 
 arch/arm/mach-shmobile/include/mach/r8a7779.h            |    4 -
 arch/arm/mach-shmobile/include/mach/sh7372.h             |    2 
 arch/arm/mach-shmobile/include/mach/sh73a0.h             |    5 -
 arch/arm/mach-shmobile/setup-emev2.c                     |    8 +-
 arch/arm/mach-shmobile/setup-r8a7740.c                   |   40 +++-----------
 arch/arm/mach-shmobile/setup-r8a7778.c                   |    4 -
 arch/arm/mach-shmobile/setup-r8a7779.c                   |   36 +++++-------
 arch/arm/mach-shmobile/setup-sh7372.c                    |   22 -------
 arch/arm/mach-shmobile/setup-sh73a0.c                    |   35 ++++--------
 21 files changed, 82 insertions(+), 124 deletions(-)

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

* [PATCH 01/14] ARM: shmobile: r8a7779: Remove ->init_machine() special case
  2013-08-09  9:47 [PATCH 00/14] ARM: shmobile: Cleanups and machine descriptor rework Magnus Damm
@ 2013-08-09  9:47 ` Magnus Damm
  2013-08-09  9:48 ` [PATCH 02/14] ARM: shmobile: r8a7740: " Magnus Damm
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 25+ messages in thread
From: Magnus Damm @ 2013-08-09  9:47 UTC (permalink / raw)
  To: linux-arm-kernel

From: Magnus Damm <damm@opensource.se>

No need to special case r8a7779 ->init_machine(),
so get rid of undesired clock setup from the
generic long term r8a7779 DT support code.

Rework the code to let r8a7779_add_dt_devices()
act like other SoCs and make the board DT
reference code setup clocks for us.

Signed-off-by: Magnus Damm <damm@opensource.se>
---

 arch/arm/mach-shmobile/board-marzen-reference.c |    7 ++++++-
 arch/arm/mach-shmobile/include/mach/r8a7779.h   |    2 +-
 arch/arm/mach-shmobile/setup-r8a7779.c          |   18 ++++++------------
 3 files changed, 13 insertions(+), 14 deletions(-)

--- 0001/arch/arm/mach-shmobile/board-marzen-reference.c
+++ work/arch/arm/mach-shmobile/board-marzen-reference.c	2013-08-08 15:02:44.000000000 +0900
@@ -19,6 +19,7 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <linux/of_platform.h>
 #include <mach/r8a7779.h>
 #include <mach/common.h>
 #include <mach/irqs.h>
@@ -27,7 +28,11 @@
 
 static void __init marzen_init(void)
 {
-	r8a7779_add_standard_devices_dt();
+	/* clocks are setup late during boot in the case of DT */
+	r8a7779_clock_init();
+
+	r8a7779_add_dt_devices();
+	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 }
 
 static const char *marzen_boards_compat_dt[] __initdata = {
--- 0001/arch/arm/mach-shmobile/include/mach/r8a7779.h
+++ work/arch/arm/mach-shmobile/include/mach/r8a7779.h	2013-08-08 14:59:50.000000000 +0900
@@ -30,7 +30,7 @@ extern void r8a7779_map_io(void);
 extern void r8a7779_earlytimer_init(void);
 extern void r8a7779_add_early_devices(void);
 extern void r8a7779_add_standard_devices(void);
-extern void r8a7779_add_standard_devices_dt(void);
+extern void r8a7779_add_dt_devices(void);
 extern void r8a7779_add_ether_device(struct sh_eth_plat_data *pdata);
 extern void r8a7779_init_late(void);
 extern void r8a7779_clock_init(void);
--- 0001/arch/arm/mach-shmobile/setup-r8a7779.c
+++ work/arch/arm/mach-shmobile/setup-r8a7779.c	2013-08-08 15:03:05.000000000 +0900
@@ -24,7 +24,6 @@
 #include <linux/irq.h>
 #include <linux/irqchip.h>
 #include <linux/irqchip/arm-gic.h>
-#include <linux/of_platform.h>
 #include <linux/platform_data/gpio-rcar.h>
 #include <linux/platform_data/irq-renesas-intc-irqpin.h>
 #include <linux/platform_device.h>
@@ -624,6 +623,12 @@ static struct platform_device *r8a7779_s
 	&sata_device,
 };
 
+void __init r8a7779_add_dt_devices(void)
+{
+	platform_add_devices(r8a7779_devices_dt,
+			     ARRAY_SIZE(r8a7779_devices_dt));
+}
+
 void __init r8a7779_add_standard_devices(void)
 {
 #ifdef CONFIG_CACHE_L2X0
@@ -726,16 +731,6 @@ void __init r8a7779_init_delay(void)
 	shmobile_setup_delay(1000, 2, 4); /* Cortex-A9 @ 1000MHz */
 }
 
-void __init r8a7779_add_standard_devices_dt(void)
-{
-	/* clocks are setup late during boot in the case of DT */
-	r8a7779_clock_init();
-
-	platform_add_devices(r8a7779_devices_dt,
-			     ARRAY_SIZE(r8a7779_devices_dt));
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
-}
-
 static const char *r8a7779_compat_dt[] __initdata = {
 	"renesas,r8a7779",
 	NULL,
@@ -746,7 +741,6 @@ DT_MACHINE_START(R8A7779_DT, "Generic R8
 	.init_early	= r8a7779_init_delay,
 	.nr_irqs	= NR_IRQS_LEGACY,
 	.init_irq	= r8a7779_init_irq_dt,
-	.init_machine	= r8a7779_add_standard_devices_dt,
 	.init_late	= r8a7779_init_late,
 	.dt_compat	= r8a7779_compat_dt,
 MACHINE_END

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

* [PATCH 02/14] ARM: shmobile: r8a7740: Remove ->init_machine() special case
  2013-08-09  9:47 [PATCH 00/14] ARM: shmobile: Cleanups and machine descriptor rework Magnus Damm
  2013-08-09  9:47 ` [PATCH 01/14] ARM: shmobile: r8a7779: Remove ->init_machine() special case Magnus Damm
@ 2013-08-09  9:48 ` Magnus Damm
  2013-08-09  9:48 ` [PATCH 03/14] ARM: shmobile: sh7372: " Magnus Damm
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 25+ messages in thread
From: Magnus Damm @ 2013-08-09  9:48 UTC (permalink / raw)
  To: linux-arm-kernel

From: Magnus Damm <damm@opensource.se>

No need to special case r8a7740 ->init_machine(),
so get rid of undesired clock setup from the
generic long term r8a7740 DT support code.

Rework the code to let r8a7740_add_dt_devices()
act like other SoCs and make the board DT
reference code setup clocks for us.

Signed-off-by: Magnus Damm <damm@opensource.se>
---

 arch/arm/mach-shmobile/board-armadillo800eva-reference.c |    4 +++-
 arch/arm/mach-shmobile/include/mach/r8a7740.h            |    2 +-
 arch/arm/mach-shmobile/setup-r8a7740.c                   |   11 +----------
 3 files changed, 5 insertions(+), 12 deletions(-)

--- 0001/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
+++ work/arch/arm/mach-shmobile/board-armadillo800eva-reference.c	2013-08-08 15:37:27.000000000 +0900
@@ -24,6 +24,7 @@
 #include <linux/kernel.h>
 #include <linux/gpio.h>
 #include <linux/io.h>
+#include <linux/of_platform.h>
 #include <mach/common.h>
 #include <mach/r8a7740.h>
 #include <asm/mach/arch.h>
@@ -168,7 +169,8 @@ static void __init eva_init(void)
 	l2x0_init(IOMEM(0xf0002000), 0x40440000, 0x82000fff);
 #endif
 
-	r8a7740_add_standard_devices_dt();
+	r8a7740_add_dt_devices();
+	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 
 	r8a7740_pm_init();
 }
--- 0001/arch/arm/mach-shmobile/include/mach/r8a7740.h
+++ work/arch/arm/mach-shmobile/include/mach/r8a7740.h	2013-08-08 15:33:40.000000000 +0900
@@ -52,7 +52,7 @@ extern void r8a7740_init_irq_of(void);
 extern void r8a7740_map_io(void);
 extern void r8a7740_add_early_devices(void);
 extern void r8a7740_add_standard_devices(void);
-extern void r8a7740_add_standard_devices_dt(void);
+extern void r8a7740_add_dt_devices(void);
 extern void r8a7740_clock_init(u8 md_ck);
 extern void r8a7740_pinmux_init(void);
 extern void r8a7740_pm_init(void);
--- 0001/arch/arm/mach-shmobile/setup-r8a7740.c
+++ work/arch/arm/mach-shmobile/setup-r8a7740.c	2013-08-08 15:37:11.000000000 +0900
@@ -26,7 +26,6 @@
 #include <linux/irqchip/arm-gic.h>
 #include <linux/platform_data/irq-renesas-intc-irqpin.h>
 #include <linux/platform_device.h>
-#include <linux/of_platform.h>
 #include <linux/serial_sci.h>
 #include <linux/sh_dma.h>
 #include <linux/sh_timer.h>
@@ -1009,11 +1008,10 @@ void __init r8a7740_add_early_devices_dt
 	shmobile_setup_console();
 }
 
-void __init r8a7740_add_standard_devices_dt(void)
+void __init r8a7740_add_dt_devices(void)
 {
 	platform_add_devices(r8a7740_devices_dt,
 			    ARRAY_SIZE(r8a7740_devices_dt));
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 }
 
 void __init r8a7740_init_delay(void)
@@ -1051,12 +1049,6 @@ void __init r8a7740_init_irq_of(void)
 	iounmap(pfc_inta_ctrl);
 }
 
-static void __init r8a7740_generic_init(void)
-{
-	r8a7740_clock_init(0);
-	r8a7740_add_standard_devices_dt();
-}
-
 static const char *r8a7740_boards_compat_dt[] __initdata = {
 	"renesas,r8a7740",
 	NULL,
@@ -1066,7 +1058,6 @@ DT_MACHINE_START(R8A7740_DT, "Generic R8
 	.map_io		= r8a7740_map_io,
 	.init_early	= r8a7740_init_delay,
 	.init_irq	= r8a7740_init_irq_of,
-	.init_machine	= r8a7740_generic_init,
 	.dt_compat	= r8a7740_boards_compat_dt,
 MACHINE_END
 

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

* [PATCH 03/14] ARM: shmobile: sh7372: Remove ->init_machine() special case
  2013-08-09  9:47 [PATCH 00/14] ARM: shmobile: Cleanups and machine descriptor rework Magnus Damm
  2013-08-09  9:47 ` [PATCH 01/14] ARM: shmobile: r8a7779: Remove ->init_machine() special case Magnus Damm
  2013-08-09  9:48 ` [PATCH 02/14] ARM: shmobile: r8a7740: " Magnus Damm
@ 2013-08-09  9:48 ` Magnus Damm
  2013-08-09  9:48 ` [PATCH 04/14] ARM: shmobile: sh73a0: " Magnus Damm
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 25+ messages in thread
From: Magnus Damm @ 2013-08-09  9:48 UTC (permalink / raw)
  To: linux-arm-kernel

From: Magnus Damm <damm@opensource.se>

No need to special case sh7372 ->init_machine(),
so get rid of undesired clock setup from the
generic long term sh7372 DT support code.

Remove sh7372_add_standard_devices_dt() since
we have no DT reference implementation for sh7372.

Signed-off-by: Magnus Damm <damm@opensource.se>
---

 arch/arm/mach-shmobile/include/mach/sh7372.h |    1 -
 arch/arm/mach-shmobile/setup-sh7372.c        |   12 ------------
 2 files changed, 13 deletions(-)

--- 0001/arch/arm/mach-shmobile/include/mach/sh7372.h
+++ work/arch/arm/mach-shmobile/include/mach/sh7372.h	2013-08-08 15:45:46.000000000 +0900
@@ -64,7 +64,6 @@ extern void sh7372_earlytimer_init(void)
 extern void sh7372_add_early_devices(void);
 extern void sh7372_add_standard_devices(void);
 extern void sh7372_add_early_devices_dt(void);
-extern void sh7372_add_standard_devices_dt(void);
 extern void sh7372_clock_init(void);
 extern void sh7372_pinmux_init(void);
 extern void sh7372_pm_init(void);
--- 0001/arch/arm/mach-shmobile/setup-sh7372.c
+++ work/arch/arm/mach-shmobile/setup-sh7372.c	2013-08-08 15:44:20.000000000 +0900
@@ -1146,17 +1146,6 @@ void __init sh7372_add_early_devices_dt(
 	shmobile_setup_console();
 }
 
-void __init sh7372_add_standard_devices_dt(void)
-{
-	/* clocks are setup late during boot in the case of DT */
-	sh7372_clock_init();
-
-	platform_add_devices(sh7372_early_devices,
-			    ARRAY_SIZE(sh7372_early_devices));
-
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
-}
-
 static const char *sh7372_boards_compat_dt[] __initdata = {
 	"renesas,sh7372",
 	NULL,
@@ -1168,7 +1157,6 @@ DT_MACHINE_START(SH7372_DT, "Generic SH7
 	.nr_irqs	= NR_IRQS_LEGACY,
 	.init_irq	= sh7372_init_irq,
 	.handle_irq	= shmobile_handle_irq_intc,
-	.init_machine	= sh7372_add_standard_devices_dt,
 	.dt_compat	= sh7372_boards_compat_dt,
 MACHINE_END
 

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

* [PATCH 04/14] ARM: shmobile: sh73a0: Remove ->init_machine() special case
  2013-08-09  9:47 [PATCH 00/14] ARM: shmobile: Cleanups and machine descriptor rework Magnus Damm
                   ` (2 preceding siblings ...)
  2013-08-09  9:48 ` [PATCH 03/14] ARM: shmobile: sh7372: " Magnus Damm
@ 2013-08-09  9:48 ` Magnus Damm
  2013-08-09 10:47   ` Laurent Pinchart
  2013-08-09  9:48 ` [PATCH 05/14] ARM: shmobile: Remove r8a7740_add_early_devices_dt() Magnus Damm
                   ` (9 subsequent siblings)
  13 siblings, 1 reply; 25+ messages in thread
From: Magnus Damm @ 2013-08-09  9:48 UTC (permalink / raw)
  To: linux-arm-kernel

From: Magnus Damm <damm@opensource.se>

No need to special case sh73a0 ->init_machine(),
so get rid of undesired cpufreq platform device
from the generic long term sh73a0 DT support code.

For short term support on KZM9D the DT reference
implementation now adds a "cpufreq-cpu0" platform
device so that can be used for development.

Signed-off-by: Magnus Damm <damm@opensource.se>
---

 arch/arm/mach-shmobile/board-kzm9g-reference.c |    9 ++++++++-
 arch/arm/mach-shmobile/include/mach/sh73a0.h   |    2 +-
 arch/arm/mach-shmobile/setup-sh73a0.c          |   23 ++++++-----------------
 3 files changed, 15 insertions(+), 19 deletions(-)

--- 0001/arch/arm/mach-shmobile/board-kzm9g-reference.c
+++ work/arch/arm/mach-shmobile/board-kzm9g-reference.c	2013-08-08 15:56:28.000000000 +0900
@@ -33,7 +33,14 @@
 
 static void __init kzm_init(void)
 {
-	sh73a0_add_standard_devices_dt();
+	/* clocks are setup late during boot in the case of DT */
+	sh73a0_clock_init();
+
+	sh73a0_add_dt_devices();
+
+	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+
+	platform_device_register_simple("cpufreq-cpu0", -1, NULL, 0);
 
 #ifdef CONFIG_CACHE_L2X0
 	/* Early BRESP enable, Shared attribute override enable, 64K*8way */
--- 0001/arch/arm/mach-shmobile/include/mach/sh73a0.h
+++ work/arch/arm/mach-shmobile/include/mach/sh73a0.h	2013-08-08 15:54:26.000000000 +0900
@@ -78,7 +78,7 @@ extern void sh73a0_map_io(void);
 extern void sh73a0_earlytimer_init(void);
 extern void sh73a0_add_early_devices(void);
 extern void sh73a0_add_standard_devices(void);
-extern void sh73a0_add_standard_devices_dt(void);
+extern void sh73a0_add_dt_devices(void);
 extern void sh73a0_clock_init(void);
 extern void sh73a0_pinmux_init(void);
 extern void sh73a0_pm_init(void);
--- 0001/arch/arm/mach-shmobile/setup-sh73a0.c
+++ work/arch/arm/mach-shmobile/setup-sh73a0.c	2013-08-08 15:57:42.000000000 +0900
@@ -23,7 +23,6 @@
 #include <linux/interrupt.h>
 #include <linux/irq.h>
 #include <linux/platform_device.h>
-#include <linux/of_platform.h>
 #include <linux/delay.h>
 #include <linux/input.h>
 #include <linux/io.h>
@@ -901,6 +900,12 @@ static struct platform_device *sh73a0_la
 
 #define SRCR2          IOMEM(0xe61580b0)
 
+void __init sh73a0_add_dt_devices(void)
+{
+	platform_add_devices(sh73a0_devices_dt,
+			     ARRAY_SIZE(sh73a0_devices_dt));
+}
+
 void __init sh73a0_add_standard_devices(void)
 {
 	/* Clear software reset bit on SY-DMAC module */
@@ -943,21 +948,6 @@ void __init sh73a0_add_early_devices(voi
 
 #ifdef CONFIG_USE_OF
 
-void __init sh73a0_add_standard_devices_dt(void)
-{
-	struct platform_device_info devinfo = { .name = "cpufreq-cpu0", .id = -1, };
-
-	/* clocks are setup late during boot in the case of DT */
-	sh73a0_clock_init();
-
-	platform_add_devices(sh73a0_devices_dt,
-			     ARRAY_SIZE(sh73a0_devices_dt));
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
-
-	/* Instantiate cpufreq-cpu0 */
-	platform_device_register_full(&devinfo);
-}
-
 static const char *sh73a0_boards_compat_dt[] __initdata = {
 	"renesas,sh73a0",
 	NULL,
@@ -968,7 +958,6 @@ DT_MACHINE_START(SH73A0_DT, "Generic SH7
 	.map_io		= sh73a0_map_io,
 	.init_early	= sh73a0_init_delay,
 	.nr_irqs	= NR_IRQS_LEGACY,
-	.init_machine	= sh73a0_add_standard_devices_dt,
 	.dt_compat	= sh73a0_boards_compat_dt,
 MACHINE_END
 #endif /* CONFIG_USE_OF */

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

* [PATCH 05/14] ARM: shmobile: Remove r8a7740_add_early_devices_dt()
  2013-08-09  9:47 [PATCH 00/14] ARM: shmobile: Cleanups and machine descriptor rework Magnus Damm
                   ` (3 preceding siblings ...)
  2013-08-09  9:48 ` [PATCH 04/14] ARM: shmobile: sh73a0: " Magnus Damm
@ 2013-08-09  9:48 ` Magnus Damm
  2013-08-09  9:48 ` [PATCH 06/14] ARM: shmobile: Remove sh73a0_init_irq_dt() Magnus Damm
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 25+ messages in thread
From: Magnus Damm @ 2013-08-09  9:48 UTC (permalink / raw)
  To: linux-arm-kernel

From: Magnus Damm <damm@opensource.se>

Remove the unused r8a7740_add_early_devices_dt() function.

Signed-off-by: Magnus Damm <damm@opensource.se>
---

 arch/arm/mach-shmobile/setup-r8a7740.c |   15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)

--- 0005/arch/arm/mach-shmobile/setup-r8a7740.c
+++ work/arch/arm/mach-shmobile/setup-r8a7740.c	2013-08-08 15:40:07.000000000 +0900
@@ -995,25 +995,14 @@ void __init r8a7740_add_early_devices(vo
 	shmobile_setup_console();
 }
 
-#ifdef CONFIG_USE_OF
-
-void __init r8a7740_add_early_devices_dt(void)
-{
-	shmobile_setup_delay(800, 1, 3); /* Cortex-A9 @ 800MHz */
-
-	early_platform_add_devices(r8a7740_early_devices,
-				   ARRAY_SIZE(r8a7740_early_devices));
-
-	/* setup early console here as well */
-	shmobile_setup_console();
-}
-
 void __init r8a7740_add_dt_devices(void)
 {
 	platform_add_devices(r8a7740_devices_dt,
 			    ARRAY_SIZE(r8a7740_devices_dt));
 }
 
+#ifdef CONFIG_USE_OF
+
 void __init r8a7740_init_delay(void)
 {
 	shmobile_setup_delay(800, 1, 3); /* Cortex-A9 @ 800MHz */

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

* [PATCH 06/14] ARM: shmobile: Remove sh73a0_init_irq_dt()
  2013-08-09  9:47 [PATCH 00/14] ARM: shmobile: Cleanups and machine descriptor rework Magnus Damm
                   ` (4 preceding siblings ...)
  2013-08-09  9:48 ` [PATCH 05/14] ARM: shmobile: Remove r8a7740_add_early_devices_dt() Magnus Damm
@ 2013-08-09  9:48 ` Magnus Damm
  2013-08-09  9:49 ` [PATCH 07/14] ARM: shmobile: Remove r8a7779 ->nr_irqs Magnus Damm
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 25+ messages in thread
From: Magnus Damm @ 2013-08-09  9:48 UTC (permalink / raw)
  To: linux-arm-kernel

From: Magnus Damm <damm@opensource.se>

Remove left over function prototype sh73a0_init_irq_dt().

Signed-off-by: Magnus Damm <damm@opensource.se>
---

 arch/arm/mach-shmobile/include/mach/sh73a0.h |    1 -
 1 file changed, 1 deletion(-)

--- 0009/arch/arm/mach-shmobile/include/mach/sh73a0.h
+++ work/arch/arm/mach-shmobile/include/mach/sh73a0.h	2013-08-08 16:04:29.000000000 +0900
@@ -73,7 +73,6 @@ enum {
 
 extern void sh73a0_init_delay(void);
 extern void sh73a0_init_irq(void);
-extern void sh73a0_init_irq_dt(void);
 extern void sh73a0_map_io(void);
 extern void sh73a0_earlytimer_init(void);
 extern void sh73a0_add_early_devices(void);

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

* [PATCH 07/14] ARM: shmobile: Remove r8a7779 ->nr_irqs
  2013-08-09  9:47 [PATCH 00/14] ARM: shmobile: Cleanups and machine descriptor rework Magnus Damm
                   ` (5 preceding siblings ...)
  2013-08-09  9:48 ` [PATCH 06/14] ARM: shmobile: Remove sh73a0_init_irq_dt() Magnus Damm
@ 2013-08-09  9:49 ` Magnus Damm
  2013-08-09  9:49 ` [PATCH 08/14] ARM: shmobile: Remove sh73a0 ->nr_irqs Magnus Damm
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 25+ messages in thread
From: Magnus Damm @ 2013-08-09  9:49 UTC (permalink / raw)
  To: linux-arm-kernel

From: Magnus Damm <damm@opensource.se>

Remove .nr_irqs for r8a7779 DT cases.

Signed-off-by: Magnus Damm <damm@opensource.se>
---

 arch/arm/mach-shmobile/board-marzen-reference.c |    1 -
 arch/arm/mach-shmobile/setup-r8a7779.c          |    1 -
 2 files changed, 2 deletions(-)

--- 0004/arch/arm/mach-shmobile/board-marzen-reference.c
+++ work/arch/arm/mach-shmobile/board-marzen-reference.c	2013-08-08 16:13:35.000000000 +0900
@@ -44,7 +44,6 @@ DT_MACHINE_START(MARZEN, "marzen")
 	.smp		= smp_ops(r8a7779_smp_ops),
 	.map_io		= r8a7779_map_io,
 	.init_early	= r8a7779_init_delay,
-	.nr_irqs	= NR_IRQS_LEGACY,
 	.init_irq	= r8a7779_init_irq_dt,
 	.init_machine	= marzen_init,
 	.dt_compat	= marzen_boards_compat_dt,
--- 0004/arch/arm/mach-shmobile/setup-r8a7779.c
+++ work/arch/arm/mach-shmobile/setup-r8a7779.c	2013-08-08 16:13:15.000000000 +0900
@@ -739,7 +739,6 @@ static const char *r8a7779_compat_dt[] _
 DT_MACHINE_START(R8A7779_DT, "Generic R8A7779 (Flattened Device Tree)")
 	.map_io		= r8a7779_map_io,
 	.init_early	= r8a7779_init_delay,
-	.nr_irqs	= NR_IRQS_LEGACY,
 	.init_irq	= r8a7779_init_irq_dt,
 	.init_late	= r8a7779_init_late,
 	.dt_compat	= r8a7779_compat_dt,

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

* [PATCH 08/14] ARM: shmobile: Remove sh73a0 ->nr_irqs
  2013-08-09  9:47 [PATCH 00/14] ARM: shmobile: Cleanups and machine descriptor rework Magnus Damm
                   ` (6 preceding siblings ...)
  2013-08-09  9:49 ` [PATCH 07/14] ARM: shmobile: Remove r8a7779 ->nr_irqs Magnus Damm
@ 2013-08-09  9:49 ` Magnus Damm
  2013-08-09  9:49 ` [PATCH 09/14] ARM: shmobile: Rename to sh7372_init_early() Magnus Damm
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 25+ messages in thread
From: Magnus Damm @ 2013-08-09  9:49 UTC (permalink / raw)
  To: linux-arm-kernel

From: Magnus Damm <damm@opensource.se>

Remove .nr_irqs for sh73a0 DT cases.

Signed-off-by: Magnus Damm <damm@opensource.se>
---

 arch/arm/mach-shmobile/board-kzm9g-reference.c |    1 -
 arch/arm/mach-shmobile/setup-sh73a0.c          |    1 -
 2 files changed, 2 deletions(-)

--- 0009/arch/arm/mach-shmobile/board-kzm9g-reference.c
+++ work/arch/arm/mach-shmobile/board-kzm9g-reference.c	2013-08-08 16:09:22.000000000 +0900
@@ -57,7 +57,6 @@ DT_MACHINE_START(KZM9G_DT, "kzm9g-refere
 	.smp		= smp_ops(sh73a0_smp_ops),
 	.map_io		= sh73a0_map_io,
 	.init_early	= sh73a0_init_delay,
-	.nr_irqs	= NR_IRQS_LEGACY,
 	.init_machine	= kzm_init,
 	.dt_compat	= kzm9g_boards_compat_dt,
 MACHINE_END
--- 0009/arch/arm/mach-shmobile/setup-sh73a0.c
+++ work/arch/arm/mach-shmobile/setup-sh73a0.c	2013-08-08 16:09:35.000000000 +0900
@@ -957,7 +957,6 @@ DT_MACHINE_START(SH73A0_DT, "Generic SH7
 	.smp		= smp_ops(sh73a0_smp_ops),
 	.map_io		= sh73a0_map_io,
 	.init_early	= sh73a0_init_delay,
-	.nr_irqs	= NR_IRQS_LEGACY,
 	.dt_compat	= sh73a0_boards_compat_dt,
 MACHINE_END
 #endif /* CONFIG_USE_OF */

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

* [PATCH 09/14] ARM: shmobile: Rename to sh7372_init_early()
  2013-08-09  9:47 [PATCH 00/14] ARM: shmobile: Cleanups and machine descriptor rework Magnus Damm
                   ` (7 preceding siblings ...)
  2013-08-09  9:49 ` [PATCH 08/14] ARM: shmobile: Remove sh73a0 ->nr_irqs Magnus Damm
@ 2013-08-09  9:49 ` Magnus Damm
  2013-08-09 10:40   ` Laurent Pinchart
  2013-08-09  9:49 ` [PATCH 10/14] ARM: shmobile: Rename to emev2_init_early(), use smp_set_ops() Magnus Damm
                   ` (4 subsequent siblings)
  13 siblings, 1 reply; 25+ messages in thread
From: Magnus Damm @ 2013-08-09  9:49 UTC (permalink / raw)
  To: linux-arm-kernel

From: Magnus Damm <damm@opensource.se>

Rename sh7372_add_early_device_dt() into sh7372_init_early()
and make it static since we have no sh7372 DT reference board
code. Also, in case of DT we do not use any early console or
early timers, so get rid of early platform stuff and early
console for the DT case.

Signed-off-by: Magnus Damm <damm@opensource.se>
---

 arch/arm/mach-shmobile/include/mach/sh7372.h |    1 -
 arch/arm/mach-shmobile/setup-sh7372.c        |   10 ++--------
 2 files changed, 2 insertions(+), 9 deletions(-)

--- 0007/arch/arm/mach-shmobile/include/mach/sh7372.h
+++ work/arch/arm/mach-shmobile/include/mach/sh7372.h	2013-08-08 15:46:38.000000000 +0900
@@ -63,7 +63,6 @@ extern void sh7372_map_io(void);
 extern void sh7372_earlytimer_init(void);
 extern void sh7372_add_early_devices(void);
 extern void sh7372_add_standard_devices(void);
-extern void sh7372_add_early_devices_dt(void);
 extern void sh7372_clock_init(void);
 extern void sh7372_pinmux_init(void);
 extern void sh7372_pm_init(void);
--- 0007/arch/arm/mach-shmobile/setup-sh7372.c
+++ work/arch/arm/mach-shmobile/setup-sh7372.c	2013-08-08 15:48:51.000000000 +0900
@@ -1135,15 +1135,9 @@ void __init sh7372_add_early_devices(voi
 
 #ifdef CONFIG_USE_OF
 
-void __init sh7372_add_early_devices_dt(void)
+static void __init sh7372_init_early(void)
 {
 	shmobile_setup_delay(800, 1, 3); /* Cortex-A8 @ 800MHz */
-
-	early_platform_add_devices(sh7372_early_devices,
-				   ARRAY_SIZE(sh7372_early_devices));
-
-	/* setup early console here as well */
-	shmobile_setup_console();
 }
 
 static const char *sh7372_boards_compat_dt[] __initdata = {
@@ -1153,7 +1147,7 @@ static const char *sh7372_boards_compat_
 
 DT_MACHINE_START(SH7372_DT, "Generic SH7372 (Flattened Device Tree)")
 	.map_io		= sh7372_map_io,
-	.init_early	= sh7372_add_early_devices_dt,
+	.init_early	= sh7372_init_early,
 	.nr_irqs	= NR_IRQS_LEGACY,
 	.init_irq	= sh7372_init_irq,
 	.handle_irq	= shmobile_handle_irq_intc,

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

* [PATCH 10/14] ARM: shmobile: Rename to emev2_init_early(), use smp_set_ops()
  2013-08-09  9:47 [PATCH 00/14] ARM: shmobile: Cleanups and machine descriptor rework Magnus Damm
                   ` (8 preceding siblings ...)
  2013-08-09  9:49 ` [PATCH 09/14] ARM: shmobile: Rename to sh7372_init_early() Magnus Damm
@ 2013-08-09  9:49 ` Magnus Damm
  2013-08-09 10:41   ` Laurent Pinchart
  2013-08-09  9:49 ` [PATCH 11/14] ARM: shmobile: Rename to r8a7779_init_early(), " Magnus Damm
                   ` (3 subsequent siblings)
  13 siblings, 1 reply; 25+ messages in thread
From: Magnus Damm @ 2013-08-09  9:49 UTC (permalink / raw)
  To: linux-arm-kernel

From: Magnus Damm <damm@opensource.se>

Rename emev2_init_delay() into emev2_init_early()
to make the function name show that more than just
delay setup will happen.

Also, instead of specifying the smp ops in DT_MACHINE
convert the EMEV2 SoC code to install the smp ops
from emev2_init_early().

Signed-off-by: Magnus Damm <damm@opensource.se>
---

 arch/arm/mach-shmobile/board-kzm9d-reference.c |    3 +--
 arch/arm/mach-shmobile/board-kzm9d.c           |    3 +--
 arch/arm/mach-shmobile/include/mach/emev2.h    |    2 +-
 arch/arm/mach-shmobile/setup-emev2.c           |    8 +++++---
 4 files changed, 8 insertions(+), 8 deletions(-)

--- 0001/arch/arm/mach-shmobile/board-kzm9d-reference.c
+++ work/arch/arm/mach-shmobile/board-kzm9d-reference.c	2013-08-08 16:18:34.000000000 +0900
@@ -38,9 +38,8 @@ static const char *kzm9d_boards_compat_d
 };
 
 DT_MACHINE_START(KZM9D_DT, "kzm9d")
-	.smp		= smp_ops(emev2_smp_ops),
 	.map_io		= emev2_map_io,
-	.init_early	= emev2_init_delay,
+	.init_early	= emev2_init_early,
 	.init_machine	= kzm9d_add_standard_devices,
 	.init_late	= shmobile_init_late,
 	.dt_compat	= kzm9d_boards_compat_dt,
--- 0001/arch/arm/mach-shmobile/board-kzm9d.c
+++ work/arch/arm/mach-shmobile/board-kzm9d.c	2013-08-08 16:18:17.000000000 +0900
@@ -83,9 +83,8 @@ static const char *kzm9d_boards_compat_d
 };
 
 DT_MACHINE_START(KZM9D_DT, "kzm9d")
-	.smp		= smp_ops(emev2_smp_ops),
 	.map_io		= emev2_map_io,
-	.init_early	= emev2_init_delay,
+	.init_early	= emev2_init_early,
 	.init_machine	= kzm9d_add_standard_devices,
 	.init_late	= shmobile_init_late,
 	.dt_compat	= kzm9d_boards_compat_dt,
--- 0001/arch/arm/mach-shmobile/include/mach/emev2.h
+++ work/arch/arm/mach-shmobile/include/mach/emev2.h	2013-08-08 16:17:57.000000000 +0900
@@ -2,7 +2,7 @@
 #define __ASM_EMEV2_H__
 
 extern void emev2_map_io(void);
-extern void emev2_init_delay(void);
+extern void emev2_init_early(void);
 extern void emev2_add_standard_devices(void);
 extern void emev2_clock_init(void);
 
--- 0001/arch/arm/mach-shmobile/setup-emev2.c
+++ work/arch/arm/mach-shmobile/setup-emev2.c	2013-08-08 16:17:47.000000000 +0900
@@ -190,9 +190,12 @@ void __init emev2_add_standard_devices(v
 	emev2_register_pmu();
 }
 
-void __init emev2_init_delay(void)
+void __init emev2_init_early(void)
 {
 	shmobile_setup_delay(533, 1, 3); /* Cortex-A9 @ 533MHz */
+#ifdef CONFIG_SMP
+	smp_set_ops(&emev2_smp_ops);
+#endif
 }
 
 #ifdef CONFIG_USE_OF
@@ -203,9 +206,8 @@ static const char *emev2_boards_compat_d
 };
 
 DT_MACHINE_START(EMEV2_DT, "Generic Emma Mobile EV2 (Flattened Device Tree)")
-	.smp		= smp_ops(emev2_smp_ops),
 	.map_io		= emev2_map_io,
-	.init_early	= emev2_init_delay,
+	.init_early	= emev2_init_early,
 	.dt_compat	= emev2_boards_compat_dt,
 MACHINE_END
 

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

* [PATCH 11/14] ARM: shmobile: Rename to r8a7779_init_early(), use smp_set_ops()
  2013-08-09  9:47 [PATCH 00/14] ARM: shmobile: Cleanups and machine descriptor rework Magnus Damm
                   ` (9 preceding siblings ...)
  2013-08-09  9:49 ` [PATCH 10/14] ARM: shmobile: Rename to emev2_init_early(), use smp_set_ops() Magnus Damm
@ 2013-08-09  9:49 ` Magnus Damm
  2013-08-09  9:49 ` [PATCH 12/14] ARM: shmobile: Rename to r8a7740_init_early() Magnus Damm
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 25+ messages in thread
From: Magnus Damm @ 2013-08-09  9:49 UTC (permalink / raw)
  To: linux-arm-kernel

From: Magnus Damm <damm@opensource.se>

Rename r8a7779_init_delay() into r8a7779_init_early()
to make the function name show that more than just
delay setup will happen.

Also, instead of specifying the smp ops in DT_MACHINE
convert the r8a7779 SoC code to install the smp ops
from r8a7779_init_early().

The r8a7779_add_early_devices() function also gets
updated to call r8a7779_init_early(). This way the
smp ops will be installed in both DT and C cases.

Signed-off-by: Magnus Damm <damm@opensource.se>
---

 arch/arm/mach-shmobile/board-marzen-reference.c |    3 +--
 arch/arm/mach-shmobile/board-marzen.c           |    1 -
 arch/arm/mach-shmobile/include/mach/r8a7779.h   |    2 +-
 arch/arm/mach-shmobile/setup-r8a7779.c          |   17 +++++++++++------
 4 files changed, 13 insertions(+), 10 deletions(-)

--- 0012/arch/arm/mach-shmobile/board-marzen-reference.c
+++ work/arch/arm/mach-shmobile/board-marzen-reference.c	2013-08-08 16:25:43.000000000 +0900
@@ -41,9 +41,8 @@ static const char *marzen_boards_compat_
 };
 
 DT_MACHINE_START(MARZEN, "marzen")
-	.smp		= smp_ops(r8a7779_smp_ops),
 	.map_io		= r8a7779_map_io,
-	.init_early	= r8a7779_init_delay,
+	.init_early	= r8a7779_init_early,
 	.init_irq	= r8a7779_init_irq_dt,
 	.init_machine	= marzen_init,
 	.dt_compat	= marzen_boards_compat_dt,
--- 0001/arch/arm/mach-shmobile/board-marzen.c
+++ work/arch/arm/mach-shmobile/board-marzen.c	2013-08-08 16:25:53.000000000 +0900
@@ -263,7 +263,6 @@ static const char *marzen_boards_compat_
 };
 
 DT_MACHINE_START(MARZEN, "marzen")
-	.smp		= smp_ops(r8a7779_smp_ops),
 	.map_io		= r8a7779_map_io,
 	.init_early	= r8a7779_add_early_devices,
 	.init_irq	= r8a7779_init_irq_dt,
--- 0004/arch/arm/mach-shmobile/include/mach/r8a7779.h
+++ work/arch/arm/mach-shmobile/include/mach/r8a7779.h	2013-08-08 16:26:58.000000000 +0900
@@ -23,7 +23,7 @@ static inline struct r8a7779_pm_ch *to_r
 	return &container_of(d, struct r8a7779_pm_domain, genpd)->ch;
 }
 
-extern void r8a7779_init_delay(void);
+extern void r8a7779_init_early(void);
 extern void r8a7779_init_irq_extpin(int irlm);
 extern void r8a7779_init_irq_dt(void);
 extern void r8a7779_map_io(void);
--- 0012/arch/arm/mach-shmobile/setup-r8a7779.c
+++ work/arch/arm/mach-shmobile/setup-r8a7779.c	2013-08-08 16:29:06.000000000 +0900
@@ -663,8 +663,18 @@ void __init r8a7779_earlytimer_init(void
 	r8a7779_register_twd();
 }
 
+void __init r8a7779_init_early(void)
+{
+	shmobile_setup_delay(1000, 2, 4); /* Cortex-A9 @ 1000MHz */
+#ifdef CONFIG_SMP
+	smp_set_ops(&r8a7779_smp_ops);
+#endif
+}
+
 void __init r8a7779_add_early_devices(void)
 {
+	r8a7779_init_early();
+
 	early_platform_add_devices(r8a7779_devices_dt,
 				   ARRAY_SIZE(r8a7779_devices_dt));
 
@@ -726,11 +736,6 @@ void __init r8a7779_init_irq_dt(void)
 	__raw_writel(0x003fee3f, INT2SMSKCR4);
 }
 
-void __init r8a7779_init_delay(void)
-{
-	shmobile_setup_delay(1000, 2, 4); /* Cortex-A9 @ 1000MHz */
-}
-
 static const char *r8a7779_compat_dt[] __initdata = {
 	"renesas,r8a7779",
 	NULL,
@@ -738,7 +743,7 @@ static const char *r8a7779_compat_dt[] _
 
 DT_MACHINE_START(R8A7779_DT, "Generic R8A7779 (Flattened Device Tree)")
 	.map_io		= r8a7779_map_io,
-	.init_early	= r8a7779_init_delay,
+	.init_early	= r8a7779_init_early,
 	.init_irq	= r8a7779_init_irq_dt,
 	.init_late	= r8a7779_init_late,
 	.dt_compat	= r8a7779_compat_dt,

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

* [PATCH 12/14] ARM: shmobile: Rename to r8a7740_init_early()
  2013-08-09  9:47 [PATCH 00/14] ARM: shmobile: Cleanups and machine descriptor rework Magnus Damm
                   ` (10 preceding siblings ...)
  2013-08-09  9:49 ` [PATCH 11/14] ARM: shmobile: Rename to r8a7779_init_early(), " Magnus Damm
@ 2013-08-09  9:49 ` Magnus Damm
  2013-08-09  9:50 ` [PATCH 13/14] ARM: shmobile: Rename to r8a7778_init_early() Magnus Damm
  2013-08-09  9:50 ` [PATCH 14/14] ARM: shmobile: Rename to sh73a0_init_early(), use smp_set_ops() Magnus Damm
  13 siblings, 0 replies; 25+ messages in thread
From: Magnus Damm @ 2013-08-09  9:49 UTC (permalink / raw)
  To: linux-arm-kernel

From: Magnus Damm <damm@opensource.se>

Rename r8a7740_init_delay() into r8a7740_init_early()
to make the function name show that more than just
delay setup may happen in the future.

Also, make sure shmobile_setup_delay() gets executed for both
DT and C board code by updating r8a7740_add_early_devices() to
call r8a7740_init_early().

Signed-off-by: Magnus Damm <damm@opensource.se>
---

 arch/arm/mach-shmobile/board-armadillo800eva-reference.c |    2 +-
 arch/arm/mach-shmobile/include/mach/r8a7740.h            |    2 +-
 arch/arm/mach-shmobile/setup-r8a7740.c                   |   14 ++++++++------
 3 files changed, 10 insertions(+), 8 deletions(-)

--- 0005/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
+++ work/arch/arm/mach-shmobile/board-armadillo800eva-reference.c	2013-08-08 16:37:19.000000000 +0900
@@ -189,7 +189,7 @@ static const char *eva_boards_compat_dt[
 
 DT_MACHINE_START(ARMADILLO800EVA_DT, "armadillo800eva-reference")
 	.map_io		= r8a7740_map_io,
-	.init_early	= r8a7740_init_delay,
+	.init_early	= r8a7740_init_early,
 	.init_irq	= r8a7740_init_irq_of,
 	.init_machine	= eva_init,
 	.init_late	= shmobile_init_late,
--- 0005/arch/arm/mach-shmobile/include/mach/r8a7740.h
+++ work/arch/arm/mach-shmobile/include/mach/r8a7740.h	2013-08-08 16:37:19.000000000 +0900
@@ -47,7 +47,7 @@ enum {
 };
 
 extern void r8a7740_meram_workaround(void);
-extern void r8a7740_init_delay(void);
+extern void r8a7740_init_early(void);
 extern void r8a7740_init_irq_of(void);
 extern void r8a7740_map_io(void);
 extern void r8a7740_add_early_devices(void);
--- 0006/arch/arm/mach-shmobile/setup-r8a7740.c
+++ work/arch/arm/mach-shmobile/setup-r8a7740.c	2013-08-08 16:37:19.000000000 +0900
@@ -984,8 +984,15 @@ void __init r8a7740_add_standard_devices
 	rmobile_add_device_to_domain("A3SP",	&i2c1_device);
 }
 
+void __init r8a7740_init_early(void)
+{
+	shmobile_setup_delay(800, 1, 3); /* Cortex-A9 @ 800MHz */
+};
+
 void __init r8a7740_add_early_devices(void)
 {
+	r8a7740_init_early();
+
 	early_platform_add_devices(r8a7740_early_devices,
 				   ARRAY_SIZE(r8a7740_early_devices));
 	early_platform_add_devices(r8a7740_devices_dt,
@@ -1003,11 +1010,6 @@ void __init r8a7740_add_dt_devices(void)
 
 #ifdef CONFIG_USE_OF
 
-void __init r8a7740_init_delay(void)
-{
-	shmobile_setup_delay(800, 1, 3); /* Cortex-A9 @ 800MHz */
-};
-
 void __init r8a7740_init_irq_of(void)
 {
 	void __iomem *intc_prio_base = ioremap_nocache(0xe6900010, 0x10);
@@ -1045,7 +1047,7 @@ static const char *r8a7740_boards_compat
 
 DT_MACHINE_START(R8A7740_DT, "Generic R8A7740 (Flattened Device Tree)")
 	.map_io		= r8a7740_map_io,
-	.init_early	= r8a7740_init_delay,
+	.init_early	= r8a7740_init_early,
 	.init_irq	= r8a7740_init_irq_of,
 	.dt_compat	= r8a7740_boards_compat_dt,
 MACHINE_END

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

* [PATCH 13/14] ARM: shmobile: Rename to r8a7778_init_early()
  2013-08-09  9:47 [PATCH 00/14] ARM: shmobile: Cleanups and machine descriptor rework Magnus Damm
                   ` (11 preceding siblings ...)
  2013-08-09  9:49 ` [PATCH 12/14] ARM: shmobile: Rename to r8a7740_init_early() Magnus Damm
@ 2013-08-09  9:50 ` Magnus Damm
  2013-08-09  9:50 ` [PATCH 14/14] ARM: shmobile: Rename to sh73a0_init_early(), use smp_set_ops() Magnus Damm
  13 siblings, 0 replies; 25+ messages in thread
From: Magnus Damm @ 2013-08-09  9:50 UTC (permalink / raw)
  To: linux-arm-kernel

From: Magnus Damm <damm@opensource.se>

Rename r8a7778_init_delay() into r8a7778_init_early()
to make the function name show that more than just
delay setup may happen in the future.

Signed-off-by: Magnus Damm <damm@opensource.se>
---

 arch/arm/mach-shmobile/board-bockw-reference.c |    2 +-
 arch/arm/mach-shmobile/board-bockw.c           |    2 +-
 arch/arm/mach-shmobile/include/mach/r8a7778.h  |    2 +-
 arch/arm/mach-shmobile/setup-r8a7778.c         |    4 ++--
 4 files changed, 5 insertions(+), 5 deletions(-)

--- 0001/arch/arm/mach-shmobile/board-bockw-reference.c
+++ work/arch/arm/mach-shmobile/board-bockw-reference.c	2013-08-09 17:21:15.000000000 +0900
@@ -54,7 +54,7 @@ static const char *bockw_boards_compat_d
 };
 
 DT_MACHINE_START(BOCKW_DT, "bockw")
-	.init_early	= r8a7778_init_delay,
+	.init_early	= r8a7778_init_early,
 	.init_irq	= r8a7778_init_irq_dt,
 	.init_machine	= bockw_init,
 	.dt_compat	= bockw_boards_compat_dt,
--- 0001/arch/arm/mach-shmobile/board-bockw.c
+++ work/arch/arm/mach-shmobile/board-bockw.c	2013-08-09 17:21:01.000000000 +0900
@@ -276,7 +276,7 @@ static const char *bockw_boards_compat_d
 };
 
 DT_MACHINE_START(BOCKW_DT, "bockw")
-	.init_early	= r8a7778_init_delay,
+	.init_early	= r8a7778_init_early,
 	.init_irq	= r8a7778_init_irq_dt,
 	.init_machine	= bockw_init,
 	.dt_compat	= bockw_boards_compat_dt,
--- 0001/arch/arm/mach-shmobile/include/mach/r8a7778.h
+++ work/arch/arm/mach-shmobile/include/mach/r8a7778.h	2013-08-09 17:21:43.000000000 +0900
@@ -26,7 +26,7 @@ extern void r8a7778_add_ether_device(str
 extern void r8a7778_add_dt_devices(void);
 
 extern void r8a7778_init_late(void);
-extern void r8a7778_init_delay(void);
+extern void r8a7778_init_early(void);
 extern void r8a7778_init_irq_dt(void);
 extern void r8a7778_clock_init(void);
 extern void r8a7778_init_irq_extpin(int irlm);
--- 0001/arch/arm/mach-shmobile/setup-r8a7778.c
+++ work/arch/arm/mach-shmobile/setup-r8a7778.c	2013-08-09 17:20:46.000000000 +0900
@@ -368,7 +368,7 @@ void __init r8a7778_init_irq_extpin(int
 			&irqpin_platform_data, sizeof(irqpin_platform_data));
 }
 
-void __init r8a7778_init_delay(void)
+void __init r8a7778_init_early(void)
 {
 	shmobile_setup_delay(800, 1, 3); /* Cortex-A9 @ 800MHz */
 }
@@ -404,7 +404,7 @@ static const char *r8a7778_compat_dt[] _
 };
 
 DT_MACHINE_START(R8A7778_DT, "Generic R8A7778 (Flattened Device Tree)")
-	.init_early	= r8a7778_init_delay,
+	.init_early	= r8a7778_init_early,
 	.init_irq	= r8a7778_init_irq_dt,
 	.dt_compat	= r8a7778_compat_dt,
 	.init_late      = r8a7778_init_late,

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

* [PATCH 14/14] ARM: shmobile: Rename to sh73a0_init_early(), use smp_set_ops()
  2013-08-09  9:47 [PATCH 00/14] ARM: shmobile: Cleanups and machine descriptor rework Magnus Damm
                   ` (12 preceding siblings ...)
  2013-08-09  9:50 ` [PATCH 13/14] ARM: shmobile: Rename to r8a7778_init_early() Magnus Damm
@ 2013-08-09  9:50 ` Magnus Damm
  13 siblings, 0 replies; 25+ messages in thread
From: Magnus Damm @ 2013-08-09  9:50 UTC (permalink / raw)
  To: linux-arm-kernel

From: Magnus Damm <damm@opensource.se>

Rename sh73a0_init_delay() into sh73a0_init_early()
to make the function name show that more than just
delay setup will happen.

Also, instead of specifying the smp ops in DT_MACHINE
convert the sh73a0 SoC code to install the smp ops
from sh73a0_init_early().

The sh73a0_add_early_devices() function also gets
updated to call sh73a0_init_early(). This way the
smp ops will be installed in both DT and C cases.

Signed-off-by: Magnus Damm <damm@opensource.se>
---

 arch/arm/mach-shmobile/board-kzm9g-reference.c |    3 +--
 arch/arm/mach-shmobile/board-kzm9g.c           |    1 -
 arch/arm/mach-shmobile/include/mach/sh73a0.h   |    2 +-
 arch/arm/mach-shmobile/setup-sh73a0.c          |   11 +++++++----
 4 files changed, 9 insertions(+), 8 deletions(-)

--- 0011/arch/arm/mach-shmobile/board-kzm9g-reference.c
+++ work/arch/arm/mach-shmobile/board-kzm9g-reference.c	2013-08-09 17:44:10.000000000 +0900
@@ -54,9 +54,8 @@ static const char *kzm9g_boards_compat_d
 };
 
 DT_MACHINE_START(KZM9G_DT, "kzm9g-reference")
-	.smp		= smp_ops(sh73a0_smp_ops),
 	.map_io		= sh73a0_map_io,
-	.init_early	= sh73a0_init_delay,
+	.init_early	= sh73a0_init_early,
 	.init_machine	= kzm_init,
 	.dt_compat	= kzm9g_boards_compat_dt,
 MACHINE_END
--- 0001/arch/arm/mach-shmobile/board-kzm9g.c
+++ work/arch/arm/mach-shmobile/board-kzm9g.c	2013-08-09 17:44:01.000000000 +0900
@@ -904,7 +904,6 @@ static const char *kzm9g_boards_compat_d
 };
 
 DT_MACHINE_START(KZM9G_DT, "kzm9g")
-	.smp		= smp_ops(sh73a0_smp_ops),
 	.map_io		= sh73a0_map_io,
 	.init_early	= sh73a0_add_early_devices,
 	.nr_irqs	= NR_IRQS_LEGACY,
--- 0010/arch/arm/mach-shmobile/include/mach/sh73a0.h
+++ work/arch/arm/mach-shmobile/include/mach/sh73a0.h	2013-08-09 17:42:03.000000000 +0900
@@ -71,7 +71,7 @@ enum {
 #define SH73A0_PINT0_IRQ(irq) ((irq) + 700)
 #define SH73A0_PINT1_IRQ(irq) ((irq) + 732)
 
-extern void sh73a0_init_delay(void);
+extern void sh73a0_init_early(void);
 extern void sh73a0_init_irq(void);
 extern void sh73a0_map_io(void);
 extern void sh73a0_earlytimer_init(void);
--- 0011/arch/arm/mach-shmobile/setup-sh73a0.c
+++ work/arch/arm/mach-shmobile/setup-sh73a0.c	2013-08-09 17:43:43.000000000 +0900
@@ -919,9 +919,12 @@ void __init sh73a0_add_standard_devices(
 			    ARRAY_SIZE(sh73a0_late_devices));
 }
 
-void __init sh73a0_init_delay(void)
+void __init sh73a0_init_early(void)
 {
 	shmobile_setup_delay(1196, 44, 46); /* Cortex-A9 @ 1196MHz */
+#ifdef CONFIG_SMP
+	smp_set_ops(&sh73a0_smp_ops);
+#endif
 }
 
 /* do nothing for !CONFIG_SMP or !CONFIG_HAVE_TWD */
@@ -929,7 +932,6 @@ void __init __weak sh73a0_register_twd(v
 
 void __init sh73a0_earlytimer_init(void)
 {
-	sh73a0_init_delay();
 	sh73a0_clock_init();
 	shmobile_earlytimer_init();
 	sh73a0_register_twd();
@@ -937,6 +939,8 @@ void __init sh73a0_earlytimer_init(void)
 
 void __init sh73a0_add_early_devices(void)
 {
+	sh73a0_init_early();
+
 	early_platform_add_devices(sh73a0_devices_dt,
 				   ARRAY_SIZE(sh73a0_devices_dt));
 	early_platform_add_devices(sh73a0_early_devices,
@@ -954,9 +958,8 @@ static const char *sh73a0_boards_compat_
 };
 
 DT_MACHINE_START(SH73A0_DT, "Generic SH73A0 (Flattened Device Tree)")
-	.smp		= smp_ops(sh73a0_smp_ops),
 	.map_io		= sh73a0_map_io,
-	.init_early	= sh73a0_init_delay,
+	.init_early	= sh73a0_init_early,
 	.dt_compat	= sh73a0_boards_compat_dt,
 MACHINE_END
 #endif /* CONFIG_USE_OF */

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

* [PATCH 09/14] ARM: shmobile: Rename to sh7372_init_early()
  2013-08-09  9:49 ` [PATCH 09/14] ARM: shmobile: Rename to sh7372_init_early() Magnus Damm
@ 2013-08-09 10:40   ` Laurent Pinchart
  0 siblings, 0 replies; 25+ messages in thread
From: Laurent Pinchart @ 2013-08-09 10:40 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Magnus,

Thank you for the patch.

Shouldn't the subject line mention what you rename ? :-) Same comment for the 
other patches in this series.

On Friday 09 August 2013 18:49:26 Magnus Damm wrote:
> From: Magnus Damm <damm@opensource.se>
> 
> Rename sh7372_add_early_device_dt() into sh7372_init_early()
> and make it static since we have no sh7372 DT reference board
> code. Also, in case of DT we do not use any early console or
> early timers, so get rid of early platform stuff and early
> console for the DT case.
> 
> Signed-off-by: Magnus Damm <damm@opensource.se>
> ---
> 
>  arch/arm/mach-shmobile/include/mach/sh7372.h |    1 -
>  arch/arm/mach-shmobile/setup-sh7372.c        |   10 ++--------
>  2 files changed, 2 insertions(+), 9 deletions(-)
> 
> --- 0007/arch/arm/mach-shmobile/include/mach/sh7372.h
> +++ work/arch/arm/mach-shmobile/include/mach/sh7372.h	2013-08-08
> 15:46:38.000000000 +0900 @@ -63,7 +63,6 @@ extern void sh7372_map_io(void);
>  extern void sh7372_earlytimer_init(void);
>  extern void sh7372_add_early_devices(void);
>  extern void sh7372_add_standard_devices(void);
> -extern void sh7372_add_early_devices_dt(void);
>  extern void sh7372_clock_init(void);
>  extern void sh7372_pinmux_init(void);
>  extern void sh7372_pm_init(void);
> --- 0007/arch/arm/mach-shmobile/setup-sh7372.c
> +++ work/arch/arm/mach-shmobile/setup-sh7372.c	2013-08-08 
15:48:51.000000000
> +0900 @@ -1135,15 +1135,9 @@ void __init sh7372_add_early_devices(voi
> 
>  #ifdef CONFIG_USE_OF
> 
> -void __init sh7372_add_early_devices_dt(void)
> +static void __init sh7372_init_early(void)
>  {
>  	shmobile_setup_delay(800, 1, 3); /* Cortex-A8 @ 800MHz */
> -
> -	early_platform_add_devices(sh7372_early_devices,
> -				   ARRAY_SIZE(sh7372_early_devices));
> -
> -	/* setup early console here as well */
> -	shmobile_setup_console();
>  }
> 
>  static const char *sh7372_boards_compat_dt[] __initdata = {
> @@ -1153,7 +1147,7 @@ static const char *sh7372_boards_compat_
> 
>  DT_MACHINE_START(SH7372_DT, "Generic SH7372 (Flattened Device Tree)")
>  	.map_io		= sh7372_map_io,
> -	.init_early	= sh7372_add_early_devices_dt,
> +	.init_early	= sh7372_init_early,
>  	.nr_irqs	= NR_IRQS_LEGACY,
>  	.init_irq	= sh7372_init_irq,
>  	.handle_irq	= shmobile_handle_irq_intc,
-- 
Regards,

Laurent Pinchart

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

* [PATCH 10/14] ARM: shmobile: Rename to emev2_init_early(), use smp_set_ops()
  2013-08-09  9:49 ` [PATCH 10/14] ARM: shmobile: Rename to emev2_init_early(), use smp_set_ops() Magnus Damm
@ 2013-08-09 10:41   ` Laurent Pinchart
  2013-08-28  7:03     ` Magnus Damm
  0 siblings, 1 reply; 25+ messages in thread
From: Laurent Pinchart @ 2013-08-09 10:41 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Magnus,

Thank you for the patch.

On Friday 09 August 2013 18:49:36 Magnus Damm wrote:
> From: Magnus Damm <damm@opensource.se>
> 
> Rename emev2_init_delay() into emev2_init_early()
> to make the function name show that more than just
> delay setup will happen.
> 
> Also, instead of specifying the smp ops in DT_MACHINE
> convert the EMEV2 SoC code to install the smp ops
> from emev2_init_early().

Could you please explain in the commit message why this is needed ? Same 
comment for the other patches in this series.

> Signed-off-by: Magnus Damm <damm@opensource.se>
> ---
> 
>  arch/arm/mach-shmobile/board-kzm9d-reference.c |    3 +--
>  arch/arm/mach-shmobile/board-kzm9d.c           |    3 +--
>  arch/arm/mach-shmobile/include/mach/emev2.h    |    2 +-
>  arch/arm/mach-shmobile/setup-emev2.c           |    8 +++++---
>  4 files changed, 8 insertions(+), 8 deletions(-)
> 
> --- 0001/arch/arm/mach-shmobile/board-kzm9d-reference.c
> +++ work/arch/arm/mach-shmobile/board-kzm9d-reference.c	2013-08-08
> 16:18:34.000000000 +0900 @@ -38,9 +38,8 @@ static const char
> *kzm9d_boards_compat_d
>  };
> 
>  DT_MACHINE_START(KZM9D_DT, "kzm9d")
> -	.smp		= smp_ops(emev2_smp_ops),
>  	.map_io		= emev2_map_io,
> -	.init_early	= emev2_init_delay,
> +	.init_early	= emev2_init_early,
>  	.init_machine	= kzm9d_add_standard_devices,
>  	.init_late	= shmobile_init_late,
>  	.dt_compat	= kzm9d_boards_compat_dt,
> --- 0001/arch/arm/mach-shmobile/board-kzm9d.c
> +++ work/arch/arm/mach-shmobile/board-kzm9d.c	2013-08-08 
16:18:17.000000000
> +0900 @@ -83,9 +83,8 @@ static const char *kzm9d_boards_compat_d
>  };
> 
>  DT_MACHINE_START(KZM9D_DT, "kzm9d")
> -	.smp		= smp_ops(emev2_smp_ops),
>  	.map_io		= emev2_map_io,
> -	.init_early	= emev2_init_delay,
> +	.init_early	= emev2_init_early,
>  	.init_machine	= kzm9d_add_standard_devices,
>  	.init_late	= shmobile_init_late,
>  	.dt_compat	= kzm9d_boards_compat_dt,
> --- 0001/arch/arm/mach-shmobile/include/mach/emev2.h
> +++ work/arch/arm/mach-shmobile/include/mach/emev2.h	2013-08-08
> 16:17:57.000000000 +0900 @@ -2,7 +2,7 @@
>  #define __ASM_EMEV2_H__
> 
>  extern void emev2_map_io(void);
> -extern void emev2_init_delay(void);
> +extern void emev2_init_early(void);
>  extern void emev2_add_standard_devices(void);
>  extern void emev2_clock_init(void);
> 
> --- 0001/arch/arm/mach-shmobile/setup-emev2.c
> +++ work/arch/arm/mach-shmobile/setup-emev2.c	2013-08-08 
16:17:47.000000000
> +0900 @@ -190,9 +190,12 @@ void __init emev2_add_standard_devices(v
>  	emev2_register_pmu();
>  }
> 
> -void __init emev2_init_delay(void)
> +void __init emev2_init_early(void)
>  {
>  	shmobile_setup_delay(533, 1, 3); /* Cortex-A9 @ 533MHz */
> +#ifdef CONFIG_SMP
> +	smp_set_ops(&emev2_smp_ops);
> +#endif
>  }
> 
>  #ifdef CONFIG_USE_OF
> @@ -203,9 +206,8 @@ static const char *emev2_boards_compat_d
>  };
> 
>  DT_MACHINE_START(EMEV2_DT, "Generic Emma Mobile EV2 (Flattened Device
> Tree)") -	.smp		= smp_ops(emev2_smp_ops),
>  	.map_io		= emev2_map_io,
> -	.init_early	= emev2_init_delay,
> +	.init_early	= emev2_init_early,
>  	.dt_compat	= emev2_boards_compat_dt,
>  MACHINE_END
> 

-- 
Regards,

Laurent Pinchart

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

* [PATCH 04/14] ARM: shmobile: sh73a0: Remove ->init_machine() special case
  2013-08-09  9:48 ` [PATCH 04/14] ARM: shmobile: sh73a0: " Magnus Damm
@ 2013-08-09 10:47   ` Laurent Pinchart
  2013-08-28  6:40     ` Magnus Damm
  0 siblings, 1 reply; 25+ messages in thread
From: Laurent Pinchart @ 2013-08-09 10:47 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Magnus,

Thank you for the patch.

On Friday 09 August 2013 18:48:32 Magnus Damm wrote:
> From: Magnus Damm <damm@opensource.se>
> 
> No need to special case sh73a0 ->init_machine(),
> so get rid of undesired cpufreq platform device
> from the generic long term sh73a0 DT support code.
> 
> For short term support on KZM9D the DT reference
> implementation now adds a "cpufreq-cpu0" platform
> device so that can be used for development.

Doesn't this go against the spirit of the -reference platforms that don't use 
DT devices in board code ? I don't see an urgent need for this, how far along 
are the DT cpufreq-related bindings ?

> Signed-off-by: Magnus Damm <damm@opensource.se>
> ---
> 
>  arch/arm/mach-shmobile/board-kzm9g-reference.c |    9 ++++++++-
>  arch/arm/mach-shmobile/include/mach/sh73a0.h   |    2 +- 
>  arch/arm/mach-shmobile/setup-sh73a0.c          |   23  ++++++--------------
>  3 files changed, 15 insertions(+), 19 deletions(-)
> 
> --- 0001/arch/arm/mach-shmobile/board-kzm9g-reference.c
> +++ work/arch/arm/mach-shmobile/board-kzm9g-reference.c	2013-08-08
> 15:56:28.000000000 +0900 @@ -33,7 +33,14 @@
> 
>  static void __init kzm_init(void)
>  {
> -	sh73a0_add_standard_devices_dt();
> +	/* clocks are setup late during boot in the case of DT */
> +	sh73a0_clock_init();
> +
> +	sh73a0_add_dt_devices();
> +
> +	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
> +
> +	platform_device_register_simple("cpufreq-cpu0", -1, NULL, 0);
> 
>  #ifdef CONFIG_CACHE_L2X0
>  	/* Early BRESP enable, Shared attribute override enable, 64K*8way */
> --- 0001/arch/arm/mach-shmobile/include/mach/sh73a0.h
> +++ work/arch/arm/mach-shmobile/include/mach/sh73a0.h	2013-08-08
> 15:54:26.000000000 +0900 @@ -78,7 +78,7 @@ extern void sh73a0_map_io(void);
>  extern void sh73a0_earlytimer_init(void);
>  extern void sh73a0_add_early_devices(void);
>  extern void sh73a0_add_standard_devices(void);
> -extern void sh73a0_add_standard_devices_dt(void);
> +extern void sh73a0_add_dt_devices(void);
>  extern void sh73a0_clock_init(void);
>  extern void sh73a0_pinmux_init(void);
>  extern void sh73a0_pm_init(void);
> --- 0001/arch/arm/mach-shmobile/setup-sh73a0.c
> +++ work/arch/arm/mach-shmobile/setup-sh73a0.c	2013-08-08 
15:57:42.000000000
> +0900 @@ -23,7 +23,6 @@
>  #include <linux/interrupt.h>
>  #include <linux/irq.h>
>  #include <linux/platform_device.h>
> -#include <linux/of_platform.h>
>  #include <linux/delay.h>
>  #include <linux/input.h>
>  #include <linux/io.h>
> @@ -901,6 +900,12 @@ static struct platform_device *sh73a0_la
> 
>  #define SRCR2          IOMEM(0xe61580b0)
> 
> +void __init sh73a0_add_dt_devices(void)
> +{
> +	platform_add_devices(sh73a0_devices_dt,
> +			     ARRAY_SIZE(sh73a0_devices_dt));
> +}
> +
>  void __init sh73a0_add_standard_devices(void)
>  {
>  	/* Clear software reset bit on SY-DMAC module */
> @@ -943,21 +948,6 @@ void __init sh73a0_add_early_devices(voi
> 
>  #ifdef CONFIG_USE_OF
> 
> -void __init sh73a0_add_standard_devices_dt(void)
> -{
> -	struct platform_device_info devinfo = { .name = "cpufreq-cpu0", .id = -1,
> }; -
> -	/* clocks are setup late during boot in the case of DT */
> -	sh73a0_clock_init();
> -
> -	platform_add_devices(sh73a0_devices_dt,
> -			     ARRAY_SIZE(sh73a0_devices_dt));
> -	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
> -
> -	/* Instantiate cpufreq-cpu0 */
> -	platform_device_register_full(&devinfo);
> -}
> -
>  static const char *sh73a0_boards_compat_dt[] __initdata = {
>  	"renesas,sh73a0",
>  	NULL,
> @@ -968,7 +958,6 @@ DT_MACHINE_START(SH73A0_DT, "Generic SH7
>  	.map_io		= sh73a0_map_io,
>  	.init_early	= sh73a0_init_delay,
>  	.nr_irqs	= NR_IRQS_LEGACY,
> -	.init_machine	= sh73a0_add_standard_devices_dt,
>  	.dt_compat	= sh73a0_boards_compat_dt,
>  MACHINE_END
>  #endif /* CONFIG_USE_OF */

-- 
Regards,

Laurent Pinchart

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

* [PATCH 04/14] ARM: shmobile: sh73a0: Remove ->init_machine() special case
  2013-08-09 10:47   ` Laurent Pinchart
@ 2013-08-28  6:40     ` Magnus Damm
  2013-08-28 12:08       ` Laurent Pinchart
  0 siblings, 1 reply; 25+ messages in thread
From: Magnus Damm @ 2013-08-28  6:40 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Laurent,

On Fri, Aug 9, 2013 at 7:47 PM, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
> Hi Magnus,
>
> Thank you for the patch.
>
> On Friday 09 August 2013 18:48:32 Magnus Damm wrote:
>> From: Magnus Damm <damm@opensource.se>
>>
>> No need to special case sh73a0 ->init_machine(),
>> so get rid of undesired cpufreq platform device
>> from the generic long term sh73a0 DT support code.
>>
>> For short term support on KZM9D the DT reference
>> implementation now adds a "cpufreq-cpu0" platform
>> device so that can be used for development.
>
> Doesn't this go against the spirit of the -reference platforms that don't use
> DT devices in board code ? I don't see an urgent need for this, how far along
> are the DT cpufreq-related bindings ?

I'm not sure what the latest state of DT cpufreq bindings are.
Actually, it seems to me that the cpufreq platform device is a
software policy that shouldn't be described with DT. And to be honest,
I can't really see how this policy has anything to do with any
particular SoC.

Regarding MACHINE_START on mach-shmobile I'd like to have 3 levels:

1) MACHINE_START in setup-xxxx.c

This is where we aim to be in the long term. We should be as
theoretically correct as ever possible here. I'd like to avoid all
platform devices here. Also, I'd like to avoid short term random
policy setting here.

2) MACHINE_START in board-xxx-reference.c

This is where we build DT support for the board. In case we don't have
DT bindings for a certain device then using platform device here is
acceptable. Other short term workarounds are also acceptable here.

3) MACHINE_START in board-xxx.c

This is the location of the C-based board support. Some SoC-specific
bits like CPU cores and interrupt controllers may be initialized via
DT. Otherwise platform devices are used.

Hope this clarifies my view!

Cheers,

/ magnus

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

* [PATCH 10/14] ARM: shmobile: Rename to emev2_init_early(), use smp_set_ops()
  2013-08-09 10:41   ` Laurent Pinchart
@ 2013-08-28  7:03     ` Magnus Damm
  2013-08-28  7:53       ` Laurent Pinchart
  0 siblings, 1 reply; 25+ messages in thread
From: Magnus Damm @ 2013-08-28  7:03 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Laurent,

On Fri, Aug 9, 2013 at 7:41 PM, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
> Hi Magnus,
>
> Thank you for the patch.
>
> On Friday 09 August 2013 18:49:36 Magnus Damm wrote:
>> From: Magnus Damm <damm@opensource.se>
>>
>> Rename emev2_init_delay() into emev2_init_early()
>> to make the function name show that more than just
>> delay setup will happen.
>>
>> Also, instead of specifying the smp ops in DT_MACHINE
>> convert the EMEV2 SoC code to install the smp ops
>> from emev2_init_early().
>
> Could you please explain in the commit message why this is needed ? Same
> comment for the other patches in this series.

I personally think it is neat to use as few callbacks as possible in
the DT_MACHINE. Hooking in SMP ops in ->init_early() means that the
boards now are unaware if SMP is used or not - and it makes sense to
me to write board code that is independent of SMP.

Anyway, I suspect that Olof prefers to use smp_ops() instead, so I
think these patches just should be dropped.

Cheers,
/ magnus

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

* [PATCH 10/14] ARM: shmobile: Rename to emev2_init_early(), use smp_set_ops()
  2013-08-28  7:03     ` Magnus Damm
@ 2013-08-28  7:53       ` Laurent Pinchart
  0 siblings, 0 replies; 25+ messages in thread
From: Laurent Pinchart @ 2013-08-28  7:53 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Magnus,

On Wednesday 28 August 2013 16:03:23 Magnus Damm wrote:
> On Fri, Aug 9, 2013 at 7:41 PM, Laurent Pinchart wrote:
> > On Friday 09 August 2013 18:49:36 Magnus Damm wrote:
> >> From: Magnus Damm <damm@opensource.se>
> >> 
> >> Rename emev2_init_delay() into emev2_init_early()
> >> to make the function name show that more than just
> >> delay setup will happen.
> >> 
> >> Also, instead of specifying the smp ops in DT_MACHINE
> >> convert the EMEV2 SoC code to install the smp ops
> >> from emev2_init_early().
> > 
> > Could you please explain in the commit message why this is needed ? Same
> > comment for the other patches in this series.
> 
> I personally think it is neat to use as few callbacks as possible in
> the DT_MACHINE. Hooking in SMP ops in ->init_early() means that the
> boards now are unaware if SMP is used or not - and it makes sense to
> me to write board code that is independent of SMP.

That's a good enough explanation, I'd just like it to be included in the 
commit message.

> Anyway, I suspect that Olof prefers to use smp_ops() instead, so I think
> these patches just should be dropped.

I suppose that's for you to sort out with him :-)

-- 
Regards,

Laurent Pinchart

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

* [PATCH 04/14] ARM: shmobile: sh73a0: Remove ->init_machine() special case
  2013-08-28  6:40     ` Magnus Damm
@ 2013-08-28 12:08       ` Laurent Pinchart
  2013-08-28 12:19         ` Magnus Damm
  0 siblings, 1 reply; 25+ messages in thread
From: Laurent Pinchart @ 2013-08-28 12:08 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Magnus,

On Wednesday 28 August 2013 15:40:50 Magnus Damm wrote:
> On Fri, Aug 9, 2013 at 7:47 PM, Laurent Pinchart wrote:
> > On Friday 09 August 2013 18:48:32 Magnus Damm wrote:
> >> From: Magnus Damm <damm@opensource.se>
> >> 
> >> No need to special case sh73a0 ->init_machine(),
> >> so get rid of undesired cpufreq platform device
> >> from the generic long term sh73a0 DT support code.
> >> 
> >> For short term support on KZM9D the DT reference
> >> implementation now adds a "cpufreq-cpu0" platform
> >> device so that can be used for development.
> > 
> > Doesn't this go against the spirit of the -reference platforms that don't
> > use DT devices in board code ? I don't see an urgent need for this, how
> > far along are the DT cpufreq-related bindings ?
> 
> I'm not sure what the latest state of DT cpufreq bindings are. Actually, it
> seems to me that the cpufreq platform device is a software policy that
> shouldn't be described with DT. And to be honest, I can't really see how
> this policy has anything to do with any particular SoC.

I'm no cpufreq expert, but if we need to register the device in C code, I'm 
pretty uneasy with having that code in board files. One of the DT goals is to 
get rid of most board files.

> Regarding MACHINE_START on mach-shmobile I'd like to have 3 levels:
> 
> 1) MACHINE_START in setup-xxxx.c
> 
> This is where we aim to be in the long term. We should be as
> theoretically correct as ever possible here. I'd like to avoid all
> platform devices here. Also, I'd like to avoid short term random
> policy setting here.
> 
> 2) MACHINE_START in board-xxx-reference.c
> 
> This is where we build DT support for the board. In case we don't have
> DT bindings for a certain device then using platform device here is
> acceptable. Other short term workarounds are also acceptable here.
> 
> 3) MACHINE_START in board-xxx.c
> 
> This is the location of the C-based board support. Some SoC-specific
> bits like CPU cores and interrupt controllers may be initialized via
> DT. Otherwise platform devices are used.
> 
> Hope this clarifies my view!

-- 
Regards,

Laurent Pinchart

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

* [PATCH 04/14] ARM: shmobile: sh73a0: Remove ->init_machine() special case
  2013-08-28 12:08       ` Laurent Pinchart
@ 2013-08-28 12:19         ` Magnus Damm
  2013-08-30  0:30           ` Laurent Pinchart
  0 siblings, 1 reply; 25+ messages in thread
From: Magnus Damm @ 2013-08-28 12:19 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Laurent,

On Wed, Aug 28, 2013 at 9:08 PM, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
> Hi Magnus,
>
> On Wednesday 28 August 2013 15:40:50 Magnus Damm wrote:
>> On Fri, Aug 9, 2013 at 7:47 PM, Laurent Pinchart wrote:
>> > On Friday 09 August 2013 18:48:32 Magnus Damm wrote:
>> >> From: Magnus Damm <damm@opensource.se>
>> >>
>> >> No need to special case sh73a0 ->init_machine(),
>> >> so get rid of undesired cpufreq platform device
>> >> from the generic long term sh73a0 DT support code.
>> >>
>> >> For short term support on KZM9D the DT reference
>> >> implementation now adds a "cpufreq-cpu0" platform
>> >> device so that can be used for development.
>> >
>> > Doesn't this go against the spirit of the -reference platforms that don't
>> > use DT devices in board code ? I don't see an urgent need for this, how
>> > far along are the DT cpufreq-related bindings ?
>>
>> I'm not sure what the latest state of DT cpufreq bindings are. Actually, it
>> seems to me that the cpufreq platform device is a software policy that
>> shouldn't be described with DT. And to be honest, I can't really see how
>> this policy has anything to do with any particular SoC.
>
> I'm no cpufreq expert, but if we need to register the device in C code, I'm
> pretty uneasy with having that code in board files. One of the DT goals is to
> get rid of most board files.

I'm not sure if we actually _have_to_ register via the platform
device, or if it just happens to be like that today because no one has
bothered creating a better abstraction. It is a mystery to me that
both a platform device is used to select actual driver, and then DT is
used to provide frequency and voltage information.

The cpufreq software policy is neither board nor SoC specific. It must
be application specific. I can understand that putting it in a board
file seems odd, but putting it in a SoC file is IMO equally odd, and
with the added damage that people starting to write generic DT code
may assume that the SoC will keep on using the same cpufreq software
policy in the future.

Perhaps the cpufreq registration interface should be reworked somehow?

Cheers,

/ magnus

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

* [PATCH 04/14] ARM: shmobile: sh73a0: Remove ->init_machine() special case
  2013-08-28 12:19         ` Magnus Damm
@ 2013-08-30  0:30           ` Laurent Pinchart
  2013-08-30  6:58             ` Magnus Damm
  0 siblings, 1 reply; 25+ messages in thread
From: Laurent Pinchart @ 2013-08-30  0:30 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Magnus,

On Wednesday 28 August 2013 21:19:50 Magnus Damm wrote:
> On Wed, Aug 28, 2013 at 9:08 PM, Laurent Pinchart wrote:
> > On Wednesday 28 August 2013 15:40:50 Magnus Damm wrote:
> >> On Fri, Aug 9, 2013 at 7:47 PM, Laurent Pinchart wrote:
> >> > On Friday 09 August 2013 18:48:32 Magnus Damm wrote:
> >> >> From: Magnus Damm <damm@opensource.se>
> >> >> 
> >> >> No need to special case sh73a0 ->init_machine(),
> >> >> so get rid of undesired cpufreq platform device
> >> >> from the generic long term sh73a0 DT support code.
> >> >> 
> >> >> For short term support on KZM9D the DT reference
> >> >> implementation now adds a "cpufreq-cpu0" platform
> >> >> device so that can be used for development.
> >> > 
> >> > Doesn't this go against the spirit of the -reference platforms that
> >> > don't use DT devices in board code ? I don't see an urgent need for
> >> > this, how far along are the DT cpufreq-related bindings ?
> >> 
> >> I'm not sure what the latest state of DT cpufreq bindings are. Actually,
> >> it seems to me that the cpufreq platform device is a software policy that
> >> shouldn't be described with DT. And to be honest, I can't really see how
> >> this policy has anything to do with any particular SoC.
> > 
> > I'm no cpufreq expert, but if we need to register the device in C code,
> > I'm pretty uneasy with having that code in board files. One of the DT
> > goals is to get rid of most board files.
> 
> I'm not sure if we actually _have_to_ register via the platform device, or
> if it just happens to be like that today because no one has bothered
> creating a better abstraction. It is a mystery to me that both a platform
> device is used to select actual driver, and then DT is used to provide
> frequency and voltage information.
> 
> The cpufreq software policy is neither board nor SoC specific. It must be
> application specific. I can understand that putting it in a board file seems
> odd, but putting it in a SoC file is IMO equally odd, and with the added
> damage that people starting to write generic DT code may assume that the SoC
> will keep on using the same cpufreq software policy in the future.
> 
> Perhaps the cpufreq registration interface should be reworked somehow?

Perhaps :-) The situation needs to be at least clarified. Feel free to CC me 
:-)

-- 
Regards,

Laurent Pinchart

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

* [PATCH 04/14] ARM: shmobile: sh73a0: Remove ->init_machine() special case
  2013-08-30  0:30           ` Laurent Pinchart
@ 2013-08-30  6:58             ` Magnus Damm
  0 siblings, 0 replies; 25+ messages in thread
From: Magnus Damm @ 2013-08-30  6:58 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Laurent,

On Fri, Aug 30, 2013 at 9:30 AM, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
> Hi Magnus,
>
> On Wednesday 28 August 2013 21:19:50 Magnus Damm wrote:
>> On Wed, Aug 28, 2013 at 9:08 PM, Laurent Pinchart wrote:
>> > On Wednesday 28 August 2013 15:40:50 Magnus Damm wrote:
>> >> On Fri, Aug 9, 2013 at 7:47 PM, Laurent Pinchart wrote:
>> >> > On Friday 09 August 2013 18:48:32 Magnus Damm wrote:
>> >> >> From: Magnus Damm <damm@opensource.se>
>> >> >>
>> >> >> No need to special case sh73a0 ->init_machine(),
>> >> >> so get rid of undesired cpufreq platform device
>> >> >> from the generic long term sh73a0 DT support code.
>> >> >>
>> >> >> For short term support on KZM9D the DT reference
>> >> >> implementation now adds a "cpufreq-cpu0" platform
>> >> >> device so that can be used for development.
>> >> >
>> >> > Doesn't this go against the spirit of the -reference platforms that
>> >> > don't use DT devices in board code ? I don't see an urgent need for
>> >> > this, how far along are the DT cpufreq-related bindings ?
>> >>
>> >> I'm not sure what the latest state of DT cpufreq bindings are. Actually,
>> >> it seems to me that the cpufreq platform device is a software policy that
>> >> shouldn't be described with DT. And to be honest, I can't really see how
>> >> this policy has anything to do with any particular SoC.
>> >
>> > I'm no cpufreq expert, but if we need to register the device in C code,
>> > I'm pretty uneasy with having that code in board files. One of the DT
>> > goals is to get rid of most board files.
>>
>> I'm not sure if we actually _have_to_ register via the platform device, or
>> if it just happens to be like that today because no one has bothered
>> creating a better abstraction. It is a mystery to me that both a platform
>> device is used to select actual driver, and then DT is used to provide
>> frequency and voltage information.
>>
>> The cpufreq software policy is neither board nor SoC specific. It must be
>> application specific. I can understand that putting it in a board file seems
>> odd, but putting it in a SoC file is IMO equally odd, and with the added
>> damage that people starting to write generic DT code may assume that the SoC
>> will keep on using the same cpufreq software policy in the future.
>>
>> Perhaps the cpufreq registration interface should be reworked somehow?
>
> Perhaps :-) The situation needs to be at least clarified. Feel free to CC me
> :-)

Thanks. =)

There are CPUFreq dependencies on SMP and multi-cluster frequency
scaling for some SoCs, so to begin with I prefer to allow selected
boards use whatever old interface that is available now and over time
incrementally improve the situation. I don't however want the shared
per-SoC DT_MACHINE code in setup-xxx.c to enable anything by default
for now though - this portion we can modify when we have SMP and
multi-cluster working.

Cheers,

/ magnus

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

end of thread, other threads:[~2013-08-30  6:58 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-09  9:47 [PATCH 00/14] ARM: shmobile: Cleanups and machine descriptor rework Magnus Damm
2013-08-09  9:47 ` [PATCH 01/14] ARM: shmobile: r8a7779: Remove ->init_machine() special case Magnus Damm
2013-08-09  9:48 ` [PATCH 02/14] ARM: shmobile: r8a7740: " Magnus Damm
2013-08-09  9:48 ` [PATCH 03/14] ARM: shmobile: sh7372: " Magnus Damm
2013-08-09  9:48 ` [PATCH 04/14] ARM: shmobile: sh73a0: " Magnus Damm
2013-08-09 10:47   ` Laurent Pinchart
2013-08-28  6:40     ` Magnus Damm
2013-08-28 12:08       ` Laurent Pinchart
2013-08-28 12:19         ` Magnus Damm
2013-08-30  0:30           ` Laurent Pinchart
2013-08-30  6:58             ` Magnus Damm
2013-08-09  9:48 ` [PATCH 05/14] ARM: shmobile: Remove r8a7740_add_early_devices_dt() Magnus Damm
2013-08-09  9:48 ` [PATCH 06/14] ARM: shmobile: Remove sh73a0_init_irq_dt() Magnus Damm
2013-08-09  9:49 ` [PATCH 07/14] ARM: shmobile: Remove r8a7779 ->nr_irqs Magnus Damm
2013-08-09  9:49 ` [PATCH 08/14] ARM: shmobile: Remove sh73a0 ->nr_irqs Magnus Damm
2013-08-09  9:49 ` [PATCH 09/14] ARM: shmobile: Rename to sh7372_init_early() Magnus Damm
2013-08-09 10:40   ` Laurent Pinchart
2013-08-09  9:49 ` [PATCH 10/14] ARM: shmobile: Rename to emev2_init_early(), use smp_set_ops() Magnus Damm
2013-08-09 10:41   ` Laurent Pinchart
2013-08-28  7:03     ` Magnus Damm
2013-08-28  7:53       ` Laurent Pinchart
2013-08-09  9:49 ` [PATCH 11/14] ARM: shmobile: Rename to r8a7779_init_early(), " Magnus Damm
2013-08-09  9:49 ` [PATCH 12/14] ARM: shmobile: Rename to r8a7740_init_early() Magnus Damm
2013-08-09  9:50 ` [PATCH 13/14] ARM: shmobile: Rename to r8a7778_init_early() Magnus Damm
2013-08-09  9:50 ` [PATCH 14/14] ARM: shmobile: Rename to sh73a0_init_early(), use smp_set_ops() Magnus Damm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).