summaryrefslogtreecommitdiff
path: root/cpu
diff options
context:
space:
mode:
authorMatthias Kaehlcke <matthias@kaehlcke.net>2010-03-09 22:13:47 +0100
committertrix <trix@windriver.com>2010-03-13 12:44:59 -0600
commit5962bffcb5a064cb58d244f15f08d5d533bcd27b (patch)
tree9c7ae5841387290f1722a2d614a9ae50672c2166 /cpu
parentdea86bb9aa663d726a6e6c1cf5c464c3ae351da9 (diff)
downloadu-boot-imx-5962bffcb5a064cb58d244f15f08d5d533bcd27b.zip
u-boot-imx-5962bffcb5a064cb58d244f15f08d5d533bcd27b.tar.gz
u-boot-imx-5962bffcb5a064cb58d244f15f08d5d533bcd27b.tar.bz2
ep93xx timer: Rename struct timer_reg pointers
ep93xx timer: Renamed pointers to struct timer_regs from name 'timer' to 'timer_regs' in order to avoid confusion with the global variable 'timer' Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
Diffstat (limited to 'cpu')
-rw-r--r--cpu/arm920t/ep93xx/timer.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/cpu/arm920t/ep93xx/timer.c b/cpu/arm920t/ep93xx/timer.c
index 31304b7..943f193 100644
--- a/cpu/arm920t/ep93xx/timer.c
+++ b/cpu/arm920t/ep93xx/timer.c
@@ -63,9 +63,9 @@ static inline unsigned long long usecs_to_ticks(unsigned long usecs)
static inline unsigned long read_timer(void)
{
- struct timer_regs *timer = (struct timer_regs *)TIMER_BASE;
+ struct timer_regs *timer_regs = (struct timer_regs *)TIMER_BASE;
- return TIMER_MAX_VAL - readl(&timer->timer3.value);
+ return TIMER_MAX_VAL - readl(&timer_regs->timer3.value);
}
/*
@@ -120,17 +120,17 @@ void __udelay(unsigned long usec)
int timer_init(void)
{
- struct timer_regs *timer = (struct timer_regs *)TIMER_BASE;
+ struct timer_regs *timer_regs = (struct timer_regs *)TIMER_BASE;
/* use timer 3 with 508KHz and free running */
- writel(TIMER_CLKSEL, &timer->timer3.control);
+ writel(TIMER_CLKSEL, &timer_regs->timer3.control);
/* set initial timer value 3 */
- writel(TIMER_MAX_VAL, &timer->timer3.load);
+ writel(TIMER_MAX_VAL, &timer_regs->timer3.load);
/* Enable the timer */
writel(TIMER_ENABLE | TIMER_CLKSEL,
- &timer->timer3.control);
+ &timer_regs->timer3.control);
reset_timer_masked();