mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-13 15:03:58 +03:00
In bus_i2c_stop, the MSR SDF is checked in a loop after stop command is sent. Meanwhile, some error status in MSR is also checked by imx_lpci2c_check_clear_error. But the imx_lpci2c_check_clear_error will clear the MSR. It causes problem in below situation: In current loop, SDF does not set, but error status is found by imx_lpci2c_check_clear_error (for example, NDF), then NDF will be cleared and result has NDF error. However, because SDF does not set in this loop, it goes not next loop. When SDF is set in next loop, imx_lpci2c_check_clear_error is re-executed, but as the MSR is cleared, the result is 0. Then the stop return 0. But it should return NDF error. Signed-off-by: Ye Li <ye.li@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>