diff options
author | Roel Kluin <roel.kluin@gmail.com> | 2009-01-31 06:23:34 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2009-02-27 12:56:34 -0500 |
commit | 4b0d3f5c28c631c1aeb1860993572ad8468a4c11 (patch) | |
tree | e12e6539b552017947a04c0feca6d02ae9cfd2fc /arch | |
parent | 5e6833892e7b745b164bae8b2edb75ccd1bee866 (diff) |
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: Roel Kluin <roel.kluin@gmail.com>
Cc: mano@roarinelk.homelinux.net
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/mips/alchemy/common/time.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/mips/alchemy/common/time.c b/arch/mips/alchemy/common/time.c index 6fd441d16af5..f58d4ffb8945 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) | |||
118 | * setup counter 1 (RTC) to tick at full speed | 118 | * setup counter 1 (RTC) to tick at full speed |
119 | */ | 119 | */ |
120 | t = 0xffffff; | 120 | t = 0xffffff; |
121 | while ((au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_T1S) && t--) | 121 | while ((au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_T1S) && --t) |
122 | asm volatile ("nop"); | 122 | asm volatile ("nop"); |
123 | if (!t) | 123 | if (!t) |
124 | goto cntr_err; | 124 | goto cntr_err; |
@@ -127,7 +127,7 @@ void __init plat_time_init(void) | |||
127 | au_sync(); | 127 | au_sync(); |
128 | 128 | ||
129 | t = 0xffffff; | 129 | t = 0xffffff; |
130 | while ((au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_C1S) && t--) | 130 | while ((au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_C1S) && --t) |
131 | asm volatile ("nop"); | 131 | asm volatile ("nop"); |
132 | if (!t) | 132 | if (!t) |
133 | goto cntr_err; | 133 | goto cntr_err; |
@@ -135,7 +135,7 @@ void __init plat_time_init(void) | |||
135 | au_sync(); | 135 | au_sync(); |
136 | 136 | ||
137 | t = 0xffffff; | 137 | t = 0xffffff; |
138 | while ((au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_C1S) && t--) | 138 | while ((au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_C1S) && --t) |
139 | asm volatile ("nop"); | 139 | asm volatile ("nop"); |
140 | if (!t) | 140 | if (!t) |
141 | goto cntr_err; | 141 | goto cntr_err; |