Skip to contentSkip to conversation

ARM: shmobile: Rework ->init_time() / shmobile_timer_init()

PATCH New Magnus Damm 3 participants 18 messages Jul 31, 2013 – Aug 6, 2013

Subsystems (4)
lore
Share & tools
lore

Magnus Damm

author maintainer
#0 lore raw

cover ARM: shmobile: Rework ->init_time() / shmobile_timer_init()

ARM: shmobile: Rework ->init_time() / shmobile_timer_init()

[PATCH 01/13] ARM: shmobile: Use default ->init_time() on r8a73a4 [PATCH 02/13] ARM: shmobile: Use default ->init_time() on r8a7740 [PATCH 03/13] ARM: shmobile: Use default ->init_time() on r8a7778 [PATCH 04/13] ARM: shmobile: Use default ->init_time() on r8a7779 [PATCH 05/13] ARM: shmobile: Use default ->init_time() on Bockw [PATCH 06/13] ARM: shmobile: Use default ->init_time() on Bockw DT ref [PATCH 07/13] ARM: shmobile: Use default ->init_time() on Armadillo DT ref [PATCH 08/13] ARM: shmobile: Use default ->init_time() on APE6EVM [PATCH 09/13] ARM: shmobile: Use default ->init_time() on APE6EVM DT ref [PATCH 10/13] ARM: shmobile: Use default ->init_time() on Marzen DT ref [PATCH 11/13] ARM: shmobile: Use default ->init_time() on KZM9G DT ref [PATCH 12/13] ARM: shmobile: Use clocksource_of_init() on r8a7790 [PATCH 13/13] ARM: shmobile: Remove unused shmobile_init_time()

Set ->init_time() to NULL to use the default ARM behaviour which happens to be clocksource_of_init(). Also, replace the call to shmobile_time_init() with clocksource_of_init(). Finally, remove shmobile_init_time() that now is unused.

---

Written against renesas.git renesas-devel-20130731 and [PATCH 00/07] ARM: shmobile: sh73a0, r8a7779 and emev2 SMP SCU rework [PATCH 00/02] ARM: shmobile: Per-CPU SMP boot / sleep code

 arch/arm/mach-shmobile/board-ape6evm-reference.c         |    1 -
 arch/arm/mach-shmobile/board-ape6evm.c                   |    1 -
 arch/arm/mach-shmobile/board-armadillo800eva-reference.c |    1 -
 arch/arm/mach-shmobile/board-bockw-reference.c           |    1 -
 arch/arm/mach-shmobile/board-bockw.c                     |    1 -
 arch/arm/mach-shmobile/board-kzm9g-reference.c           |    1 -
 arch/arm/mach-shmobile/board-marzen-reference.c          |    1 -
 arch/arm/mach-shmobile/include/mach/common.h             |    1 -
 arch/arm/mach-shmobile/setup-r8a73a4.c                   |    1 -
 arch/arm/mach-shmobile/setup-r8a7740.c                   |    1 -
 arch/arm/mach-shmobile/setup-r8a7778.c                   |    1 -
 arch/arm/mach-shmobile/setup-r8a7779.c                   |    1 -
 arch/arm/mach-shmobile/setup-r8a7790.c                   |    2 +-
 arch/arm/mach-shmobile/timer.c                           |    4 ----
 14 files changed, 1 insertion(+), 17 deletions(-)
author maintainer
#1 lore raw

PATCH 1/13 ARM: shmobile: Use default ->init_time() on r8a73a4

From: Magnus Damm <[email protected]>

Leave ->init_time() set to NULL to use the default ARM behaviour.

---

 arch/arm/mach-shmobile/setup-r8a73a4.c |    1 -
 1 file changed, 1 deletion(-)
arch/arm/mach-shmobile/setup-r8a73a4.c +0 -1
@@ -223,7 +223,6 @@ static const char *r8a73a4_boards_compat
 
 DT_MACHINE_START(R8A73A4_DT, "Generic R8A73A4 (Flattened Device Tree)")
 	.init_early	= r8a73a4_init_delay,
-	.init_time	= shmobile_timer_init,
 	.dt_compat	= r8a73a4_boards_compat_dt,
 MACHINE_END
 #endif /* CONFIG_USE_OF */
author maintainer
#2 lore raw

PATCH 2/13 ARM: shmobile: Use default ->init_time() on r8a7740

In reply to Magnus Damm

From: Magnus Damm <[email protected]>

Leave ->init_time() set to NULL to use the default ARM behaviour.

