From: Wenyou Yang <wenyou.yang@microchip.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 4/8] sf: differentiate Page Program 1-1-4 and 1-4-4
Date: Tue, 25 Jul 2017 15:00:58 +0800 [thread overview]
Message-ID: <20170725070102.1344-5-wenyou.yang@microchip.com> (raw)
In-Reply-To: <20170725070102.1344-1-wenyou.yang@microchip.com>
From: Cyrille Pitchen <cyrille.pitchen@atmel.com>
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>
Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com>
---
Changes in v3: None
Changes in v2: None
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 5c551089d6..8b8c951bcc 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 588e5729b4..8712e5eef0 100644
--- a/drivers/mtd/spi/spi_flash.c
+++ b/drivers/mtd/spi/spi_flash.c
@@ -1059,7 +1059,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_cmd = CMD_PAGE_PROGRAM_1_1_4;
flash->write_proto = SPI_FPROTO_1_1_4;
} else {
/* Go for default supported write cmd */
--
2.13.0
next prev parent reply other threads:[~2017-07-25 7:00 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-25 7:00 [U-Boot] [PATCH v3 0/8] sf: improve support of (Q)SPI flash memories Wenyou Yang
2017-07-25 7:00 ` [U-Boot] [PATCH v3 1/8] spi: add support of SPI flash commands Wenyou Yang
2017-08-30 13:50 ` Jagan Teki
2017-09-01 0:10 ` Wenyou.Yang at microchip.com
2017-07-25 7:00 ` [U-Boot] [PATCH v3 2/8] sf: describe all SPI flash commands with 'struct spi_flash_command' Wenyou Yang
2017-08-30 14:03 ` Jagan Teki
2017-07-25 7:00 ` [U-Boot] [PATCH v3 3/8] sf: select the relevant SPI flash protocol for read and write commands Wenyou Yang
2017-07-25 7:00 ` Wenyou Yang [this message]
2017-07-25 7:00 ` [U-Boot] [PATCH v3 5/8] sf: add 'addr_len' member to 'struct spi_flash' Wenyou Yang
2017-07-25 7:01 ` [U-Boot] [PATCH v3 6/8] sf: add new option to support SPI flash above 16MiB Wenyou Yang
2017-07-25 7:01 ` [U-Boot] [PATCH v3 7/8] sf: add support to Microchip SST26 QSPI memories Wenyou Yang
2017-07-25 7:01 ` [U-Boot] [PATCH v3 8/8] sf: add driver for Atmel QSPI controller Wenyou Yang
2017-08-30 13:58 ` Jagan Teki
2017-07-31 7:29 ` [U-Boot] [PATCH v3 0/8] sf: improve support of (Q)SPI flash memories Yang, Wenyou
2017-08-11 1:02 ` Yang, Wenyou
2017-08-11 5:14 ` Jagan Teki
2017-08-25 1:17 ` Yang, Wenyou
2017-08-25 16:07 ` Jagan Teki
2017-08-25 16:13 ` Marek Vasut
2017-08-25 16:28 ` Jagan Teki
2017-08-25 16:45 ` Marek Vasut
2017-08-25 23:05 ` Bin Meng
2017-08-26 6:14 ` Jagan Teki
2017-08-26 8:36 ` Marek Vasut
2017-08-26 19:12 ` Tom Rini
2017-08-26 6:34 ` Jagan Teki
2017-08-30 1:58 ` Yang, Wenyou
2017-08-30 6:33 ` Jagan Teki
2017-08-30 3:25 ` Yang, Wenyou
2017-08-30 3:43 ` Bin Meng
2017-08-30 5:27 ` Yang, Wenyou
2017-08-30 5:41 ` Bin Meng
2017-08-30 5:51 ` Yang, Wenyou
2017-08-30 6:30 ` Jagan Teki
2017-08-30 7:47 ` Bin Meng
2017-08-30 13:25 ` Jagan Teki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170725070102.1344-5-wenyou.yang@microchip.com \
--to=wenyou.yang@microchip.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.