Skip to contentSkip to conversation

driver/mtd/spi: Default page size Spansion flash "S25FS512S" is 256b

PATCH New Ashish Kumar 2 participants 4 messages May 7, 2018 – May 16, 2018 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 driver/mtd/spi: Default page size Spansion flash "S25FS512S" is 256b

---
 drivers/mtd/spi/spi_flash.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
drivers/mtd/spi/spi_flash.c +6 -5
index 3d24a08..ce420cb 100644
@@ -1046,14 +1046,15 @@ int spi_flash_scan(struct spi_flash *flash)
 	flash->shift = (flash->dual_flash & SF_DUAL_PARALLEL_FLASH) ? 1 : 0;
 	flash->page_size = info->page_size;
 	/*
-	 * The Spansion S25FL032P and S25FL064P have 256b pages, yet use the
-	 * 0x4d00 Extended JEDEC code. The rest of the Spansion flashes with
-	 * the 0x4d00 Extended JEDEC code have 512b pages. All of the others
-	 * have 256b pages.
+	 * The Spansion S25FS512S, S25FL032P and S25FL064P have 256b pages,
+	 * yet use the 0x4d00 Extended JEDEC code. The rest of the Spansion
+	 * flashes with the 0x4d00 Extended JEDEC code have 512b pages.
+	 * All of the others have 256b pages.
 	 */
 	if (JEDEC_EXT(info) == 0x4d00) {
 		if ((JEDEC_ID(info) != 0x0215) &&
-		    (JEDEC_ID(info) != 0x0216))
+		    (JEDEC_ID(info) != 0x0216) &&
+		    (JEDEC_ID(info) != 0x0220))
 			flash->page_size = 512;
 	}
 	flash->page_size <<= flash->shift;
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/1 driver/mtd/spi: Default page size Spansion flash "S25FS512S" is 256b

Quoted 17 lines · Ashish Kumar
---
 drivers/mtd/spi/spi_flash.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
drivers/mtd/spi/spi_flash.c +0 -4
index 3d24a08..ce420cb 100644
@@ -1046,14 +1046,15 @@ int spi_flash_scan(struct spi_flash *flash)
        flash->shift = (flash->dual_flash & SF_DUAL_PARALLEL_FLASH) ? 1 : 0;
        flash->page_size = info->page_size;
        /*
-        * The Spansion S25FL032P and S25FL064P have 256b pages, yet use the
-        * 0x4d00 Extended JEDEC code. The rest of the Spansion flashes with
-        * the 0x4d00 Extended JEDEC code have 512b pages. All of the others
-        * have 256b pages.

drivers/mtd/spi/spi_flash.c int spi_flash_scan(struct spi_flash *flash) · line 1057

Quoted 10 lines
drivers/mtd/spi/spi_flash.c +6 -1
+        * The Spansion S25FS512S, S25FL032P and S25FL064P have 256b pages,
+        * yet use the 0x4d00 Extended JEDEC code. The rest of the Spansion
+        * flashes with the 0x4d00 Extended JEDEC code have 512b pages.
+        * All of the others have 256b pages.
         */
        if (JEDEC_EXT(info) == 0x4d00) {
                if ((JEDEC_ID(info) != 0x0215) &&
-                   (JEDEC_ID(info) != 0x0216))
+                   (JEDEC_ID(info) != 0x0216) &&
+                   (JEDEC_ID(info) != 0x0220))

0220 is JEDEC ID for S25FS512S which is 512 is it? commit message says 256b?

#2 lore raw

PATCH 1/1 driver/mtd/spi: Default page size Spansion flash "S25FS512S" is 256b

Quoted 33 lines

-----Original Message-----
From: Jagan Teki [mailto:jagannadh.teki at gmail.com]
Sent: Wednesday, May 9, 2018 4:44 PM
To: Ashish Kumar <[email protected]>
Cc: U-Boot Mailing List <[email protected]>
Subject: Re: [U-Boot] [PATCH] driver/mtd/spi: Default page size Spansion flash "S25FS512S" is 256b

Quoted 21 lines · Ashish Kumar
---
 drivers/mtd/spi/spi_flash.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
