mirror of
https://github.com/fail0verflow/switch-coreboot.git
synced 2025-05-04 01:39:18 -04:00
Gale: spi: add vector operation method
Adding spi_xfer_two_vectors as .xfer_vector for ipq40xx spi_ctrlr.
Commit 22e7b86790
("UPSTREAM: spi: Get rid of SPI_ATOMIC_SEQUENCING")
has added new driver method xfer_vector to support combined write-read
operation within single CS cycle. The metohd is wrapped in
spi_xfer_vector() API. When spi_ctrlr structure does not have
xfer_vector method, API calls write and read operations sequentially.
However the QCA40xx SPI driver has "forced" CS activation-inactivation
in xfer method, so individual operation will break CS after write
operation, making combined write-read cycle broken.
Adding xfer_vector method to spi_ctrlr is quick fix to prevent this.
BUG=None
BRANCH=none
TEST=built and run on Gale
Change-Id: I031e85ce5b847353cb1084f6f68b2af8c6f702e1
Signed-off-by: Yuji Sasaki <sasakiy@google.com>
Reviewed-on: https://chromium-review.googlesource.com/433439
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Kan Yan <kyan@google.com>
This commit is contained in:
parent
176dfceff5
commit
88a8824951
1 changed files with 1 additions and 0 deletions
|
@ -656,6 +656,7 @@ static const struct spi_ctrlr spi_ctrlr = {
|
|||
.claim_bus = spi_ctrlr_claim_bus,
|
||||
.release_bus = spi_ctrlr_release_bus,
|
||||
.xfer = spi_ctrlr_xfer,
|
||||
.xfer_vector = spi_xfer_two_vectors,
|
||||
};
|
||||
|
||||
int spi_setup_slave(unsigned int bus, unsigned int cs, struct spi_slave *slave)
|
||||
|
|
Loading…
Add table
Reference in a new issue