x86: ich-spi: Set the tx operation mode for ich 7
authorBin Meng <bmeng.cn@gmail.com>
Fri, 12 Dec 2014 14:06:16 +0000 (19:36 +0530)
committerSimon Glass <sjg@chromium.org>
Sat, 13 Dec 2014 22:08:04 +0000 (15:08 -0700)
ICH 7 SPI controller only supports byte program (02h) for SST flash.
Word program (ADh) is not supported.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
drivers/spi/ich.c

index b356411c36a4c3f87bda9549fa28dc7cf35a5872..16730ec33f391bb16b3bdee8ae1fb60fdbb97d6d 100644 (file)
@@ -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;
 }