
On 2017/5/19 22:59, Cyrille Pitchen wrote:
This patch simply renames the ambiguous CMD_QUAD_PAGE_PROGRAM macro into the more explicit CMD_PAGE_PROGRAM_1_1_4. Also it defines the CMD_PAGE_PROGRAM_1_4_4 macro to the standard 38h op code.
Signed-off-by: Cyrille Pitchen cyrille.pitchen@atmel.com
Acked-by Wenyou Yang wenyou.yang@atmel.com
Best Regards, Wenyou Yang
drivers/mtd/spi/sf_internal.h | 3 ++- drivers/mtd/spi/spi_flash.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/spi/sf_internal.h b/drivers/mtd/spi/sf_internal.h index 5c551089d673..8b8c951bcc55 100644 --- a/drivers/mtd/spi/sf_internal.h +++ b/drivers/mtd/spi/sf_internal.h @@ -48,7 +48,8 @@ enum spi_nor_option_flags { #define CMD_PAGE_PROGRAM 0x02 #define CMD_WRITE_DISABLE 0x04 #define CMD_WRITE_ENABLE 0x06 -#define CMD_QUAD_PAGE_PROGRAM 0x32 +#define CMD_PAGE_PROGRAM_1_1_4 0x32 +#define CMD_PAGE_PROGRAM_1_4_4 0x38
/* Read commands */ #define CMD_READ_ARRAY_SLOW 0x03 diff --git a/drivers/mtd/spi/spi_flash.c b/drivers/mtd/spi/spi_flash.c index 7e35fb9f4802..ec998166017d 100644 --- a/drivers/mtd/spi/spi_flash.c +++ b/drivers/mtd/spi/spi_flash.c @@ -1060,7 +1060,7 @@ int spi_flash_scan(struct spi_flash *flash)
/* Look for write commands */ if (info->flags & WR_QPP && spi->mode & SPI_TX_QUAD) {
flash->write_cmd = CMD_QUAD_PAGE_PROGRAM;
flash->write_proto = SPI_FPROTO_1_1_4; } else { /* Go for default supported write cmd */flash->write_cmd = CMD_PAGE_PROGRAM_1_1_4;