diff options
author | Aaron Durbin <adurbin@chromium.org> | 2018-04-19 16:58:13 -0600 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2018-04-23 09:13:16 +0000 |
commit | 9a1bb36137921c751173d6726a06019c84b171f5 (patch) | |
tree | 0ea747dfa24ed8f59e84286a9c537aa50932ba9a /src/soc/qualcomm | |
parent | 2a466cc283185b9fc3af853df3bd3d2c583ad409 (diff) | |
download | coreboot-9a1bb36137921c751173d6726a06019c84b171f5.tar.xz |
soc{broadcom,imgtec,mediatek,qualcomm}: stop using spi_xfer_two_vectors
On a second look broadcom/cygnus and imgtec/pistachio appear to
support full duplex. Therefore, remove the use of spi_xfer_two_vectors().
For mediatek/mt8173 and qualcomm/ipq40xx, the driver is written in such
a way that it does not support full duplex. Remove the use of
spi_xfer_two_vectors() and explicitly error out when a full duplex
transaction is requested.
Change-Id: I8689bc9bb2b27563d25e9f165487d38881c0b059
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/25742
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/qualcomm')
-rw-r--r-- | src/soc/qualcomm/ipq40xx/spi.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/soc/qualcomm/ipq40xx/spi.c b/src/soc/qualcomm/ipq40xx/spi.c index 3dc6022b03..4498b31183 100644 --- a/src/soc/qualcomm/ipq40xx/spi.c +++ b/src/soc/qualcomm/ipq40xx/spi.c @@ -611,6 +611,10 @@ static int spi_ctrlr_xfer(const struct spi_slave *slave, const void *dout, u8 *rxp = (u8 *)din; int ret; + /* Driver implementation does not support full duplex. */ + if (dout && din) + return -1; + ret = config_spi_state(ds, QUP_STATE_RESET); if (ret != SUCCESS) return ret; @@ -687,7 +691,6 @@ 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, .max_xfer_size = MAX_PACKET_COUNT, }; |