diff --git a/ipl/util.c b/ipl/util.c index 5913656..c659aa1 100755 --- a/ipl/util.c +++ b/ipl/util.c @@ -37,15 +37,15 @@ u32 get_tmr_us() void msleep(u32 milliseconds) { - u32 start = get_tmr_ms(); - while ((get_tmr_ms() - start) <= milliseconds) + u32 start = RTC(0x10) | (RTC(0xC)<< 10); + while (((RTC(0x10) | (RTC(0xC)<< 10)) - start) <= milliseconds) ; } void usleep(u32 microseconds) { - u32 start = get_tmr_us(); - while ((get_tmr_us() - start) <= microseconds) + u32 start = TMR(0x10); + while ((TMR(0x10) - start) <= microseconds) ; } diff --git a/ipl/util.h b/ipl/util.h index e86a048..a18166a 100755 --- a/ipl/util.h +++ b/ipl/util.h @@ -21,7 +21,7 @@ #include "types.h" #define byte_swap_32(num) ((num>>24)&0xff) | ((num<<8)&0xff0000) | \ - ((num>>8)&0xff00) | ((num<<24)&0xff000000); \ + ((num>>8)&0xff00) | ((num<<24)&0xff000000) \ typedef struct _cfg_op_t { @@ -38,7 +38,7 @@ void exec_cfg(u32 *base, const cfg_op_t *ops, u32 num_ops); u32 crc32c(const void *buf, u32 len); /* This is a faster implementation of memcmp that checks two u32 values */ -/* every 128 Bytes block. Intented for only for Backup and Restore */ +/* every 128 Bytes block. Intented only for Backup and Restore */ u32 memcmp32sparse(const u32 *buf1, const u32 *buf2, u32 len); #endif