[PATCH] i2c: cdns: Add timeout for RXDV status bit polling
Michal Simek
michal.simek at amd.com
Wed Dec 10 08:38:49 CET 2025
Hi Heiko,
On 12/1/25 06:53, Heiko Schocher wrote:
> 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>
I will take it via my tree. Please let me know if you want to take it via your
tree and I will remove it from my queue.
Thanks,
Michal
More information about the U-Boot
mailing list