aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-samsung
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2012-11-08 11:51:58 -0700
committerStephen Warren <swarren@nvidia.com>2012-12-24 09:36:35 -0700
commit23c197b77f9553c30f9c8a5ab41279a35f135f37 (patch)
tree7da1f4b032ff24482afb1f289ab9c633de684d7a /arch/arm/plat-samsung
parentm68k: set arch_gettimeoffset directly (diff)
downloadlinux-dev-23c197b77f9553c30f9c8a5ab41279a35f135f37.tar.xz
linux-dev-23c197b77f9553c30f9c8a5ab41279a35f135f37.zip
ARM: set arch_gettimeoffset directly
remove ARM's struct sys_timer .offset function pointer, and instead directly set the arch_gettimeoffset function pointer when the timer driver is initialized. This requires multiplying all function results by 1000, since the removed arm_gettimeoffset() did this. Also, s/unsigned long/u32/ just to make the function prototypes exactly match that of arch_gettimeoffset. Cc: Russell King <linux@arm.linux.org.uk> Cc: Andrew Victor <linux@maxim.org.za> Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com> Cc: Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ryan Mallon <rmallon@gmail.com> Cc: Ben Dooks <ben-linux@fluff.org> Cc: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'arch/arm/plat-samsung')
-rw-r--r--arch/arm/plat-samsung/time.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/arm/plat-samsung/time.c b/arch/arm/plat-samsung/time.c
index 60552e22f22e..67206df94aa8 100644
--- a/arch/arm/plat-samsung/time.c
+++ b/arch/arm/plat-samsung/time.c
@@ -95,7 +95,7 @@ static inline unsigned long timer_ticks_to_usec(unsigned long ticks)
* IRQs are disabled before entering here from do_gettimeofday()
*/
-static unsigned long s3c2410_gettimeoffset (void)
+static u32 s3c2410_gettimeoffset(void)
{
unsigned long tdone;
unsigned long tval;
@@ -120,7 +120,7 @@ static unsigned long s3c2410_gettimeoffset (void)
tdone += timer_startval;
}
- return timer_ticks_to_usec(tdone);
+ return timer_ticks_to_usec(tdone) * 1000;
}
@@ -273,6 +273,8 @@ static void __init s3c2410_timer_resources(void)
static void __init s3c2410_timer_init(void)
{
+ arch_gettimeoffset = s3c2410_gettimeoffset;
+
s3c2410_timer_resources();
s3c2410_timer_setup();
setup_irq(IRQ_TIMER4, &s3c2410_timer_irq);
@@ -280,6 +282,5 @@ static void __init s3c2410_timer_init(void)
struct sys_timer s3c24xx_timer = {
.init = s3c2410_timer_init,
- .offset = s3c2410_gettimeoffset,
.resume = s3c2410_timer_setup
};