Skip to content
Snippets Groups Projects
Commit 8329ab16 authored by Lucas Tanure's avatar Lucas Tanure Committed by Alexander Deucher
Browse files

spi: amd: Refactor to overcome 70 bytes per CS limitation


AMD SPI controller has 70 bytes for its FIFO and it has an
automatic way of controlling it`s internal CS, which can
only be activated during the time that the FIFO is being
transfered.

SPI_MASTER_HALF_DUPLEX here means that it can only read
RX bytes after TX bytes were written, and RX+TX must be
less than 70. If you write 4 bytes the first byte of read
is in position 5 of the FIFO.

All of that means that for devices that require an address
for reads and writes, the 2 transfers must be put in the same
FIFO so the CS can be hold for address and data, otherwise
the data would lose it`s meaning.

Signed-off-by: default avatarLucas Tanure <tanureal@opensource.cirrus.com>
parent 974ef9bc
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment