[coreboot-gerrit] New patch to review for coreboot: a87c0f9 qualcomm/ipq806x: add spi_crop_chunk()

Patrick Georgi (pgeorgi@google.com) gerrit at coreboot.org
Thu Apr 16 17:15:58 CEST 2015


Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/9776

-gerrit

commit a87c0f98afc8e1fc19a43aa0e85cf7fc0b0f1f95
Author: Patrick Georgi <pgeorgi at chromium.org>
Date:   Thu Apr 16 17:15:02 2015 +0200

    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 at chromium.org>
---
 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 0f72cac..b374f17 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)
 {



More information about the coreboot-gerrit mailing list