]> git.ipfire.org Git - thirdparty/u-boot.git/commit
spi: fsl_espi: fix din offset
authorTomas Alvarez Vanoli <tomas.alvarez-vanoli@hitachienergy.com>
Tue, 24 Mar 2026 17:02:12 +0000 (18:02 +0100)
committerFabio Estevam <festevam@nabladev.com>
Thu, 2 Apr 2026 12:07:48 +0000 (09:07 -0300)
commit7917c2e356042505c7dea469c358f07b6e424fa2
tree1aea56b15166193ed45a7ef1d0a3fe4b9dce1c5a
parentc42db5019df01db7ba6e0b9ed659b6d57ef5c22a
spi: fsl_espi: fix din offset

In the case of SPI_XFER_BEGIN | SPI_XFER_END, the function creates a
buffer of double the size of the transaction, so that it can write the
data in into the second half. It sets the rx_offset to len, and in the
while loop we are setting an internal "din" to buffer + rx_offset.

However, at the end of each loop, the driver copies "buffer + 2 *
cmd_len" back to the data_in pointer.

This commit changes the source of the data to buffer + rx_offset.

Signed-off-by: Tomas Alvarez Vanoli <tomas.alvarez-vanoli@hitachienergy.com>
drivers/spi/fsl_espi.c