diff options
author | Jagan Teki <jteki@openedev.com> | 2015-12-13 20:12:45 +0530 |
---|---|---|
committer | Jagan Teki <jteki@openedev.com> | 2016-01-13 18:47:25 +0530 |
commit | cdf3393814d4d811772b4414def79a05ed75b749 (patch) | |
tree | e468e07abae0f9ca89cf5347eb85a2734fac6894 | |
parent | 095a41d3c281b2c6576ea7e42780b565d619a1af (diff) | |
download | u-boot-imx-cdf3393814d4d811772b4414def79a05ed75b749.zip u-boot-imx-cdf3393814d4d811772b4414def79a05ed75b749.tar.gz u-boot-imx-cdf3393814d4d811772b4414def79a05ed75b749.tar.bz2 |
spi: Rename SPI_TX_BP|QPP to SPI_TX_BYTE|QUAD
Since SPI_TX_* are spi_slave{} members so use spi protocol
notation instead spi flash programming, like
SPI_TX_BP => SPI_TX_BYTE
SPI_TX_QPP => SPI_TX_QUAD
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>
-rw-r--r-- | drivers/mtd/spi/sf_probe.c | 2 | ||||
-rw-r--r-- | drivers/mtd/spi/spi_flash.c | 4 | ||||
-rw-r--r-- | drivers/spi/ich.c | 2 | ||||
-rw-r--r-- | include/spi.h | 4 |
4 files changed, 6 insertions, 6 deletions
diff --git a/drivers/mtd/spi/sf_probe.c b/drivers/mtd/spi/sf_probe.c index 3519ffd..daa1d5b 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->mode & SPI_TX_BP) + if (flash->spi->mode & SPI_TX_BYTE) 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 59e91ec..50011d9 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->mode & SPI_TX_BP) + if (spi->mode & SPI_TX_BYTE) 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->mode & SPI_TX_QPP) + if (params->flags & WR_QPP && spi->mode & SPI_TX_QUAD) flash->write_cmd = CMD_QUAD_PAGE_PROGRAM; else /* Go for default supported write cmd */ diff --git a/drivers/spi/ich.c b/drivers/spi/ich.c index 64322dd..d11132c 100644 --- a/drivers/spi/ich.c +++ b/drivers/spi/ich.c @@ -753,7 +753,7 @@ static int ich_spi_child_pre_probe(struct udevice *dev) */ if (plat->ich_version == 7) { slave->op_mode_rx = SPI_OPM_RX_AS; - slave->mode = SPI_TX_BP; + slave->mode = SPI_TX_BYTE; } return 0; diff --git a/include/spi.h b/include/spi.h index 67521721..b9a6e6f 100644 --- a/include/spi.h +++ b/include/spi.h @@ -23,8 +23,8 @@ #define SPI_LOOP 0x20 /* loopback mode */ #define SPI_SLAVE 0x40 /* slave mode */ #define SPI_PREAMBLE 0x80 /* Skip preamble bytes */ -#define SPI_TX_BP 0x100 /* transmit with 1 wire byte */ -#define SPI_TX_QPP 0x200 /* transmit with 4 wires */ +#define SPI_TX_BYTE 0x100 /* transmit with 1 wire byte */ +#define SPI_TX_QUAD 0x200 /* transmit with 4 wires */ /* SPI transfer flags */ #define SPI_XFER_BEGIN 0x01 /* Assert CS before transfer */ |