summaryrefslogtreecommitdiff
path: root/drivers/mtd
diff options
context:
space:
mode:
authorGabe Black <gabeblack@chromium.org>2011-09-02 02:10:03 -0700
committerGabe Black (Do Not Use) <gabeblack@google.com>2011-09-02 17:20:40 -0700
commit748e544281616b0211bd503743f93d8b47b79fd5 (patch)
tree39e5f438885ba910e9e45c81a1a3791d02b21505 /drivers/mtd
parentbd3dcff61ab595b460a418d828ac35b874ea29f9 (diff)
Make the Winbond driver support the CONFIG_SPI_FLASH_NO_FAST_READ option
Make the Winbond flash chip driver support the CONFIG_SPI_FLASH_NO_FAST_READ option so that it can be used with the ICH SPI controller. BUG=chrome-os-partner:5829 TEST=With this and other changes, built and vbooted x86-alex and stumpy. Signed-off-by: Gabe Black <gabeblack@google.com> Change-Id: I8113b0476818fab1515ce37bd8bba9004d0717ca Reviewed-on: http://gerrit.chromium.org/gerrit/7161 Reviewed-by: Mike Frysinger <vapier@chromium.org> Reviewed-by: Duncan Laurie <dlaurie@chromium.org> Tested-by: Gabe Black (Do Not Use) <gabeblack@google.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/spi/winbond.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mtd/spi/winbond.c b/drivers/mtd/spi/winbond.c
index e8d30ae2b9..ff2043f3d4 100644
--- a/drivers/mtd/spi/winbond.c
+++ b/drivers/mtd/spi/winbond.c
@@ -209,7 +209,11 @@ struct spi_flash *spi_flash_probe_winbond(struct spi_slave *spi, u8 *idcode)
stm->flash.write = winbond_write;
stm->flash.erase = winbond_erase;
+#ifdef CONFIG_SPI_FLASH_NO_FAST_READ
+ stm->flash.read = spi_flash_cmd_read_slow;
+#else
stm->flash.read = spi_flash_cmd_read_fast;
+#endif
stm->flash.sector_size = (1 << stm->params->l2_page_size) *
stm->params->pages_per_sector;
stm->flash.size = page_size * params->pages_per_sector