diff options
author | Amaury Pouly <amaury.pouly@gmail.com> | 2017-08-27 15:56:11 +0200 |
---|---|---|
committer | Amaury Pouly <amaury.pouly@gmail.com> | 2017-08-27 17:49:45 +0200 |
commit | b81c1555ef7025a23c8e1e6e27259983adac9e5d (patch) | |
tree | f9dd8f8581366c84883f0cc24fd1fe74bcd56b0c | |
parent | 7677a9946f90a277c24aaa45366cefee19dd1ab8 (diff) | |
download | rockbox-b81c1555ef7025a23c8e1e6e27259983adac9e5d.tar.gz rockbox-b81c1555ef7025a23c8e1e6e27259983adac9e5d.zip |
imx233: fix potential bug in udelay
Change-Id: I5c8f5d9917f7a3353862c856bd9bbbbe9b291b1d
-rw-r--r-- | firmware/target/arm/imx233/system-imx233.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/firmware/target/arm/imx233/system-imx233.c b/firmware/target/arm/imx233/system-imx233.c index 165a32d143..078e052b30 100644 --- a/firmware/target/arm/imx233/system-imx233.c +++ b/firmware/target/arm/imx233/system-imx233.c | |||
@@ -257,7 +257,9 @@ void imx233_reset_block(volatile uint32_t *block_reg) | |||
257 | void udelay(unsigned us) | 257 | void udelay(unsigned us) |
258 | { | 258 | { |
259 | uint32_t ref = HW_DIGCTL_MICROSECONDS; | 259 | uint32_t ref = HW_DIGCTL_MICROSECONDS; |
260 | while(!imx233_us_elapsed(ref, us)); | 260 | /* increase number of us by 1 to make sure we wait *at least* the requested |
261 | * time */ | ||
262 | while(!imx233_us_elapsed(ref, us + 1)); | ||
261 | } | 263 | } |
262 | 264 | ||
263 | void imx233_digctl_set_arm_cache_timings(unsigned timings) | 265 | void imx233_digctl_set_arm_cache_timings(unsigned timings) |