[U-Boot] [PATCH u-boot-marvell v2.1 15/15] i2c: mvtwsi: fix reading status register after interrupt
Stefan Roese
sr at denx.de
Thu May 2 09:40:09 UTC 2019
On 02.05.19 11:36, Marek Behun wrote:
>> This still looks a bit strange. Looking at the Linux driver, there
>> is no delay after reading the control register. But its using
>> interrupts and therefore an implicit delay is added before this
>> interrupt service routine is called (instead of the busy loop here
>> in the U-Boot driver).
>
> Exactly my opinion as well.
>
>> BTW: Whats the value of "tick" in twsi_wait() in your case?
>
> requested I2C freq is 100000 Hz, actual 97656 Hz (nearest lower
> possible). This calculates the tick to 10340 ns with calc_tick, and
> u-boot sleeps for 11 ms (DIV_ROUND_UP).
>
> When tick was 10 ms this bug did not occur, because of the different
> timing when the control value was read it already was set for a while
> by the controller, it seems.
>
> Btw should I sent these first 14 patches with Reviewed-by tags?
No need for that, thanks. Patchwork will pick up the tags automatically.
Next time, please switch to v3 instead of v2.1 though.
Thanks,
Stefan
More information about the U-Boot
mailing list