[PATCH] i2c: cdns: Add timeout for RXDV status bit polling

Heiko Schocher hs at nabladev.com
Mon Dec 1 06:53:30 CET 2025


Hello Michal,

On 26.11.25 16:12, Michal Simek wrote:
> From: Padmarao Begari <padmarao.begari at amd.com>
> 
> Add a timeout mechanism when waiting for the RXDV (Receive Data
> Valid) status bit to be set before reading data from the FIFO.
> This prevents infinite polling loops that could occur if the
> hardware doesn't respond as expected.
> 
> The timeout is set to 1000ms (CDNS_I2C_RXDV_TIMEOUT_MS) and uses
> the wait_for_bit_le32() function to poll the status register. If
> the timeout expires, an error code is returned.
> 
> Signed-off-by: Padmarao Begari <padmarao.begari at amd.com>
> Signed-off-by: Michal Simek <michal.simek at amd.com>
> ---
> 
>   drivers/i2c/i2c-cdns.c | 11 +++++++++++
>   1 file changed, 11 insertions(+)

Reviewed-by: Heiko Schocher <hs at nabladev.com>

bye,
Heiko
-- 
Nabla Software Engineering
HRB 40522 Augsburg
Phone: +49 821 45592596
E-Mail: office at nabladev.com
Geschäftsführer : Stefano Babic


More information about the U-Boot mailing list