summaryrefslogtreecommitdiff
path: root/src/soc
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@chromium.org>2015-04-16 17:15:02 +0200
committerPatrick Georgi <pgeorgi@google.com>2015-04-17 10:10:30 +0200
commit3b1c238778916e4fbc48e960e6ceee213da86d4f (patch)
treecfc802b87e58c0f731ca2eff56c9cda3c5948c9d /src/soc
parente5fd1c9debb9a3c456c973265f2460df473d5a27 (diff)
qualcomm/ipq806x: add spi_crop_chunk()
That function requirement was added upstream but not in Chromium, so add an implementation. Change-Id: Ie384b315adb205586defa730b843c7c8e96f77fb Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: http://review.coreboot.org/9776 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/soc')
-rw-r--r--src/soc/qualcomm/ipq806x/spi.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/soc/qualcomm/ipq806x/spi.c b/src/soc/qualcomm/ipq806x/spi.c
index 0f72cac6be..b374f17537 100644
--- a/src/soc/qualcomm/ipq806x/spi.c
+++ b/src/soc/qualcomm/ipq806x/spi.c
@@ -705,6 +705,11 @@ static int spi_xfer_rx_packet(struct ipq_spi_slave *ds,
return config_spi_state(ds, SPI_RESET_STATE);
}
+unsigned int spi_crop_chunk(unsigned int cmd_len, unsigned int buf_len)
+{
+ return min(MAX_PACKET_COUNT, buf_len);
+}
+
int spi_xfer(struct spi_slave *slave, const void *dout,
unsigned out_bytes, void *din, unsigned in_bytes)
{