UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Adventurer
Adventurer
314 Views
Registered: ‎04-07-2014

AXI SPI driver bug in petalinux 2018.2 for 32bit or 16bit wordsize

Dear Xilinx support,

there is most certainly a massive bug in the pointer arithmetic inside the axi_spi's driver for the 2018.2 petalinux kernel. The functions

xspi_read_rx_fifo and xspi_fill_tx_fifo are both using wrong access methods to xqspi->rx_ptr and xqspi->tx_ptr in my opinion.

This results in wrong spi transfers. For TX only the least significant byte is transferred. For RX the buffer will be corrupted.

I attach a proposal for a patch to this post. The patch suggests a minimal change to two lines of the driver. Efficiency could be better when changing the increment behaviour of the loop variable i instead.

Comments are highly welcome.

Leave Kudos if you find this patch useful. At my side I was successfully able to do 32bit spi transfers after applying this patch.

Regards,

Sebastian