linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/10] ARM: shmobile: sh7372: Update DTS to include CPU frequency
  2014-08-25  1:10 [GIT PULL] Renesas ARM Based SoC Init Delay Updates For v3.18 Simon Horman
@ 2014-08-25  1:10 ` Simon Horman
  2014-08-25  1:10 ` [PATCH 02/10] ARM: shmobile: sh73a0: " Simon Horman
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 15+ messages in thread
From: Simon Horman @ 2014-08-25  1:10 UTC (permalink / raw)
  To: linux-arm-kernel

From: Magnus Damm <damm+renesas@opensource.se>

Add CPU Frequency information to the sh7372 DTS file. This
will allow us to use the shared C code on sh7372 and Mackerel
which reads out the clock frequency from DT and calculates the
delay settings from there.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
 arch/arm/boot/dts/sh7372.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/sh7372.dtsi b/arch/arm/boot/dts/sh7372.dtsi
index 249f65be2..f863a10 100644
--- a/arch/arm/boot/dts/sh7372.dtsi
+++ b/arch/arm/boot/dts/sh7372.dtsi
@@ -21,6 +21,7 @@
 			compatible = "arm,cortex-a8";
 			device_type = "cpu";
 			reg = <0x0>;
+			clock-frequency = <800000000>;
 		};
 	};
 
-- 
2.0.1

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

