summaryrefslogtreecommitdiff
path: root/drivers/mtd/spi
diff options
context:
space:
mode:
authorJagan Teki <jteki@openedev.com>2015-12-13 20:10:33 +0530
committerJagan Teki <jteki@openedev.com>2016-01-13 18:47:25 +0530
commit095a41d3c281b2c6576ea7e42780b565d619a1af (patch)
tree25edd3d2f021063cff33918aca8d76d8a456c2c1 /drivers/mtd/spi
parentf5c3c033f7ebd86e6a6e90f4a97b54d3e0f41d9a (diff)
downloadu-boot-imx-095a41d3c281b2c6576ea7e42780b565d619a1af.zip
u-boot-imx-095a41d3c281b2c6576ea7e42780b565d619a1af.tar.gz
u-boot-imx-095a41d3c281b2c6576ea7e42780b565d619a1af.tar.bz2
spi: Use mode instead of op_mode_tx
Used mode member from spi_slave{} instead of op_mode_tx. Cc: Simon Glass <sjg@chromium.org> Tested-by: Jagan Teki <jteki@openedev.com> Tested-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Signed-off-by: Jagan Teki <jteki@openedev.com>
Diffstat (limited to 'drivers/mtd/spi')
-rw-r--r--drivers/mtd/spi/sf_probe.c2
-rw-r--r--drivers/mtd/spi/spi_flash.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mtd/spi/sf_probe.c b/drivers/mtd/spi/sf_probe.c
index 0cafc29..3519ffd 100644
--- a/drivers/mtd/spi/sf_probe.c
+++ b/drivers/mtd/spi/sf_probe.c
@@ -128,7 +128,7 @@ static int spi_flash_std_write(struct udevice *dev, u32 offset, size_t len,
#if defined(CONFIG_SPI_FLASH_SST)
if (flash->flags & SNOR_F_SST_WR) {
- if (flash->spi->op_mode_tx & SPI_OPM_TX_BP)
+ if (flash->spi->mode & SPI_TX_BP)
return sst_write_bp(flash, offset, len, buf);
else
return sst_write_wp(flash, offset, len, buf);
diff --git a/drivers/mtd/spi/spi_flash.c b/drivers/mtd/spi/spi_flash.c
index 7755c4d..59e91ec 100644
--- a/drivers/mtd/spi/spi_flash.c
+++ b/drivers/mtd/spi/spi_flash.c
@@ -968,7 +968,7 @@ int spi_flash_scan(struct spi_flash *flash)
flash->write = spi_flash_cmd_write_ops;
#if defined(CONFIG_SPI_FLASH_SST)
if (flash->flags & SNOR_F_SST_WR) {
- if (spi->op_mode_tx & SPI_OPM_TX_BP)
+ if (spi->mode & SPI_TX_BP)
flash->write = sst_write_bp;
else
flash->write = sst_write_wp;
@@ -1042,7 +1042,7 @@ int spi_flash_scan(struct spi_flash *flash)
}
/* Not require to look for fastest only two write cmds yet */
- if (params->flags & WR_QPP && spi->op_mode_tx & SPI_OPM_TX_QPP)
+ if (params->flags & WR_QPP && spi->mode & SPI_TX_QPP)
flash->write_cmd = CMD_QUAD_PAGE_PROGRAM;
else
/* Go for default supported write cmd */