diff options
author | Simon Glass <sjg@chromium.org> | 2012-12-13 20:48:34 +0000 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2013-02-01 15:07:50 -0500 |
commit | 66ee69234795c0596f84b25f06b7fbc2e8ed214c (patch) | |
tree | e67321700886c597591624f825379a2d76dbd99c /arch/arm/cpu/arm926ejs/pantheon | |
parent | 8ff43b03e9f38a6e136e2e20eec4e8b2eb4a1d3d (diff) |
arm: Move tbl to 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/pantheon')
-rw-r--r-- | arch/arm/cpu/arm926ejs/pantheon/timer.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/arm/cpu/arm926ejs/pantheon/timer.c b/arch/arm/cpu/arm926ejs/pantheon/timer.c index 701d4396d7..2d9ddbad24 100644 --- a/arch/arm/cpu/arm926ejs/pantheon/timer.c +++ b/arch/arm/cpu/arm926ejs/pantheon/timer.c @@ -60,7 +60,7 @@ struct panthtmr_registers { #define COUNT_RD_REQ 0x1 DECLARE_GLOBAL_DATA_PTR; -/* Using gd->arch.tbu from timestamp and gd->tbl for lastdec */ +/* Using gd->arch.tbu from timestamp and gd->arch.tbl for lastdec */ /* * For preventing risk of instability in reading counter value, @@ -90,14 +90,14 @@ ulong get_timer_masked(void) { ulong now = read_timer(); - if (now >= gd->tbl) { + if (now >= gd->arch.tbl) { /* normal mode */ - gd->arch.tbu += now - gd->tbl; + gd->arch.tbu += now - gd->arch.tbl; } else { /* we have an overflow ... */ - gd->arch.tbu += now + TIMER_LOAD_VAL - gd->tbl; + gd->arch.tbu += now + TIMER_LOAD_VAL - gd->arch.tbl; } - gd->tbl = now; + gd->arch.tbl = now; return gd->arch.tbu; } @@ -144,8 +144,8 @@ int timer_init(void) /* Enable timer 0 */ writel(0x1, &panthtimers->cer); - /* init the gd->arch.tbu and gd->tbl value */ - gd->tbl = read_timer(); + /* init the gd->arch.tbu and gd->arch.tbl value */ + gd->arch.tbl = read_timer(); gd->arch.tbu = 0; return 0; |