--- /dev/null
+From horms@vergenet.net Tue May 29 17:45:19 2012
+From: Simon Horman <horms@verge.net.au>
+Date: Wed, 30 May 2012 09:45:07 +0900
+Subject: [PATCH] ARM: mach-shmobile: sh7372, AP4EVB and Mackerel timer rework
+To: ltsi-dev@lists.linuxfoundation.org
+Cc: Greg KH <gregkh@linuxfoundation.org>, Magnus Damm <magnus.damm@gmail.com>, Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>, Simon Horman <horms@verge.net.au>
+Message-ID: <1338338707-29333-2-git-send-email-horms@verge.net.au>
+
+
+From: Magnus Damm <damm@opensource.se>
+
+Move the SoC specific timer code from AP4EVB and Mackerel
+to sh7372 setup code. This makes is possible to share
+the SoC specific timer code across boards and it also
+removes the need for a board specific timer structure.
+
+Signed-off-by: Magnus Damm <damm@opensource.se>
+Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
+(cherry picked from commit 17254bffd6e4fda97d825acec153614f09bb33e7)
+
+Conflicts:
+
+ arch/arm/mach-shmobile/board-ap4evb.c
+ arch/arm/mach-shmobile/board-mackerel.c
+ arch/arm/mach-shmobile/setup-sh7372.c
+
+Signed-off-by: Simon Horman <horms@verge.net.au>
+---
+ arch/arm/mach-shmobile/setup-sh7372.c | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c
+index 8ddef91..42d9619 100644
+--- a/arch/arm/mach-shmobile/setup-sh7372.c
++++ b/arch/arm/mach-shmobile/setup-sh7372.c
+@@ -32,8 +32,10 @@
+ #include <linux/sh_timer.h>
+ #include <mach/hardware.h>
+ #include <mach/sh7372.h>
++#include <mach/common.h>
+ #include <asm/mach-types.h>
+ #include <asm/mach/arch.h>
++#include <asm/mach/time.h>
+
+ /* SCIFA0 */
+ static struct plat_sci_port scif0_platform_data = {
+@@ -848,8 +850,17 @@ void __init sh7372_add_standard_devices(void)
+ ARRAY_SIZE(sh7372_late_devices));
+ }
+
++static void __init sh7372_earlytimer_init(void)
++{
++ sh7372_clock_init();
++ shmobile_earlytimer_init();
++}
++
+ void __init sh7372_add_early_devices(void)
+ {
+ early_platform_add_devices(sh7372_early_devices,
+ ARRAY_SIZE(sh7372_early_devices));
++
++ /* override timer setup with soc-specific code */
++ shmobile_timer.init = sh7372_earlytimer_init;
+ }
+--
+1.7.10.2.484.gcd07cc5
+
Signed-off-by: Simon Horman <horms@verge.net.au>
---
- arch/arm/mach-shmobile/setup-sh7372.c | 6 +++---
- arch/arm/mach-shmobile/setup-sh73a0.c | 2 +-
+ arch/arm/mach-shmobile/setup-sh7372.c | 6 +++---
+ arch/arm/mach-shmobile/setup-sh73a0.c | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
-diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c
-index cd807ee..8ddef91 100644
--- a/arch/arm/mach-shmobile/setup-sh7372.c
+++ b/arch/arm/mach-shmobile/setup-sh7372.c
-@@ -503,7 +503,7 @@ static struct resource sh7372_dmae0_resources[] = {
+@@ -505,7 +505,7 @@ static struct resource sh7372_dmae0_reso
.flags = IORESOURCE_MEM,
},
{
.start = evt2irq(0x20c0),
.end = evt2irq(0x20c0),
.flags = IORESOURCE_IRQ,
-@@ -531,7 +531,7 @@ static struct resource sh7372_dmae1_resources[] = {
+@@ -533,7 +533,7 @@ static struct resource sh7372_dmae1_reso
.flags = IORESOURCE_MEM,
},
{
.start = evt2irq(0x21c0),
.end = evt2irq(0x21c0),
.flags = IORESOURCE_IRQ,
-@@ -559,7 +559,7 @@ static struct resource sh7372_dmae2_resources[] = {
+@@ -561,7 +561,7 @@ static struct resource sh7372_dmae2_reso
.flags = IORESOURCE_MEM,
},
{
.start = evt2irq(0x22c0),
.end = evt2irq(0x22c0),
.flags = IORESOURCE_IRQ,
-diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c
-index e46821c..20e71e5 100644
--- a/arch/arm/mach-shmobile/setup-sh73a0.c
+++ b/arch/arm/mach-shmobile/setup-sh73a0.c
-@@ -607,7 +607,7 @@ static struct resource sh73a0_dmae_resources[] = {
+@@ -607,7 +607,7 @@ static struct resource sh73a0_dmae_resou
.flags = IORESOURCE_MEM,
},
{
.start = gic_spi(129),
.end = gic_spi(129),
.flags = IORESOURCE_IRQ,
---
-1.7.10.2.565.gbd578b5
-