Commit 4b0d3f5c authored by Roel Kluin's avatar Roel Kluin Committed by Ralf Baechle

MIPS: Alchemy: In plat_time_init() t reaches -1, tested: 0

With a postfix decrement t reaches -1 rather than 0, so the fall-back will
not occur.
Signed-off-by: default avatarRoel Kluin <roel.kluin@gmail.com>
Cc: mano@roarinelk.homelinux.net
Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 5e683389
...@@ -118,7 +118,7 @@ void __init plat_time_init(void) ...@@ -118,7 +118,7 @@ void __init plat_time_init(void)
* setup counter 1 (RTC) to tick at full speed * setup counter 1 (RTC) to tick at full speed
*/ */
t = 0xffffff; 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"); asm volatile ("nop");
if (!t) if (!t)
goto cntr_err; goto cntr_err;
...@@ -127,7 +127,7 @@ void __init plat_time_init(void) ...@@ -127,7 +127,7 @@ void __init plat_time_init(void)
au_sync(); au_sync();
t = 0xffffff; 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"); asm volatile ("nop");
if (!t) if (!t)
goto cntr_err; goto cntr_err;
...@@ -135,7 +135,7 @@ void __init plat_time_init(void) ...@@ -135,7 +135,7 @@ void __init plat_time_init(void)
au_sync(); au_sync();
t = 0xffffff; 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"); asm volatile ("nop");
if (!t) if (!t)
goto cntr_err; goto cntr_err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment