cdns_i2c: Handle data transfers exceeding FIFO depth
Changes to enhance/improve cdns_i2c driver polling-based
routines:
1. Provide FIFO depth and maximum transfer size as module
config parameters as they are configurable in the RTL.
2. I2C transfers exceeding FIFO depth would silently fail.
Add handling to send and receive data sizes requested by the
caller module. This leverages Cadence I2C FIFO depth and the
Transfer Size Register (TSR) parameters, which are both
configured in the RTL.
3. Add handling for transferring data sizes exceeding the
maximum transfer size (given by TSR).
4. As an extension to point 3 above, add a workaround to
continue with the data transfer in 'I2C Receiver' mode when
the TSR counter reaches 0. This is a limitation with the IP
(possibly a bug), where the I2C transfer terminates upon TSR
reaching 0 even when the HOLD bit is set. The workaround handles
this by ensuring that TSR doesn't drop to 0 until the last byte
of data has been received.
Signed-off-by:
Anurag Koul <anurag.koul@arm.com>
Change-Id: I1849b6c41ecfe79228d3123716003cf1faef1de3
Loading
Please register or sign in to comment