public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Matthias Kaehlcke <matthias@kaehlcke.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/4] ep93xx timer: Rename struct timer_reg pointers
Date: Tue, 9 Mar 2010 22:13:47 +0100	[thread overview]
Message-ID: <20100309211347.GE12559@darwin> (raw)
In-Reply-To: <a41656a7b95f18a5ef51428b285767d0a70cbbc7.1268169068.git.matthias@kaehlcke.net>

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>
---
 cpu/arm920t/ep93xx/timer.c |   12 ++++++------
 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();
 
-- 
1.6.5

  parent reply	other threads:[~2010-03-09 21:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <a41656a7b95f18a5ef51428b285767d0a70cbbc7.1268169068.git.matthias@kaehlcke.net>
2010-03-09 21:13 ` [U-Boot] [PATCH 2/4] ep93xx timer: Fix resolution of get_ticks() Matthias Kaehlcke
2010-03-09 21:13 ` Matthias Kaehlcke [this message]
2010-03-09 21:13 ` [U-Boot] [PATCH 4/4] ep93xx timer: refactoring Matthias Kaehlcke
2010-03-13 20:32   ` Tom

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100309211347.GE12559@darwin \
    --to=matthias@kaehlcke.net \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox