summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2015-08-31 17:09:23 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2015-11-30 08:22:31 +0100
commit412a0e175069102761e85d4518c50dfb9b03519b (patch)
tree75850365d2cbc8c8c7b43021500614818dd141b2 /include
parent7da99e58bdf6ccf421dacd83e5c9d1231c12507b (diff)
downloadbarebox-412a0e175069102761e85d4518c50dfb9b03519b.tar.gz
barebox-412a0e175069102761e85d4518c50dfb9b03519b.tar.xz
spi: i.MX: optimize transfers for ECSPI v2.3
Instead of writing one word to the txfifo and then wait until one is received in the rxfifo we can write while the txfifos are not full and read as long the rxfifos contain data. This makes transfers for the m25p80 driver around 7 times faster here. Unlike the last version this time we only optimize the common case with 8 bits per word and SPI_LSB_FIRST cleared. The other cases would require more bit shuffling of the data. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/spi/imx-spi.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/spi/imx-spi.h b/include/spi/imx-spi.h
index 5c89634770..221c66502f 100644
--- a/include/spi/imx-spi.h
+++ b/include/spi/imx-spi.h
@@ -79,6 +79,7 @@
#define CSPI_2_3_INT_RREN (1 << 3)
#define CSPI_2_3_STAT 0x18
-#define CSPI_2_3_STAT_RR (1 << 3)
+#define CSPI_2_3_STAT_TF (1 << 2)
+#define CSPI_2_3_STAT_RR (1 << 3)
#endif /* __SPI_IMX_SPI_H */