From 3b1c238778916e4fbc48e960e6ceee213da86d4f Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Thu, 16 Apr 2015 17:15:02 +0200 Subject: 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 Reviewed-on: http://review.coreboot.org/9776 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- src/soc/qualcomm/ipq806x/spi.c | 5 +++++ 1 file changed, 5 insertions(+) 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) { -- cgit v1.2.3