[PATCH] i2c: cdns: Add timeout for RXDV status bit polling
Heiko Schocher
hs at nabladev.com
Wed Dec 10 08:40:07 CET 2025
Hello Michal,
On 10.12.25 08:38, Michal Simek wrote:
> 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.
I am fine with it!
Thanks!
bye,
Heiko
>
> Thanks,
> Michal
--
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