From: Roel Kluin <roel.kluin@gmail.com>
To: mano@roarinelk.homelinux.net, ralf@linux-mips.org
Cc: linux-mips@linux-mips.org
Subject: [PATCH] MIPS: in plat_time_init() t reaches -1, tested: 0
Date: Sat, 31 Jan 2009 12:23:34 +0100 [thread overview]
Message-ID: <498434B6.5020409@gmail.com> (raw)
With a postfix decrement t reaches -1 rather than 0,
so the fall-back will not occur.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
diff --git a/arch/mips/alchemy/common/time.c b/arch/mips/alchemy/common/time.c
index 3288014..0b5681a 100644
--- a/arch/mips/alchemy/common/time.c
+++ b/arch/mips/alchemy/common/time.c
@@ -118,7 +118,7 @@ void __init plat_time_init(void)
* setup counter 1 (RTC) to tick at full speed
*/
t = 0xffffff;
- while ((au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_T1S) && t--)
+ while ((au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_T1S) && --t)
asm volatile ("nop");
if (!t)
goto cntr_err;
@@ -127,7 +127,7 @@ void __init plat_time_init(void)
au_sync();
t = 0xffffff;
- while ((au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_C1S) && t--)
+ while ((au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_C1S) && --t)
asm volatile ("nop");
if (!t)
goto cntr_err;
@@ -135,7 +135,7 @@ void __init plat_time_init(void)
au_sync();
t = 0xffffff;
- while ((au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_C1S) && t--)
+ while ((au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_C1S) && --t)
asm volatile ("nop");
if (!t)
goto cntr_err;
next reply other threads:[~2009-01-31 11:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-31 11:23 Roel Kluin [this message]
2009-02-04 21:15 ` [PATCH] MIPS: in plat_time_init() t reaches -1, tested: 0 Ralf Baechle
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=498434B6.5020409@gmail.com \
--to=roel.kluin@gmail.com \
--cc=linux-mips@linux-mips.org \
--cc=mano@roarinelk.homelinux.net \
--cc=ralf@linux-mips.org \
/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