summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);
+}