From 66ee69234795c0596f84b25f06b7fbc2e8ed214c Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 13 Dec 2012 20:48:34 +0000 Subject: arm: Move tbl to arch_global_data Move this field into arch_global_data and tidy up. Signed-off-by: Simon Glass --- arch/arm/cpu/armv7/s5p-common/timer.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'arch/arm/cpu/armv7/s5p-common') diff --git a/arch/arm/cpu/armv7/s5p-common/timer.c b/arch/arm/cpu/armv7/s5p-common/timer.c index bb0e795..1566226 100644 --- a/arch/arm/cpu/armv7/s5p-common/timer.c +++ b/arch/arm/cpu/armv7/s5p-common/timer.c @@ -106,7 +106,7 @@ void reset_timer_masked(void) /* reset time */ gd->lastinc = readl(&timer->tcnto4); - gd->tbl = 0; + gd->arch.tbl = 0; } unsigned long get_timer_masked(void) @@ -124,13 +124,13 @@ unsigned long get_current_tick(void) unsigned long count_value = readl(&timer->tcntb4); if (gd->lastinc >= now) - gd->tbl += gd->lastinc - now; + gd->arch.tbl += gd->lastinc - now; else - gd->tbl += gd->lastinc + count_value - now; + gd->arch.tbl += gd->lastinc + count_value - now; gd->lastinc = now; - return gd->tbl; + return gd->arch.tbl; } /* -- cgit v1.1 From 582601da2f90b1850aa19f7820b1623c79b3dac6 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 13 Dec 2012 20:48:35 +0000 Subject: arm: Move lastinc to arch_global_data Move this field into arch_global_data and tidy up. Signed-off-by: Simon Glass --- arch/arm/cpu/armv7/s5p-common/timer.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'arch/arm/cpu/armv7/s5p-common') diff --git a/arch/arm/cpu/armv7/s5p-common/timer.c b/arch/arm/cpu/armv7/s5p-common/timer.c index 1566226..e78c716 100644 --- a/arch/arm/cpu/armv7/s5p-common/timer.c +++ b/arch/arm/cpu/armv7/s5p-common/timer.c @@ -105,7 +105,7 @@ void reset_timer_masked(void) struct s5p_timer *const timer = s5p_get_base_timer(); /* reset time */ - gd->lastinc = readl(&timer->tcnto4); + gd->arch.lastinc = readl(&timer->tcnto4); gd->arch.tbl = 0; } @@ -123,12 +123,12 @@ unsigned long get_current_tick(void) unsigned long now = readl(&timer->tcnto4); unsigned long count_value = readl(&timer->tcntb4); - if (gd->lastinc >= now) - gd->arch.tbl += gd->lastinc - now; + if (gd->arch.lastinc >= now) + gd->arch.tbl += gd->arch.lastinc - now; else - gd->arch.tbl += gd->lastinc + count_value - now; + gd->arch.tbl += gd->arch.lastinc + count_value - now; - gd->lastinc = now; + gd->arch.lastinc = now; return gd->arch.tbl; } -- cgit v1.1