summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2013-03-11 06:08:07 +0000
committerSimon Glass <sjg@chromium.org>2013-03-19 08:45:37 -0700
commit5e6fb69778fa41e685add00b73ed5f22c7a96166 (patch)
treed23ac9fbfe5147118fedb0dbaef427fe7e0f13ce
parent1e566bc6dbcfc9f13909d5cb40dd74925bcdd579 (diff)
downloadu-boot-imx-5e6fb69778fa41e685add00b73ed5f22c7a96166.zip
u-boot-imx-5e6fb69778fa41e685add00b73ed5f22c7a96166.tar.gz
u-boot-imx-5e6fb69778fa41e685add00b73ed5f22c7a96166.tar.bz2
x86: spi: Set maximum write size for ICH
This SPI controller can only write 64 bytes at a time. Add this restriction in so that 'sf write' works correct for blocks larger than 64 bytes. Signed-off-by: Simon Glass <sjg@chromium.org>
-rw-r--r--drivers/spi/ich.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/spi/ich.c b/drivers/spi/ich.c
index ef1ce1d..8865df5 100644
--- a/drivers/spi/ich.c
+++ b/drivers/spi/ich.c
@@ -147,6 +147,11 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs,
return NULL;
}
+ /*
+ * Yes this controller can only write a small number of bytes at
+ * once! The limit is typically 64 bytes.
+ */
+ ich->slave.max_write_size = ctlr.databytes;
ich->speed = max_hz;
return &ich->slave;