summaryrefslogtreecommitdiff
path: root/drivers/mtd/spi/sf_probe.c
diff options
context:
space:
mode:
authorTom Rini <trini@ti.com>2014-12-15 17:13:47 -0500
committerTom Rini <trini@ti.com>2014-12-15 17:13:47 -0500
commitb9206e61f3d87535ac4f4b0b858e674fd1edfeaf (patch)
treef7fc5d96b6b4b783dbccf2619157caf4faf66b5b /drivers/mtd/spi/sf_probe.c
parent6983951a612aeecd906521e31de83d7fae309950 (diff)
parent7cbd74f7484e9a58f7109e74e81002fee029b2f7 (diff)
downloadu-boot-imx-b9206e61f3d87535ac4f4b0b858e674fd1edfeaf.zip
u-boot-imx-b9206e61f3d87535ac4f4b0b858e674fd1edfeaf.tar.gz
u-boot-imx-b9206e61f3d87535ac4f4b0b858e674fd1edfeaf.tar.bz2
Merge git://git.denx.de/u-boot-x86
Diffstat (limited to 'drivers/mtd/spi/sf_probe.c')
-rw-r--r--drivers/mtd/spi/sf_probe.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/mtd/spi/sf_probe.c b/drivers/mtd/spi/sf_probe.c
index 2636426..ce9987f 100644
--- a/drivers/mtd/spi/sf_probe.c
+++ b/drivers/mtd/spi/sf_probe.c
@@ -24,6 +24,7 @@ DECLARE_GLOBAL_DATA_PTR;
/* Read commands array */
static u8 spi_read_cmds_array[] = {
CMD_READ_ARRAY_SLOW,
+ CMD_READ_ARRAY_FAST,
CMD_READ_DUAL_OUTPUT_FAST,
CMD_READ_DUAL_IO_FAST,
CMD_READ_QUAD_OUTPUT_FAST,
@@ -135,8 +136,12 @@ static int spi_flash_validate_params(struct spi_slave *spi, u8 *idcode,
#ifndef CONFIG_DM_SPI_FLASH
flash->write = spi_flash_cmd_write_ops;
#if defined(CONFIG_SPI_FLASH_SST)
- if (params->flags & SST_WP)
- flash->write = sst_write_wp;
+ if (params->flags & SST_WR) {
+ if (flash->spi->op_mode_tx & SPI_OPM_TX_BP)
+ flash->write = sst_write_bp;
+ else
+ flash->write = sst_write_wp;
+ }
#endif
flash->erase = spi_flash_cmd_erase_ops;
flash->read = spi_flash_cmd_read_ops;