diff options
author | Simon Glass <sjg@chromium.org> | 2012-12-13 20:48:32 +0000 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2013-02-01 15:07:49 -0500 |
commit | b339051c0d45599c3c874141c52d912d78991dd4 (patch) | |
tree | 1a78d10e99fe38a735ef9de3884709b1f3966059 /arch/arm/cpu/arm926ejs/davinci | |
parent | f47e6ecd5d0cca61602a3d569b40a99d0bb7604a (diff) | |
download | u-boot-imx-b339051c0d45599c3c874141c52d912d78991dd4.zip u-boot-imx-b339051c0d45599c3c874141c52d912d78991dd4.tar.gz u-boot-imx-b339051c0d45599c3c874141c52d912d78991dd4.tar.bz2 |
arm: Move timer_rate_hz into arch_global_data
Move this field into arch_global_data and tidy up.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/arm/cpu/arm926ejs/davinci')
-rw-r--r-- | arch/arm/cpu/arm926ejs/davinci/timer.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/arm/cpu/arm926ejs/davinci/timer.c b/arch/arm/cpu/arm926ejs/davinci/timer.c index 93c9e60..7e852b5 100644 --- a/arch/arm/cpu/arm926ejs/davinci/timer.c +++ b/arch/arm/cpu/arm926ejs/davinci/timer.c @@ -60,7 +60,7 @@ int timer_init(void) writel(0x0, &timer->tim34); writel(TIMER_LOAD_VAL, &timer->prd34); writel(2 << 22, &timer->tcr); - gd->timer_rate_hz = CONFIG_SYS_HZ_CLOCK / TIM_CLK_DIV; + gd->arch.timer_rate_hz = CONFIG_SYS_HZ_CLOCK / TIM_CLK_DIV; gd->timer_reset_value = 0; return(0); @@ -87,14 +87,15 @@ ulong get_timer(ulong base) timer_diff = get_ticks() - gd->timer_reset_value; - return lldiv(timer_diff, (gd->timer_rate_hz / CONFIG_SYS_HZ)) - base; + return lldiv(timer_diff, + (gd->arch.timer_rate_hz / CONFIG_SYS_HZ)) - base; } void __udelay(unsigned long usec) { unsigned long long endtime; - endtime = lldiv((unsigned long long)usec * gd->timer_rate_hz, + endtime = lldiv((unsigned long long)usec * gd->arch.timer_rate_hz, 1000000UL); endtime += get_ticks(); @@ -108,7 +109,7 @@ void __udelay(unsigned long usec) */ ulong get_tbclk(void) { - return gd->timer_rate_hz; + return gd->arch.timer_rate_hz; } #ifdef CONFIG_HW_WATCHDOG |