summaryrefslogtreecommitdiff
path: root/src/soc
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@chromium.org>2015-04-20 10:14:19 +0200
committerPatrick Georgi <pgeorgi@google.com>2015-04-21 08:08:05 +0200
commit8549797b3047add2f1700d9f288cebaf7b85f5b8 (patch)
tree018417e4235f17bb3a4cb68dc43e190f6624ccc9 /src/soc
parent4038a7f631dce05aa184184a225a49bc7723aed0 (diff)
downloadcoreboot-8549797b3047add2f1700d9f288cebaf7b85f5b8.tar.xz
imgtec/pistachio: Add spi_crop_chunk()
This was added in upstream but not in Chromium OS where pistachio support was developed. Change-Id: I54f883776f19aa7bd357841731166e92d03145d8 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: http://review.coreboot.org/9808 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/soc')
-rw-r--r--src/soc/imgtec/pistachio/spi.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/soc/imgtec/pistachio/spi.c b/src/soc/imgtec/pistachio/spi.c
index 64d18a3ca0..3cae6af79e 100644
--- a/src/soc/imgtec/pistachio/spi.c
+++ b/src/soc/imgtec/pistachio/spi.c
@@ -542,3 +542,8 @@ int spi_xfer(struct spi_slave *slave, const void *dout, unsigned int bytesout,
}
return spim_io(slave, &buff_0, (dout && din) ? &buff_1 : NULL);
}
+
+unsigned int spi_crop_chunk(unsigned int cmd_len, unsigned int buf_len)
+{
+ return min(IMGTEC_SPI_MAX_TRANSFER_SIZE, buf_len);
+}