From: Simon Glass Date: Mon, 11 Mar 2013 09:08:07 -0700 Subject: [U-Boot] [PATCH v2 09/15] x86: spi: Set maximum write size for ICH In-Reply-To: <1363018093-28979-1-git-send-email-sjg@chromium.org> References: <1363018093-28979-1-git-send-email-sjg@chromium.org> Message-ID: <1363018093-28979-10-git-send-email-sjg@chromium.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- Changes in v2: None drivers/spi/ich.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/spi/ich.c b/drivers/spi/ich.c index 9f8eab2..15213d9 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; -- 1.8.1.3