---

 arch/arm/mach-shmobile/setup-r8a7740.c |    1 -
 1 file changed, 1 deletion(-)
arch/arm/mach-shmobile/setup-r8a7740.c +0 -1
@@ -1035,7 +1035,6 @@ DT_MACHINE_START(R8A7740_DT, "Generic R8
 	.init_early	= r8a7740_init_delay,
 	.init_irq	= r8a7740_init_irq_of,
 	.init_machine	= r8a7740_generic_init,
-	.init_time	= shmobile_timer_init,
 	.dt_compat	= r8a7740_boards_compat_dt,
 MACHINE_END
 
author maintainer
#3 lore raw

PATCH 3/13 ARM: shmobile: Use default ->init_time() on r8a7778

In reply to Magnus Damm

From: Magnus Damm <[email protected]>

Leave ->init_time() set to NULL to use the default ARM behaviour.

---

 arch/arm/mach-shmobile/setup-r8a7778.c |    1 -
 1 file changed, 1 deletion(-)
arch/arm/mach-shmobile/setup-r8a7778.c +0 -1
@@ -406,7 +406,6 @@ static const char *r8a7778_compat_dt[] _
 DT_MACHINE_START(R8A7778_DT, "Generic R8A7778 (Flattened Device Tree)")
 	.init_early	= r8a7778_init_delay,
 	.init_irq	= r8a7778_init_irq_dt,
-	.init_time	= shmobile_timer_init,
 	.dt_compat	= r8a7778_compat_dt,
 	.init_late      = r8a7778_init_late,
 MACHINE_END
author maintainer
#4 lore raw

PATCH 4/13 ARM: shmobile: Use default ->init_time() on r8a7779

In reply to Magnus Damm

From: Magnus Damm <[email protected]>

Leave ->init_time() set to NULL to use the default ARM behaviour.

---

 arch/arm/mach-shmobile/setup-r8a7779.c |    1 -
 1 file changed, 1 deletion(-)
arch/arm/mach-shmobile/setup-r8a7779.c +0 -1
@@ -667,7 +667,6 @@ DT_MACHINE_START(R8A7779_DT, "Generic R8
 	.nr_irqs	= NR_IRQS_LEGACY,
 	.init_irq	= r8a7779_init_irq_dt,
 	.init_machine	= r8a7779_add_standard_devices_dt,
-	.init_time	= shmobile_timer_init,
 	.init_late	= r8a7779_init_late,
 	.dt_compat	= r8a7779_compat_dt,
 MACHINE_END
author maintainer
#5 lore raw

PATCH 5/13 ARM: shmobile: Use default ->init_time() on Bockw

In reply to Magnus Damm

From: Magnus Damm <[email protected]>

Leave ->init_time() set to NULL to use the default ARM behaviour.

---

 arch/arm/mach-shmobile/board-bockw.c |    1 -
 1 file changed, 1 deletion(-)
arch/arm/mach-shmobile/board-bockw.c +0 -1
@@ -279,7 +279,6 @@ DT_MACHINE_START(BOCKW_DT, "bockw")
 	.init_early	= r8a7778_init_delay,
 	.init_irq	= r8a7778_init_irq_dt,
 	.init_machine	= bockw_init,
-	.init_time	= shmobile_timer_init,
 	.dt_compat	= bockw_boards_compat_dt,
 	.init_late      = r8a7778_init_late,
 MACHINE_END
author maintainer
#6 lore raw

PATCH 6/13 ARM: shmobile: Use default ->init_time() on Bockw DT ref

In reply to Magnus Damm

From: Magnus Damm <[email protected]>

Leave ->init_time() set to NULL to use the default ARM behaviour.

---

 arch/arm/mach-shmobile/board-bockw-reference.c |    1 -
 1 file changed, 1 deletion(-)
arch/arm/mach-shmobile/board-bockw-reference.c +0 -1
@@ -57,6 +57,5 @@ DT_MACHINE_START(BOCKW_DT, "bockw")
 	.init_early	= r8a7778_init_delay,
 	.init_irq	= r8a7778_init_irq_dt,
 	.init_machine	= bockw_init,
-	.init_time	= shmobile_timer_init,
 	.dt_compat	= bockw_boards_compat_dt,
 MACHINE_END
author maintainer
#7 lore raw

PATCH 7/13 ARM: shmobile: Use default ->init_time() on Armadillo DT ref

In reply to Magnus Damm

From: Magnus Damm <[email protected]>

Leave ->init_time() set to NULL to use the default ARM behaviour.

---

 arch/arm/mach-shmobile/board-armadillo800eva-reference.c |    1 -
 1 file changed, 1 deletion(-)
arch/arm/mach-shmobile/board-armadillo800eva-reference.c +0 -1
@@ -190,7 +190,6 @@ DT_MACHINE_START(ARMADILLO800EVA_DT, "ar
 	.init_early	= r8a7740_init_delay,
 	.init_irq	= r8a7740_init_irq_of,
 	.init_machine	= eva_init,
-	.init_time	= shmobile_timer_init,
 	.init_late	= shmobile_init_late,
 	.dt_compat	= eva_boards_compat_dt,
 	.restart	= eva_restart,
author maintainer
#8 lore raw

PATCH 8/13 ARM: shmobile: Use default ->init_time() on APE6EVM

In reply to Magnus Damm

From: Magnus Damm <[email protected]>

Leave ->init_time() set to NULL to use the default ARM behaviour.

---

 arch/arm/mach-shmobile/board-ape6evm.c |    1 -
 1 file changed, 1 deletion(-)
arch/arm/mach-shmobile/board-ape6evm.c +0 -1
@@ -181,7 +181,6 @@ static const char *ape6evm_boards_compat
 
 DT_MACHINE_START(APE6EVM_DT, "ape6evm")
 	.init_early	= r8a73a4_init_delay,
-	.init_time	= shmobile_timer_init,
 	.init_machine	= ape6evm_add_standard_devices,
 	.dt_compat	= ape6evm_boards_compat_dt,
 MACHINE_END
author maintainer
#9 lore raw

PATCH 9/13 ARM: shmobile: Use default ->init_time() on APE6EVM DT ref

In reply to Magnus Damm

From: Magnus Damm <[email protected]>

Leave ->init_time() set to NULL to use the default ARM behaviour.

---

 arch/arm/mach-shmobile/board-ape6evm-reference.c |    1 -
 1 file changed, 1 deletion(-)
arch/arm/mach-shmobile/board-ape6evm-reference.c +0 -1
@@ -58,7 +58,6 @@ static const char *ape6evm_boards_compat
 
 DT_MACHINE_START(APE6EVM_DT, "ape6evm")
 	.init_early	= r8a73a4_init_delay,
-	.init_time	= shmobile_timer_init,
 	.init_machine	= ape6evm_add_standard_devices,
 	.dt_compat	= ape6evm_boards_compat_dt,
 MACHINE_END
author maintainer
#10 lore raw

PATCH 10/13 ARM: shmobile: Use default ->init_time() on Marzen DT ref

In reply to Magnus Damm

From: Magnus Damm <[email protected]>

Leave ->init_time() set to NULL to use the default ARM behaviour.

---

 arch/arm/mach-shmobile/board-marzen-reference.c |    1 -
 1 file changed, 1 deletion(-)
arch/arm/mach-shmobile/board-marzen-reference.c +0 -1
@@ -42,6 +42,5 @@ DT_MACHINE_START(MARZEN, "marzen")
 	.nr_irqs	= NR_IRQS_LEGACY,
 	.init_irq	= r8a7779_init_irq_dt,
 	.init_machine	= marzen_init,
-	.init_time	= shmobile_timer_init,
 	.dt_compat	= marzen_boards_compat_dt,
 MACHINE_END
author maintainer
#11 lore raw

PATCH 11/13 ARM: shmobile: Use default ->init_time() on KZM9G DT ref

In reply to Magnus Damm

From: Magnus Damm <[email protected]>

Leave ->init_time() set to NULL to use the default ARM behaviour.

---

 arch/arm/mach-shmobile/board-kzm9g-reference.c |    1 -
 1 file changed, 1 deletion(-)
arch/arm/mach-shmobile/board-kzm9g-reference.c +0 -1
@@ -52,6 +52,5 @@ DT_MACHINE_START(KZM9G_DT, "kzm9g-refere
 	.init_early	= sh73a0_init_delay,
 	.nr_irqs	= NR_IRQS_LEGACY,
 	.init_machine	= kzm_init,
-	.init_time	= shmobile_timer_init,
 	.dt_compat	= kzm9g_boards_compat_dt,
 MACHINE_END
author maintainer
#12 lore raw

PATCH 12/13 ARM: shmobile: Use clocksource_of_init() on r8a7790

In reply to Magnus Damm

From: Magnus Damm <[email protected]>

Replace the call to shmobile_timer_init() with
clocksource_of_init(). This will allow us to
get rid of shmobile_timer_init().

---

 arch/arm/mach-shmobile/setup-r8a7790.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-shmobile/setup-r8a7790.c +1 -1
@@ -263,7 +263,7 @@ void __init r8a7790_timer_init(void)
 	iounmap(base);
 #endif /* CONFIG_ARM_ARCH_TIMER */
 
-	shmobile_timer_init();
+	clocksource_of_init();
 }
 
 void __init r8a7790_init_delay(void)
author maintainer
#15 lore raw

PATCH 13/13 ARM: shmobile: Remove unused shmobile_init_time()

In reply to Magnus Damm

From: Magnus Damm <[email protected]>

Remove shmobile_timer_init() since it now is unused.

---

 arch/arm/mach-shmobile/include/mach/common.h |    1 -
 arch/arm/mach-shmobile/timer.c               |    4 ----
 2 files changed, 5 deletions(-)
arch/arm/mach-shmobile/include/mach/common.h +0 -1
@@ -2,7 +2,6 @@
 #define __ARCH_MACH_COMMON_H
 
 extern void shmobile_earlytimer_init(void);
-extern void shmobile_timer_init(void);
 extern void shmobile_setup_delay(unsigned int max_cpu_core_mhz,
 			 unsigned int mult, unsigned int div);
 struct twd_local_timer;
arch/arm/mach-shmobile/timer.c +0 -4
@@ -59,7 +59,3 @@ void __init shmobile_earlytimer_init(voi
 	late_time_init = shmobile_late_time_init;
 }
 
-void __init shmobile_timer_init(void)
-{
-	clocksource_of_init();
-}
#16 lore raw

cover ARM: shmobile: Rework ->init_time() / shmobile_timer_init()

In reply to Magnus Damm

Hi

Quoted 5 lines

[PATCH 01/13] ARM: shmobile: Use default ->init_time() on r8a73a4 [PATCH 02/13] ARM: shmobile: Use default ->init_time() on r8a7740 [PATCH 03/13] ARM: shmobile: Use default ->init_time() on r8a7778 [PATCH 04/13] ARM: shmobile: Use default ->init_time() on r8a7779 [PATCH 05/13] ARM: shmobile: Use default ->init_time() on Bockw

Quoted 8 lines

[PATCH 06/13] ARM: shmobile: Use default ->init_time() on Bockw DT ref [PATCH 07/13] ARM: shmobile: Use default ->init_time() on Armadillo DT ref [PATCH 08/13] ARM: shmobile: Use default ->init_time() on APE6EVM [PATCH 09/13] ARM: shmobile: Use default ->init_time() on APE6EVM DT ref [PATCH 10/13] ARM: shmobile: Use default ->init_time() on Marzen DT ref [PATCH 11/13] ARM: shmobile: Use default ->init_time() on KZM9G DT ref [PATCH 12/13] ARM: shmobile: Use clocksource_of_init() on r8a7790 [PATCH 13/13] ARM: shmobile: Remove unused shmobile_init_time()

For all patches

#17 lore raw

cover ARM: shmobile: Rework ->init_time() / shmobile_timer_init()

In reply to Magnus Damm
Quoted 16 lines · Magnus Damm

ARM: shmobile: Rework ->init_time() / shmobile_timer_init()

[PATCH 01/13] ARM: shmobile: Use default ->init_time() on r8a73a4 [PATCH 02/13] ARM: shmobile: Use default ->init_time() on r8a7740 [PATCH 03/13] ARM: shmobile: Use default ->init_time() on r8a7778 [PATCH 04/13] ARM: shmobile: Use default ->init_time() on r8a7779 [PATCH 05/13] ARM: shmobile: Use default ->init_time() on Bockw [PATCH 06/13] ARM: shmobile: Use default ->init_time() on Bockw DT ref [PATCH 07/13] ARM: shmobile: Use default ->init_time() on Armadillo DT ref [PATCH 08/13] ARM: shmobile: Use default ->init_time() on APE6EVM [PATCH 09/13] ARM: shmobile: Use default ->init_time() on APE6EVM DT ref [PATCH 10/13] ARM: shmobile: Use default ->init_time() on Marzen DT ref [PATCH 11/13] ARM: shmobile: Use default ->init_time() on KZM9G DT ref [PATCH 12/13] ARM: shmobile: Use clocksource_of_init() on r8a7790 [PATCH 13/13] ARM: shmobile: Remove unused shmobile_init_time()

Quoted 6 lines

Set ->init_time() to NULL to use the default ARM behaviour which happens to be clocksource_of_init(). Also, replace the call to shmobile_time_init() with clocksource_of_init(). Finally, remove shmobile_init_time() that now is unused.

Thanks, I will queue these up for v3.12 in the cleanup3 branch.

#13 lore raw

PATCH 12/13 ARM: shmobile: Use clocksource_of_init() on r8a7790

In reply to Magnus Damm
Quoted 15 lines · Magnus Damm

From: Magnus Damm <[email protected]>

Replace the call to shmobile_timer_init() with
clocksource_of_init(). This will allow us to
get rid of shmobile_timer_init().

---

 arch/arm/mach-shmobile/setup-r8a7790.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

arch/arm/mach-shmobile/setup-r8a7790.c void __init r8a7790_timer_init(void) · line 269

Quoted 8 lines
arch/arm/mach-shmobile/setup-r8a7790.c +1 -1
@@ -263,7 +263,7 @@ void __init r8a7790_timer_init(void)
 	iounmap(base);
 #endif /* CONFIG_ARM_ARCH_TIMER */
 
-	shmobile_timer_init();
+	clocksource_of_init();
 }
 
 void __init r8a7790_init_delay(void)

I seem to need the following:

arch/arm/mach-shmobile/setup-r8a7790.c +1 -0
index 7301255..d0f5c9f 100644
@@ -18,6 +18,7 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <linux/clocksource.h>
 #include <linux/irq.h>
 #include <linux/kernel.h>
 #include <linux/of_platform.h>

To avoid:

...
CC arch/arm/mach-shmobile/setup-r8a7790.o
arch/arm/mach-shmobile/setup-r8a7790.c: In function ?r8a7790_timer_init?:
arch/arm/mach-shmobile/setup-r8a7790.c:266:2: error: implicit declaration of function ?clocksource_of_init? [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[1]: *** [arch/arm/mach-shmobile/setup-r8a7790.o] Error 1

#14 lore raw

PATCH 12/13 ARM: shmobile: Use clocksource_of_init() on r8a7790

Quoted 41 lines · Simon Horman
Quoted 15 lines · Magnus Damm

From: Magnus Damm <[email protected]>

Replace the call to shmobile_timer_init() with
clocksource_of_init(). This will allow us to
get rid of shmobile_timer_init().

---

 arch/arm/mach-shmobile/setup-r8a7790.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

arch/arm/mach-shmobile/setup-r8a7790.c void __init r8a7790_timer_init(void) · line 269

Quoted 8 lines
arch/arm/mach-shmobile/setup-r8a7790.c +1 -1
@@ -263,7 +263,7 @@ void __init r8a7790_timer_init(void)
 	iounmap(base);
 #endif /* CONFIG_ARM_ARCH_TIMER */
 
-	shmobile_timer_init();
+	clocksource_of_init();
 }
 
 void __init r8a7790_init_delay(void)

I seem to need the following:

arch/arm/mach-shmobile/setup-r8a7790.c +1 -0
index 7301255..d0f5c9f 100644
@@ -18,6 +18,7 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <linux/clocksource.h>
 #include <linux/irq.h>
 #include <linux/kernel.h>
 #include <linux/of_platform.h>
Quoted 8 lines

To avoid:

...
CC arch/arm/mach-shmobile/setup-r8a7790.o
arch/arm/mach-shmobile/setup-r8a7790.c: In function ?r8a7790_timer_init?:
arch/arm/mach-shmobile/setup-r8a7790.c:266:2: error: implicit declaration of function ?clocksource_of_init? [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[1]: *** [arch/arm/mach-shmobile/setup-r8a7790.o] Error 1

As discussed off-line, I have squashed the above change into your patch.

The result, which I plan to push shortly, is as follows:

From: Magnus Damm <[email protected]>

ARM: shmobile: Use clocksource_of_init() on r8a7790

Replace the call to shmobile_timer_init() with
clocksource_of_init(). This will allow us to
get rid of shmobile_timer_init().

[horms+renesas at verge.net.au: include linux/clocksource.h]
---
 arch/arm/mach-shmobile/setup-r8a7790.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/mach-shmobile/setup-r8a7790.c +2 -1
index 86cf507..6d4aa04 100644
@@ -18,6 +18,7 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <linux/clocksource.h>
 #include <linux/irq.h>
 #include <linux/kernel.h>
 #include <linux/of_platform.h>
@@ -263,7 +264,7 @@ void __init r8a7790_timer_init(void)
 	iounmap(base);
 #endif /* CONFIG_ARM_ARCH_TIMER */
 
-	shmobile_timer_init();
+	clocksource_of_init();
 }
 
 void __init r8a7790_init_delay(void)
Signature · 1 line
1.8.3.2