diff options
author | Brian Norris <computersforpeace@gmail.com> | 2014-04-08 22:16:49 -0400 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2014-04-14 14:23:00 -0400 |
commit | 58b89a1f4c2a65b10b8f7b90b6ff2161b19bb0d1 (patch) | |
tree | 4c66af58cbfddd308c20271ae68f4959c6644117 /drivers/mtd/spi-nor/spi-nor.c | |
parent | b02e7f3ef0beb72da8fc64542f0ac977996ec56b (diff) |
mtd: spi-nor: unify read opcode variants with ST SPI FSM
serial_flash_cmds.h defines our opcodes a little differently. Let's
borrow its naming, since it's borrowed from the SFDP standard, and it's
more extensible.
This prepares us for merging serial_flash_cmds.h and spi-nor.h opcode
listing.
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Acked-by: Huang Shijie <b32955@freescale.com>
Diffstat (limited to 'drivers/mtd/spi-nor/spi-nor.c')
-rw-r--r-- | drivers/mtd/spi-nor/spi-nor.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c index 1716f3ce9949..d6f44d527701 100644 --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c | |||
@@ -1014,16 +1014,16 @@ int spi_nor_scan(struct spi_nor *nor, const struct spi_device_id *id, | |||
1014 | /* Default commands */ | 1014 | /* Default commands */ |
1015 | switch (nor->flash_read) { | 1015 | switch (nor->flash_read) { |
1016 | case SPI_NOR_QUAD: | 1016 | case SPI_NOR_QUAD: |
1017 | nor->read_opcode = SPINOR_OP_QUAD_READ; | 1017 | nor->read_opcode = SPINOR_OP_READ_1_1_4; |
1018 | break; | 1018 | break; |
1019 | case SPI_NOR_DUAL: | 1019 | case SPI_NOR_DUAL: |
1020 | nor->read_opcode = SPINOR_OP_DUAL_READ; | 1020 | nor->read_opcode = SPINOR_OP_READ_1_1_2; |
1021 | break; | 1021 | break; |
1022 | case SPI_NOR_FAST: | 1022 | case SPI_NOR_FAST: |
1023 | nor->read_opcode = SPINOR_OP_FAST_READ; | 1023 | nor->read_opcode = SPINOR_OP_READ_FAST; |
1024 | break; | 1024 | break; |
1025 | case SPI_NOR_NORMAL: | 1025 | case SPI_NOR_NORMAL: |
1026 | nor->read_opcode = SPINOR_OP_NORM_READ; | 1026 | nor->read_opcode = SPINOR_OP_READ; |
1027 | break; | 1027 | break; |
1028 | default: | 1028 | default: |
1029 | dev_err(dev, "No Read opcode defined\n"); | 1029 | dev_err(dev, "No Read opcode defined\n"); |
@@ -1041,16 +1041,16 @@ int spi_nor_scan(struct spi_nor *nor, const struct spi_device_id *id, | |||
1041 | /* Dedicated 4-byte command set */ | 1041 | /* Dedicated 4-byte command set */ |
1042 | switch (nor->flash_read) { | 1042 | switch (nor->flash_read) { |
1043 | case SPI_NOR_QUAD: | 1043 | case SPI_NOR_QUAD: |
1044 | nor->read_opcode = SPINOR_OP_QUAD_READ_4B; | 1044 | nor->read_opcode = SPINOR_OP_READ4_1_1_4; |
1045 | break; | 1045 | break; |
1046 | case SPI_NOR_DUAL: | 1046 | case SPI_NOR_DUAL: |
1047 | nor->read_opcode = SPINOR_OP_DUAL_READ_4B; | 1047 | nor->read_opcode = SPINOR_OP_READ4_1_1_2; |
1048 | break; | 1048 | break; |
1049 | case SPI_NOR_FAST: | 1049 | case SPI_NOR_FAST: |
1050 | nor->read_opcode = SPINOR_OP_FAST_READ_4B; | 1050 | nor->read_opcode = SPINOR_OP_READ4_FAST; |
1051 | break; | 1051 | break; |
1052 | case SPI_NOR_NORMAL: | 1052 | case SPI_NOR_NORMAL: |
1053 | nor->read_opcode = SPINOR_OP_NORM_READ_4B; | 1053 | nor->read_opcode = SPINOR_OP_READ4; |
1054 | break; | 1054 | break; |
1055 | } | 1055 | } |
1056 | nor->program_opcode = SPINOR_OP_PP_4B; | 1056 | nor->program_opcode = SPINOR_OP_PP_4B; |