]> Git Repo - u-boot.git/commit
spi: sifive: Add spi-mem exec op
authorJagan Teki <[email protected]>
Thu, 23 Apr 2020 17:00:53 +0000 (22:30 +0530)
committerJagan Teki <[email protected]>
Thu, 30 Apr 2020 17:04:20 +0000 (22:34 +0530)
commitb7d6e104fbfd54b7ffe9e0a00200e98dd2904a65
tree0eb186e2e9e6826570547fbfc834fbbfb23afb40
parent685465fbba4f502190f9d1ccd28443f5e0e4ec20
spi: sifive: Add spi-mem exec op

SiFive SPI controller is responsible to handle the
slave devices like mmc spi and spi nor flash.

The controller is designed such a way that it would
handle the slave transactions based on the I/O protocol
numbers, example if spi nor slave send quad write opcode
it has to send alone with I/O protocol number of 4 and
if it try to send data it has to send I/O protocol number
along with 4 line data.

But the current spi-xfer code from spi-mem is combining
the opcode and address in a single transaction, so the
SPI controller will be unable to identify the I/O protocol
number of opcode vs address.

So, add the spi-mem exec_op with spi-xfer of opcode, address
and data as a separate transaction. This doesn't remove
the .xfer of dm_spi_ops since mmc spi will make use of it.

Note: This code might have moved to the spi-mem core area
once we have done the dedicated tests on other controllers
and have real reason to move.

Cc: Vignesh R <[email protected]>
Signed-off-by: Jagan Teki <[email protected]>
Tested-by: Sagar Kadam <[email protected]>
drivers/spi/spi-sifive.c
This page took 0.035146 seconds and 4 git commands to generate.