* [PATCH 02/10] ARM: shmobile: sh73a0: Update DTS to include CPU frequency
  2014-08-25  1:10 [GIT PULL] Renesas ARM Based SoC Init Delay Updates For v3.18 Simon Horman
  2014-08-25  1:10 ` [PATCH 01/10] ARM: shmobile: sh7372: Update DTS to include CPU frequency Simon Horman
@ 2014-08-25  1:10 ` Simon Horman
  2014-08-25  1:10 ` [PATCH 03/10] ARM: shmobile: r8a7778: " Simon Horman
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 15+ messages in thread
From: Simon Horman @ 2014-08-25  1:10 UTC (permalink / raw)
  To: linux-arm-kernel

From: Magnus Damm <damm+renesas@opensource.se>

Add CPU Frequency information to the sh73a0 DTS file. This
will allow us to use the shared C code on sh73a0 and KZM9G
which reads out the clock frequency from DT and calculates the
delay settings from there.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
 arch/arm/boot/dts/sh73a0.dtsi | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/boot/dts/sh73a0.dtsi b/arch/arm/boot/dts/sh73a0.dtsi
index 910b790..175729e 100644
--- a/arch/arm/boot/dts/sh73a0.dtsi
+++ b/arch/arm/boot/dts/sh73a0.dtsi
@@ -23,11 +23,13 @@
 			device_type = "cpu";
 			compatible = "arm,cortex-a9";
 			reg = <0>;
+			clock-frequency = <1196000000>;
 		};
 		cpu at 1 {
 			device_type = "cpu";
 			compatible = "arm,cortex-a9";
 			reg = <1>;
+			clock-frequency = <1196000000>;
 		};
 	};
 
-- 
2.0.1

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

* [PATCH 03/10] ARM: shmobile: r8a7778: Update DTS to include CPU frequency
  2014-08-25  1:10 [GIT PULL] Renesas ARM Based SoC Init Delay Updates For v3.18 Simon Horman
  2014-08-25  1:10 ` [PATCH 01/10] ARM: shmobile: sh7372: Update DTS to include CPU frequency Simon Horman
  2014-08-25  1:10 ` [PATCH 02/10] ARM: shmobile: sh73a0: " Simon Horman
@ 2014-08-25  1:10 ` Simon Horman
  2014-08-25  1:10 ` [PATCH 04/10] ARM: shmobile: sh7372: Use shmobile_init_delay() Simon Horman
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 15+ messages in thread
From: Simon Horman @ 2014-08-25  1:10 UTC (permalink / raw)
  To: linux-arm-kernel

From: Magnus Damm <damm+renesas@opensource.se>

Add CPU Frequency information to the r8a7778 DTS file. This
will allow us to use the shared C code on r8a7778 and BockW
which reads out the clock frequency from DT and calculates the
delay settings from there.

Also add other missing CPU information to the r8a7778 DTS.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
 arch/arm/boot/dts/r8a7778.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7778.dtsi b/arch/arm/boot/dts/r8a7778.dtsi
index ecfdf4b..315ec62 100644
--- a/arch/arm/boot/dts/r8a7778.dtsi
+++ b/arch/arm/boot/dts/r8a7778.dtsi
@@ -23,8 +23,14 @@
 	interrupt-parent = <&gic>;
 
 	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
 		cpu at 0 {
+			device_type = "cpu";
 			compatible = "arm,cortex-a9";
+			reg = <0>;
+			clock-frequency = <800000000>;
 		};
 	};
 
-- 
2.0.1

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

* [PATCH 04/10] ARM: shmobile: sh7372: Use shmobile_init_delay()
  2014-08-25  1:10 [GIT PULL] Renesas ARM Based SoC Init Delay Updates For v3.18 Simon Horman
                   ` (2 preceding siblings ...)
  2014-08-25  1:10 ` [PATCH 03/10] ARM: shmobile: r8a7778: " Simon Horman
@ 2014-08-25  1:10 ` Simon Horman
  2014-08-25  1:10 ` [PATCH 05/10] ARM: shmobile: r8a73a4: " Simon Horman
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 15+ messages in thread
From: Simon Horman @ 2014-08-25  1:10 UTC (permalink / raw)
  To: linux-arm-kernel

From: Magnus Damm <damm+renesas@opensource.se>

Adjust the sh7372 SoC support code to use shmobile_init_delay()
together with CPU Frequency settings from the DTS. Get rid of the
C code version.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
 arch/arm/mach-shmobile/setup-sh7372.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c
index 3731ecc..ad7a82d 100644
--- a/arch/arm/mach-shmobile/setup-sh7372.c
+++ b/arch/arm/mach-shmobile/setup-sh7372.c
@@ -984,7 +984,7 @@ void __init sh7372_add_early_devices(void)
 
 void __init sh7372_add_early_devices_dt(void)
 {
-	shmobile_setup_delay(800, 1, 3); /* Cortex-A8 @ 800MHz */
+	shmobile_init_delay();
 
 	sh7372_add_early_devices();
 }
-- 
2.0.1

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

* [PATCH 05/10] ARM: shmobile: r8a73a4: Use shmobile_init_delay()
  2014-08-25  1:10 [GIT PULL] Renesas ARM Based SoC Init Delay Updates For v3.18 Simon Horman
                   ` (3 preceding siblings ...)
  2014-08-25  1:10 ` [PATCH 04/10] ARM: shmobile: sh7372: Use shmobile_init_delay() Simon Horman
@ 2014-08-25  1:10 ` Simon Horman
  2014-08-25  1:10 ` [PATCH 06/10] ARM: shmobile: Remove shmobile_setup_delay() Simon Horman
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 15+ messages in thread
From: Simon Horman @ 2014-08-25  1:10 UTC (permalink / raw)
  To: linux-arm-kernel

From: Magnus Damm <damm+renesas@opensource.se>

Adjust the r8a73a4 SoC support code to use shmobile_init_delay()
together with CPU Frequency settings from the DTS. Get rid of the
C code version and r8a73a4_init_early() that now are unused.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
 arch/arm/mach-shmobile/r8a73a4.h       | 1 -
 arch/arm/mach-shmobile/setup-r8a73a4.c | 9 +--------
 2 files changed, 1 insertion(+), 9 deletions(-)

diff --git a/arch/arm/mach-shmobile/r8a73a4.h b/arch/arm/mach-shmobile/r8a73a4.h
index ce8bdd1..5fafd6f 100644
--- a/arch/arm/mach-shmobile/r8a73a4.h
+++ b/arch/arm/mach-shmobile/r8a73a4.h
@@ -14,6 +14,5 @@ void r8a73a4_add_standard_devices(void);
 void r8a73a4_add_dt_devices(void);
 void r8a73a4_clock_init(void);
 void r8a73a4_pinmux_init(void);
-void r8a73a4_init_early(void);
 
 #endif /* __ASM_R8A73A4_H__ */
diff --git a/arch/arm/mach-shmobile/setup-r8a73a4.c b/arch/arm/mach-shmobile/setup-r8a73a4.c
index 6fbcdcc..53f40b7 100644
--- a/arch/arm/mach-shmobile/setup-r8a73a4.c
+++ b/arch/arm/mach-shmobile/setup-r8a73a4.c
@@ -295,13 +295,6 @@ void __init r8a73a4_add_standard_devices(void)
 	r8a73a4_register_dmac();
 }
 
-void __init r8a73a4_init_early(void)
-{
-#ifndef CONFIG_ARM_ARCH_TIMER
-	shmobile_setup_delay(1500, 2, 4); /* Cortex-A15 @ 1500MHz */
-#endif
-}
-
 #ifdef CONFIG_USE_OF
 
 static const char *r8a73a4_boards_compat_dt[] __initdata = {
@@ -310,7 +303,7 @@ static const char *r8a73a4_boards_compat_dt[] __initdata = {
 };
 
 DT_MACHINE_START(R8A73A4_DT, "Generic R8A73A4 (Flattened Device Tree)")
-	.init_early	= r8a73a4_init_early,
+	.init_early	= shmobile_init_delay,
 	.init_late	= shmobile_init_late,
 	.dt_compat	= r8a73a4_boards_compat_dt,
 MACHINE_END
-- 
2.0.1

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

* [PATCH 06/10] ARM: shmobile: Remove shmobile_setup_delay()
  2014-08-25  1:10 [GIT PULL] Renesas ARM Based SoC Init Delay Updates For v3.18 Simon Horman
                   ` (4 preceding siblings ...)
  2014-08-25  1:10 ` [PATCH 05/10] ARM: shmobile: r8a73a4: " Simon Horman
@ 2014-08-25  1:10 ` Simon Horman
  2014-08-25  1:10 ` [PATCH 07/10] ARM: shmobile: sh73a0: Use shmobile_init_delay() Simon Horman
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 15+ messages in thread
From: Simon Horman @ 2014-08-25  1:10 UTC (permalink / raw)
  To: linux-arm-kernel

From: Magnus Damm <damm+renesas@opensource.se>

All ARM mach-shmobile SoCs and boards now rely on DTS for
CPU Frequency information, so remove the unused function
shmobile_setup_delay(). While at it, make the function
shmobile_setup_delay_hz() static.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
 arch/arm/mach-shmobile/common.h |  2 --
 arch/arm/mach-shmobile/timer.c  | 21 ++-------------------
 2 files changed, 2 insertions(+), 21 deletions(-)

diff --git a/arch/arm/mach-shmobile/common.h b/arch/arm/mach-shmobile/common.h
index 9805608..72087c7 100644
--- a/arch/arm/mach-shmobile/common.h
+++ b/arch/arm/mach-shmobile/common.h
@@ -2,8 +2,6 @@
 #define __ARCH_MACH_COMMON_H
 
 extern void shmobile_earlytimer_init(void);
-extern void shmobile_setup_delay(unsigned int max_cpu_core_mhz,
-			 unsigned int mult, unsigned int div);
 extern void shmobile_init_delay(void);
 struct twd_local_timer;
 extern void shmobile_setup_console(void);
diff --git a/arch/arm/mach-shmobile/timer.c b/arch/arm/mach-shmobile/timer.c
index 942efdc..adce98b 100644
--- a/arch/arm/mach-shmobile/timer.c
+++ b/arch/arm/mach-shmobile/timer.c
@@ -23,8 +23,8 @@
 #include <linux/delay.h>
 #include <linux/of_address.h>
 
-void __init shmobile_setup_delay_hz(unsigned int max_cpu_core_hz,
-				    unsigned int mult, unsigned int div)
+static void __init shmobile_setup_delay_hz(unsigned int max_cpu_core_hz,
+					   unsigned int mult, unsigned int div)
 {
 	/* calculate a worst-case loops-per-jiffy value
 	 * based on maximum cpu core hz setting and the
@@ -40,23 +40,6 @@ void __init shmobile_setup_delay_hz(unsigned int max_cpu_core_hz,
 		preset_lpj = max_cpu_core_hz / value;
 }
 
-void __init shmobile_setup_delay(unsigned int max_cpu_core_mhz,
-				 unsigned int mult, unsigned int div)
-{
-	/* calculate a worst-case loops-per-jiffy value
-	 * based on maximum cpu core mhz setting and the
-	 * __delay() implementation in arch/arm/lib/delay.S
-	 *
-	 * this will result in a longer delay than expected
-	 * when the cpu core runs on lower frequencies.
-	 */
-
-	unsigned int value = (1000000 * mult) / (HZ * div);
-
-	if (!preset_lpj)
-		preset_lpj = max_cpu_core_mhz * value;
-}
-
 void __init shmobile_init_delay(void)
 {
 	struct device_node *np, *cpus;
-- 
2.0.1

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

* [PATCH 07/10] ARM: shmobile: sh73a0: Use shmobile_init_delay()
  2014-08-25  1:10 [GIT PULL] Renesas ARM Based SoC Init Delay Updates For v3.18 Simon Horman
                   ` (5 preceding siblings ...)
  2014-08-25  1:10 ` [PATCH 06/10] ARM: shmobile: Remove shmobile_setup_delay() Simon Horman
@ 2014-08-25  1:10 ` Simon Horman
  2014-08-25  1:10 ` [PATCH 08/10] ARM: shmobile: r8a7778: " Simon Horman
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 15+ messages in thread
From: Simon Horman @ 2014-08-25  1:10 UTC (permalink / raw)
  To: linux-arm-kernel

From: Magnus Damm <damm+renesas@opensource.se>

Adjust the sh73a0 SoC support code to use shmobile_init_delay()
together with CPU Frequency settings from the DTS. Get rid of the
C code version.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
 arch/arm/mach-shmobile/setup-sh73a0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c
index e7a0296..fe29ebb 100644
--- a/arch/arm/mach-shmobile/setup-sh73a0.c
+++ b/arch/arm/mach-shmobile/setup-sh73a0.c
@@ -746,7 +746,7 @@ void __init sh73a0_add_standard_devices(void)
 
 void __init sh73a0_init_delay(void)
 {
-	shmobile_setup_delay(1196, 44, 46); /* Cortex-A9 @ 1196MHz */
+	shmobile_init_delay();
 }
 
 /* do nothing for !CONFIG_SMP or !CONFIG_HAVE_TWD */
-- 
2.0.1

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

* [PATCH 08/10] ARM: shmobile: r8a7778: Use shmobile_init_delay()
  2014-08-25  1:10 [GIT PULL] Renesas ARM Based SoC Init Delay Updates For v3.18 Simon Horman
                   ` (6 preceding siblings ...)
  2014-08-25  1:10 ` [PATCH 07/10] ARM: shmobile: sh73a0: Use shmobile_init_delay() Simon Horman
@ 2014-08-25  1:10 ` Simon Horman
  2014-08-25  1:10 ` [PATCH 09/10] ARM: shmobile: bockw: " Simon Horman
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 15+ messages in thread
From: Simon Horman @ 2014-08-25  1:10 UTC (permalink / raw)
  To: linux-arm-kernel

From: Magnus Damm <damm+renesas@opensource.se>

Adjust the r8a7778 SoC support code to use shmobile_init_delay()
together with CPU Frequency settings from the DTS. Get rid of the
C code version.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
 arch/arm/mach-shmobile/setup-r8a7778.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c
index e1a477b..85fe016 100644
--- a/arch/arm/mach-shmobile/setup-r8a7778.c
+++ b/arch/arm/mach-shmobile/setup-r8a7778.c
@@ -574,7 +574,7 @@ void __init r8a7778_init_irq_extpin(int irlm)
 
 void __init r8a7778_init_delay(void)
 {
-	shmobile_setup_delay(800, 1, 3); /* Cortex-A9 @ 800MHz */
+	shmobile_init_delay();
 }
 
 #ifdef CONFIG_USE_OF
-- 
2.0.1

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

* [GIT PULL] Renesas ARM Based SoC Init Delay Updates For v3.18
@ 2014-08-25  1:10 Simon Horman
  2014-08-25  1:10 ` [PATCH 01/10] ARM: shmobile: sh7372: Update DTS to include CPU frequency Simon Horman
                   ` (11 more replies)
  0 siblings, 12 replies; 15+ messages in thread
From: Simon Horman @ 2014-08-25  1:10 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Olof, Hi Kevin, Hi Arnd,

Please consider these Renesas ARM based SoC init delay updates for v3.18.

This pull request is based on a merge of:

* Renesas ARM Based SoC Boards Updates for v3.18,
  tagged as renesas-boards-for-v3.18,
  which I have previously sent a pull-request for

* Renesas ARM Based SoC Updates for v3.18,
  tagged as renesas-soc-for-v3.18,
  which I have previously sent a pull-request for


The following changes since commit 93acbd2cd2482cb51bec70a1494fddf2c172c073:

  Merge branch 'boards-for-v3.18' into soc-init-delay-for-v3.18.base (2014-08-22 11:31:47 +0900)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-init-delay-for-v3.18

for you to fetch changes up to fc35ca258c079411b64ed94e517eb04e7d89bc44:

  ARM: shmobile: kzm9g: Use shmobile_init_delay() (2014-08-22 11:32:13 +0900)

----------------------------------------------------------------
Renesas ARM Based SoC Init Delay Updates For v3.18

* Use shmobile_init_delay across a wider range of SoCs

----------------------------------------------------------------
Magnus Damm (10):
      ARM: shmobile: sh7372: Update DTS to include CPU frequency
      ARM: shmobile: sh73a0: Update DTS to include CPU frequency
      ARM: shmobile: r8a7778: Update DTS to include CPU frequency
      ARM: shmobile: sh7372: Use shmobile_init_delay()
      ARM: shmobile: r8a73a4: Use shmobile_init_delay()
      ARM: shmobile: Remove shmobile_setup_delay()
      ARM: shmobile: sh73a0: Use shmobile_init_delay()
      ARM: shmobile: r8a7778: Use shmobile_init_delay()
      ARM: shmobile: bockw: Use shmobile_init_delay()
      ARM: shmobile: kzm9g: Use shmobile_init_delay()

 arch/arm/boot/dts/r8a7778.dtsi                 |  6 ++++++
 arch/arm/boot/dts/sh7372.dtsi                  |  1 +
 arch/arm/boot/dts/sh73a0.dtsi                  |  2 ++
 arch/arm/mach-shmobile/board-bockw-reference.c |  2 +-
 arch/arm/mach-shmobile/board-bockw.c           |  2 +-
 arch/arm/mach-shmobile/board-kzm9g-reference.c |  2 +-
 arch/arm/mach-shmobile/common.h                |  2 --
 arch/arm/mach-shmobile/r8a73a4.h               |  1 -
 arch/arm/mach-shmobile/setup-r8a73a4.c         |  9 +--------
 arch/arm/mach-shmobile/setup-r8a7778.c         |  2 +-
 arch/arm/mach-shmobile/setup-sh7372.c          |  2 +-
 arch/arm/mach-shmobile/setup-sh73a0.c          |  2 +-
 arch/arm/mach-shmobile/timer.c                 | 21 ++-------------------
 13 files changed, 18 insertions(+), 36 deletions(-)

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

* [PATCH 09/10] ARM: shmobile: bockw: Use shmobile_init_delay()
  2014-08-25  1:10 [GIT PULL] Renesas ARM Based SoC Init Delay Updates For v3.18 Simon Horman
                   ` (7 preceding siblings ...)
  2014-08-25  1:10 ` [PATCH 08/10] ARM: shmobile: r8a7778: " Simon Horman
@ 2014-08-25  1:10 ` Simon Horman
  2014-08-25  1:10 ` [PATCH 10/10] ARM: shmobile: kzm9g: " Simon Horman
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 15+ messages in thread
From: Simon Horman @ 2014-08-25  1:10 UTC (permalink / raw)
  To: linux-arm-kernel

From: Magnus Damm <damm+renesas@opensource.se>

Adjust the BockW board support code to use shmobile_init_delay()
together with CPU Frequency settings from the DTS.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
 arch/arm/mach-shmobile/board-bockw-reference.c | 2 +-
 arch/arm/mach-shmobile/board-bockw.c           | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-shmobile/board-bockw-reference.c b/arch/arm/mach-shmobile/board-bockw-reference.c
index 9202f16..79c4784 100644
--- a/arch/arm/mach-shmobile/board-bockw-reference.c
+++ b/arch/arm/mach-shmobile/board-bockw-reference.c
@@ -80,7 +80,7 @@ static const char *bockw_boards_compat_dt[] __initdata = {
 };
 
 DT_MACHINE_START(BOCKW_DT, "bockw")
-	.init_early	= r8a7778_init_delay,
+	.init_early	= shmobile_init_delay,
 	.init_irq	= r8a7778_init_irq_dt,
 	.init_machine	= bockw_init,
 	.init_late	= shmobile_init_late,
diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c
index 8a83eb3..1cf2c75 100644
--- a/arch/arm/mach-shmobile/board-bockw.c
+++ b/arch/arm/mach-shmobile/board-bockw.c
@@ -733,7 +733,7 @@ static const char *bockw_boards_compat_dt[] __initdata = {
 };
 
 DT_MACHINE_START(BOCKW_DT, "bockw")
-	.init_early	= r8a7778_init_delay,
+	.init_early	= shmobile_init_delay,
 	.init_irq	= r8a7778_init_irq_dt,
 	.init_machine	= bockw_init,
 	.dt_compat	= bockw_boards_compat_dt,
-- 
2.0.1

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

* [PATCH 10/10] ARM: shmobile: kzm9g: Use shmobile_init_delay()
  2014-08-25  1:10 [GIT PULL] Renesas ARM Based SoC Init Delay Updates For v3.18 Simon Horman
                   ` (8 preceding siblings ...)
  2014-08-25  1:10 ` [PATCH 09/10] ARM: shmobile: bockw: " Simon Horman
@ 2014-08-25  1:10 ` Simon Horman
  2014-09-05 15:27 ` [GIT PULL] Renesas ARM Based SoC Init Delay Updates For v3.18 Arnd Bergmann
  2014-09-05 16:13 ` Arnd Bergmann
  11 siblings, 0 replies; 15+ messages in thread
From: Simon Horman @ 2014-08-25  1:10 UTC (permalink / raw)
  To: linux-arm-kernel

From: Magnus Damm <damm+renesas@opensource.se>

Adjust the KZM9G board support code to use shmobile_init_delay()
together with CPU Frequency settings from the DTS.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
 arch/arm/mach-shmobile/board-kzm9g-reference.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-shmobile/board-kzm9g-reference.c b/arch/arm/mach-shmobile/board-kzm9g-reference.c
index 1694a16..d9cdf9a 100644
--- a/arch/arm/mach-shmobile/board-kzm9g-reference.c
+++ b/arch/arm/mach-shmobile/board-kzm9g-reference.c
@@ -51,7 +51,7 @@ static const char *kzm9g_boards_compat_dt[] __initdata = {
 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	= shmobile_init_delay,
 	.init_machine	= kzm_init,
 	.init_late	= shmobile_init_late,
 	.dt_compat	= kzm9g_boards_compat_dt,
-- 
2.0.1

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

* [GIT PULL] Renesas ARM Based SoC Init Delay Updates For v3.18
  2014-08-25  1:10 [GIT PULL] Renesas ARM Based SoC Init Delay Updates For v3.18 Simon Horman
                   ` (9 preceding siblings ...)
  2014-08-25  1:10 ` [PATCH 10/10] ARM: shmobile: kzm9g: " Simon Horman
@ 2014-09-05 15:27 ` Arnd Bergmann
  2014-09-09  2:02   ` Simon Horman
  2014-09-05 16:13 ` Arnd Bergmann
  11 siblings, 1 reply; 15+ messages in thread
From: Arnd Bergmann @ 2014-09-05 15:27 UTC (permalink / raw)
  To: linux-arm-kernel

On Monday 25 August 2014, Simon Horman wrote:
> Hi Olof, Hi Kevin, Hi Arnd,
> 
> Please consider these Renesas ARM based SoC init delay updates for v3.18.
> 

While looking at your branches, I noticed that you go to great lengths
to compute the correct lpj value and avoid the calibration.

However, I believe the "modern" way to do this is to call
register_current_timer_delay() in order to base the delay loop
on the hardware timer instead of looping in the CPU. This is
more accurate and more robust against CPU frequency scaling.

I'm applying the patches now, but it's something you may want
to look at in the future. On a related topic, your clocksource
drivers could be simplified for the DT-only case by using
CLOCKSOURCE_OF_DECLARE() instead of early_platform_init(), but
I don't know what the impact would be for the arch/sh and legacy
mach-shmobile cases.

	Arnd

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

* [GIT PULL] Renesas ARM Based SoC Init Delay Updates For v3.18
  2014-08-25  1:10 [GIT PULL] Renesas ARM Based SoC Init Delay Updates For v3.18 Simon Horman
                   ` (10 preceding siblings ...)
  2014-09-05 15:27 ` [GIT PULL] Renesas ARM Based SoC Init Delay Updates For v3.18 Arnd Bergmann
@ 2014-09-05 16:13 ` Arnd Bergmann
  11 siblings, 0 replies; 15+ messages in thread
From: Arnd Bergmann @ 2014-09-05 16:13 UTC (permalink / raw)
  To: linux-arm-kernel

On Monday 25 August 2014, Simon Horman wrote:
> Hi Olof, Hi Kevin, Hi Arnd,
> 
> Please consider these Renesas ARM based SoC init delay updates for v3.18.
> 
> This pull request is based on a merge of:
> 
> * Renesas ARM Based SoC Boards Updates for v3.18,
>   tagged as renesas-boards-for-v3.18,
>   which I have previously sent a pull-request for
> 
> * Renesas ARM Based SoC Updates for v3.18,
>   tagged as renesas-soc-for-v3.18,
>   which I have previously sent a pull-request for
> 

I merged it all into next/soc now, which means that next/boards has a duplicate copy.
If we don't get anything else for boards, we probably won't bother sending that.

	Arnd

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

* [GIT PULL] Renesas ARM Based SoC Init Delay Updates For v3.18
  2014-09-05 15:27 ` [GIT PULL] Renesas ARM Based SoC Init Delay Updates For v3.18 Arnd Bergmann
@ 2014-09-09  2:02   ` Simon Horman
  2014-09-09  8:50     ` Arnd Bergmann
  0 siblings, 1 reply; 15+ messages in thread
From: Simon Horman @ 2014-09-09  2:02 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Sep 05, 2014 at 05:27:18PM +0200, Arnd Bergmann wrote:
> On Monday 25 August 2014, Simon Horman wrote:
> > Hi Olof, Hi Kevin, Hi Arnd,
> > 
> > Please consider these Renesas ARM based SoC init delay updates for v3.18.
> > 
> 
> While looking at your branches, I noticed that you go to great lengths
> to compute the correct lpj value and avoid the calibration.
> 
> However, I believe the "modern" way to do this is to call
> register_current_timer_delay() in order to base the delay loop
> on the hardware timer instead of looping in the CPU. This is
> more accurate and more robust against CPU frequency scaling.

I may be wrong but my understanding is that Renesas SoCs may be
booted without a timer.

> I'm applying the patches now, but it's something you may want
> to look at in the future. On a related topic, your clocksource
> drivers could be simplified for the DT-only case by using
> CLOCKSOURCE_OF_DECLARE() instead of early_platform_init(), but
> I don't know what the impact would be for the arch/sh and legacy
> mach-shmobile cases.

Thanks, I will have that looked into.

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

* [GIT PULL] Renesas ARM Based SoC Init Delay Updates For v3.18
  2014-09-09  2:02   ` Simon Horman
@ 2014-09-09  8:50     ` Arnd Bergmann
  0 siblings, 0 replies; 15+ messages in thread
From: Arnd Bergmann @ 2014-09-09  8:50 UTC (permalink / raw)
  To: linux-arm-kernel

On Tuesday 09 September 2014 11:02:18 Simon Horman wrote:
> On Fri, Sep 05, 2014 at 05:27:18PM +0200, Arnd Bergmann wrote:
> > On Monday 25 August 2014, Simon Horman wrote:
> > > Hi Olof, Hi Kevin, Hi Arnd,
> > > 
> > > Please consider these Renesas ARM based SoC init delay updates for v3.18.
> > > 
> > 
> > While looking at your branches, I noticed that you go to great lengths
> > to compute the correct lpj value and avoid the calibration.
> > 
> > However, I believe the "modern" way to do this is to call
> > register_current_timer_delay() in order to base the delay loop
> > on the hardware timer instead of looping in the CPU. This is
> > more accurate and more robust against CPU frequency scaling.
> 
> I may be wrong but my understanding is that Renesas SoCs may be
> booted without a timer.

Do you mean some of them only have a clockevent driver but no clocksource,
and use the jiffies clocksource instead?

I've looked at the three drivers/clocksource/{sh,em}_*.c files, and it seems
sh_mtu2.c indeed has no clocksource support, although the binding description
mentions that it has multiple counters that could be used for this
purpose. This timer is only used on R7S72100, so if you add
'register_current_timer_delay' calls to the other drivers, you can
decide to either keep computing the lpj value for R7S72100 but not the
others, or try to add a clocksource implementation to mtu2 as well.

Note that the read_current_timer() function for the delay implementation
doesn't have to be based on the same timer as the clocksource, but in
practice it often is.

	Arnd

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

end of thread, other threads:[~2014-09-09  8:50 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-25  1:10 [GIT PULL] Renesas ARM Based SoC Init Delay Updates For v3.18 Simon Horman
2014-08-25  1:10 ` [PATCH 01/10] ARM: shmobile: sh7372: Update DTS to include CPU frequency Simon Horman
2014-08-25  1:10 ` [PATCH 02/10] ARM: shmobile: sh73a0: " Simon Horman
2014-08-25  1:10 ` [PATCH 03/10] ARM: shmobile: r8a7778: " Simon Horman
2014-08-25  1:10 ` [PATCH 04/10] ARM: shmobile: sh7372: Use shmobile_init_delay() Simon Horman
2014-08-25  1:10 ` [PATCH 05/10] ARM: shmobile: r8a73a4: " Simon Horman
2014-08-25  1:10 ` [PATCH 06/10] ARM: shmobile: Remove shmobile_setup_delay() Simon Horman
2014-08-25  1:10 ` [PATCH 07/10] ARM: shmobile: sh73a0: Use shmobile_init_delay() Simon Horman
2014-08-25  1:10 ` [PATCH 08/10] ARM: shmobile: r8a7778: " Simon Horman
2014-08-25  1:10 ` [PATCH 09/10] ARM: shmobile: bockw: " Simon Horman
2014-08-25  1:10 ` [PATCH 10/10] ARM: shmobile: kzm9g: " Simon Horman
2014-09-05 15:27 ` [GIT PULL] Renesas ARM Based SoC Init Delay Updates For v3.18 Arnd Bergmann
2014-09-09  2:02   ` Simon Horman
2014-09-09  8:50     ` Arnd Bergmann
2014-09-05 16:13 ` Arnd Bergmann

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).