blob: 9854a18225d5487d208ee29ec72440bdce224882 [file] [log] [blame]
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