summaryrefslogtreecommitdiff
path: root/firmware/target/arm/tcc780x/system-target.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/tcc780x/system-target.h')
-rw-r--r--firmware/target/arm/tcc780x/system-target.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/firmware/target/arm/tcc780x/system-target.h b/firmware/target/arm/tcc780x/system-target.h
index 0802bb92e0..6e2e7be980 100644
--- a/firmware/target/arm/tcc780x/system-target.h
+++ b/firmware/target/arm/tcc780x/system-target.h
@@ -35,10 +35,12 @@
35#define outw(a,b) (*(volatile unsigned short *) (b) = (a)) 35#define outw(a,b) (*(volatile unsigned short *) (b) = (a))
36 36
37/* TC32 is configured to 1MHz in clock_init() */ 37/* TC32 is configured to 1MHz in clock_init() */
38#define USEC_TIMER TC32MCNT
39
38static inline void udelay(unsigned usecs) 40static inline void udelay(unsigned usecs)
39{ 41{
40 unsigned stop = TC32MCNT + usecs; 42 unsigned stop = USEC_TIMER + usecs;
41 while (TIME_BEFORE(TC32MCNT, stop)); 43 while (TIME_BEFORE(USEC_TIMER, stop));
42} 44}
43 45
44#endif /* SYSTEM_TARGET_H */ 46#endif /* SYSTEM_TARGET_H */