imx233: fix potential bug in udelay

Change-Id: I5c8f5d9917f7a3353862c856bd9bbbbe9b291b1d
This commit is contained in:
Amaury Pouly 2017-08-27 15:56:11 +02:00
parent 7677a9946f
commit b81c1555ef

View file

@ -257,7 +257,9 @@ void imx233_reset_block(volatile uint32_t *block_reg)
void udelay(unsigned us)
{
uint32_t ref = HW_DIGCTL_MICROSECONDS;
while(!imx233_us_elapsed(ref, us));
/* increase number of us by 1 to make sure we wait *at least* the requested
* time */
while(!imx233_us_elapsed(ref, us + 1));
}
void imx233_digctl_set_arm_cache_timings(unsigned timings)