summaryrefslogtreecommitdiff
path: root/firmware/target/arm/imx233
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2017-08-27 15:56:11 +0200
committerAmaury Pouly <amaury.pouly@gmail.com>2017-08-27 17:49:45 +0200
commitb81c1555ef7025a23c8e1e6e27259983adac9e5d (patch)
treef9dd8f8581366c84883f0cc24fd1fe74bcd56b0c /firmware/target/arm/imx233
parent7677a9946f90a277c24aaa45366cefee19dd1ab8 (diff)
downloadrockbox-b81c1555ef7025a23c8e1e6e27259983adac9e5d.tar.gz
rockbox-b81c1555ef7025a23c8e1e6e27259983adac9e5d.zip
imx233: fix potential bug in udelay
Change-Id: I5c8f5d9917f7a3353862c856bd9bbbbe9b291b1d
Diffstat (limited to 'firmware/target/arm/imx233')
-rw-r--r--firmware/target/arm/imx233/system-imx233.c4
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)
257void udelay(unsigned us) 257void 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
263void imx233_digctl_set_arm_cache_timings(unsigned timings) 265void imx233_digctl_set_arm_cache_timings(unsigned timings)