drivers/mtd/spi/spi_flash.c +4 -4
index 3d24a08..ce420cb 100644
@@ -1046,14 +1046,15 @@ int spi_flash_scan(struct spi_flash *flash)
        flash->shift = (flash->dual_flash & SF_DUAL_PARALLEL_FLASH) ? 1 : 0;
        flash->page_size = info->page_size;
        /*
-        * The Spansion S25FL032P and S25FL064P have 256b pages, yet use the
-        * 0x4d00 Extended JEDEC code. The rest of the Spansion flashes with
-        * the 0x4d00 Extended JEDEC code have 512b pages. All of the others
-        * have 256b pages.
+        * The Spansion S25FS512S, S25FL032P and S25FL064P have 256b pages,
+        * yet use the 0x4d00 Extended JEDEC code. The rest of the Spansion
+        * flashes with the 0x4d00 Extended JEDEC code have 512b pages.
+        * All of the others have 256b pages.
Quoted 8 lines

drivers/mtd/spi/spi_flash.c int spi_flash_scan(struct spi_flash *flash) · line 1057

Quoted 6 lines
drivers/mtd/spi/spi_flash.c +2 -1
         */
        if (JEDEC_EXT(info) == 0x4d00) {
                if ((JEDEC_ID(info) != 0x0215) &&
-                   (JEDEC_ID(info) != 0x0216))
+                   (JEDEC_ID(info) != 0x0216) &&
+                   (JEDEC_ID(info) != 0x0220))

0220 is JEDEC ID for S25FS512S which is 512 is it? commit message says 256b?

Yes, 0220 is for S25FS512S. The loops says all JEDEC EXT starting 0x4d00 is 512b, except 215,216 and 220.

Regards
Ashish

#3 lore raw

PATCH 1/1 driver/mtd/spi: Default page size Spansion flash "S25FS512S" is 256b

Quoted 41 lines · Ashish Kumar
Quoted 33 lines

-----Original Message-----
From: Jagan Teki [mailto:jagannadh.teki at gmail.com]
Sent: Wednesday, May 9, 2018 4:44 PM
To: Ashish Kumar <[email protected]>
Cc: U-Boot Mailing List <[email protected]>
Subject: Re: [U-Boot] [PATCH] driver/mtd/spi: Default page size Spansion flash "S25FS512S" is 256b

Quoted 21 lines · Ashish Kumar
---
 drivers/mtd/spi/spi_flash.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
drivers/mtd/spi/spi_flash.c +4 -4
index 3d24a08..ce420cb 100644
@@ -1046,14 +1046,15 @@ int spi_flash_scan(struct spi_flash *flash)
        flash->shift = (flash->dual_flash & SF_DUAL_PARALLEL_FLASH) ? 1 : 0;
        flash->page_size = info->page_size;
        /*
-        * The Spansion S25FL032P and S25FL064P have 256b pages, yet use the
-        * 0x4d00 Extended JEDEC code. The rest of the Spansion flashes with
-        * the 0x4d00 Extended JEDEC code have 512b pages. All of the others
-        * have 256b pages.
+        * The Spansion S25FS512S, S25FL032P and S25FL064P have 256b pages,
+        * yet use the 0x4d00 Extended JEDEC code. The rest of the Spansion
+        * flashes with the 0x4d00 Extended JEDEC code have 512b pages.
+        * All of the others have 256b pages.
Quoted 8 lines

drivers/mtd/spi/spi_flash.c int spi_flash_scan(struct spi_flash *flash) · line 1057

Quoted 6 lines
drivers/mtd/spi/spi_flash.c +2 -1
         */
        if (JEDEC_EXT(info) == 0x4d00) {
                if ((JEDEC_ID(info) != 0x0215) &&
-                   (JEDEC_ID(info) != 0x0216))
+                   (JEDEC_ID(info) != 0x0216) &&
+                   (JEDEC_ID(info) != 0x0220))

0220 is JEDEC ID for S25FS512S which is 512 is it? commit message says 256b?

Quoted 1 line

Yes, 0220 is for S25FS512S. The loops says all JEDEC EXT starting 0x4d00 is 512b, except 215,216 and 220.

Added proper commit message and

Applied to u-boot-spi/master