diff options
| author | Suraj Kakade <[email protected]> | 2026-08-13 17:36:58 +0530 |
|---|---|---|
| committer | Michal Simek <[email protected]> | 2026-09-04 12:44:20 +0200 |
| commit | cf9c966849fc5bdc0adc2884cbc944b854a68750 (patch) | |
| tree | e39f048565dad169e749d7667a43b40aa1c31e31 /contrib/apps/httpserver | |
| parent | feb44bd09ff673aa64f329a5a60a950b8197507f (diff) | |
spi: xilinx_spi: fix premature transfer termination at low SCK
start_transfer() asserts SPICR_MASTER_INHIBIT as soon as SPISR_TX_EMPTY
is seen. SPISR_TX_EMPTY only indicates that the TX FIFO has drained;
the final byte may still be in the shift pipeline and actively
transmitting on the SPI bus. At low SCK frequencies the gap between
FIFO-empty and the last bit finishing its shift-out becomes wide
enough that MASTER_INHIBIT gets asserted before the transfer actually
completes, truncating the last byte and leaving the clock generation
logic in an error state.
Switch to polling IPISR_DTR_EMPTY instead, which is only set once the
last byte has genuinely finished shifting out to the slave, and only
assert MASTER_INHIBIT afterwards. Clear any stale DTR_EMPTY before
starting a transfer and after detecting completion, since IPISR is
toggle-on-write. This fix works correctly at both high and low SCK
frequencies.
Fixes: 0c0de58f7b30 ("spi: xilinx_spi: Modify transfer logic xilinx_spi_xfer() function")
Signed-off-by: Padmarao Begari <[email protected]>
Signed-off-by: Suraj Kakade <[email protected]>
Signed-off-by: Michal Simek <[email protected]>
Link: https://patch.msgid.link/[email protected]
Diffstat (limited to 'contrib/apps/httpserver')
0 files changed, 0 insertions, 0 deletions
