From: Jagannadha Sutradharudu Teki Date: Fri, 12 Dec 2014 19:36:16 +0530 Subject: [U-Boot] [PATCH v2 6/6] x86: ich-spi: Set the tx operation mode for ich 7 In-Reply-To: <1418393176-16002-1-git-send-email-jagannadh.teki@gmail.com> References: <1418393176-16002-1-git-send-email-jagannadh.teki@gmail.com> Message-ID: <1418393176-16002-7-git-send-email-jagannadh.teki@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de From: Bin Meng ICH 7 SPI controller only supports byte program (02h) for SST flash. Word program (ADh) is not supported. Signed-off-by: Bin Meng Reviewed-by: Jagannadha Sutradharudu Teki --- drivers/spi/ich.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/spi/ich.c b/drivers/spi/ich.c index 0ef8bd4..d5cea39 100644 --- a/drivers/spi/ich.c +++ b/drivers/spi/ich.c @@ -141,9 +141,14 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs, ich->slave.max_write_size = ctlr.databytes; ich->speed = max_hz; - /* ICH 7 SPI controller only supports array read command */ - if (ctlr.ich_version == 7) + /* + * ICH 7 SPI controller only supports array read command + * and byte program command for SST flash + */ + if (ctlr.ich_version == 7) { ich->slave.op_mode_rx = SPI_OPM_RX_AS; + ich->slave.op_mode_tx = SPI_OPM_TX_BP; + } return &ich->slave; } -- 1.9.1