All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tudor Ambarus <tudor.ambarus@microchip.com>
To: <michael@walle.cc>, <p.yadav@ti.com>
Cc: macromorgan@hotmail.com, vigneshr@ti.com,
	Tudor Ambarus <tudor.ambarus@microchip.com>,
	jaimeliao@mxic.com.tw, richard@nod.at, esben@geanix.com,
	linux@rasmusvillemoes.dk, knaerzche@gmail.com,
	nicolas.ferre@microchip.com, linux-mtd@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org, code@reto-schneider.ch,
	miquel.raynal@bootlin.com, heiko.thiery@gmail.com, sr@denx.de,
	mail@david-bauer.net, zhengxunli@mxic.com.tw
Subject: [PATCH v6 12/14] mtd: spi-nor: spansion: s25fl256s0: Skip SFDP parsing
Date: Tue, 7 Dec 2021 16:02:52 +0200	[thread overview]
Message-ID: <20211207140254.87681-13-tudor.ambarus@microchip.com> (raw)
In-Reply-To: <20211207140254.87681-1-tudor.ambarus@microchip.com>

s25fl256s0 does not define the SFDP tables nor implements the
RDSFDP 0x5a command. Skip the SFDP parsing in order to avoid
issuing an unsupported command to the flash.

Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
---

root@sama5d2-xplained:~# cat /sys/devices/platform/ahb/ahb:apb/f0020000.spi/spi_master/spi1/spi1.0/spi-nor/jedec_id
0102194d0080
root@sama5d2-xplained:~# cat /sys/devices/platform/ahb/ahb:apb/f0020000.spi/spi_master/spi1/spi1.0/spi-nor/manufacturer
spansion
root@sama5d2-xplained:~# cat /sys/devices/platform/ahb/ahb:apb/f0020000.spi/spi_master/spi1/spi1.0/spi-nor/partname
s25fl256s0
root@sama5d2-xplained:~# cat /sys/devices/platform/ahb/ahb:apb/f0020000.spi/spi_master/spi1/spi1.0/spi-nor/sfdp
cat: '/sys/devices/platform/ahb/ahb:apb/f0020000.spi/spi_master/spi1/spi1.0/spi-nor/sfdp': No such file or directory

 drivers/mtd/spi-nor/spansion.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/mtd/spi-nor/spansion.c b/drivers/mtd/spi-nor/spansion.c
index f2a2995a7718..f44401287811 100644
--- a/drivers/mtd/spi-nor/spansion.c
+++ b/drivers/mtd/spi-nor/spansion.c
@@ -210,7 +210,8 @@ static const struct flash_info spansion_parts[] = {
 		NO_SFDP_FLAGS(SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
 	{ "s25fl256s0", INFO6(0x010219, 0x4d0080, 256 * 1024, 128)
 		FLAGS(USE_CLSR)
-		NO_SFDP_FLAGS(SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
+		NO_SFDP_FLAGS(SPI_NOR_SKIP_SFDP | SPI_NOR_DUAL_READ |
+			      SPI_NOR_QUAD_READ) },
 	{ "s25fl256s1", INFO6(0x010219, 0x4d0180, 64 * 1024, 512)
 		FLAGS(USE_CLSR)
 		NO_SFDP_FLAGS(SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
-- 
2.25.1


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

WARNING: multiple messages have this Message-ID (diff)
From: Tudor Ambarus <tudor.ambarus@microchip.com>
To: <michael@walle.cc>, <p.yadav@ti.com>
Cc: macromorgan@hotmail.com, vigneshr@ti.com,
	Tudor Ambarus <tudor.ambarus@microchip.com>,
	jaimeliao@mxic.com.tw, richard@nod.at, esben@geanix.com,
	linux@rasmusvillemoes.dk, knaerzche@gmail.com,
	linux-mtd@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org, code@reto-schneider.ch,
	miquel.raynal@bootlin.com, heiko.thiery@gmail.com, sr@denx.de,
	figgyc@figgyc.uk, mail@david-bauer.net, zhengxunli@mxic.com.tw
Subject: [PATCH v6 12/14] mtd: spi-nor: spansion: s25fl256s0: Skip SFDP parsing
Date: Tue, 7 Dec 2021 16:02:52 +0200	[thread overview]
Message-ID: <20211207140254.87681-13-tudor.ambarus@microchip.com> (raw)
In-Reply-To: <20211207140254.87681-1-tudor.ambarus@microchip.com>

s25fl256s0 does not define the SFDP tables nor implements the
RDSFDP 0x5a command. Skip the SFDP parsing in order to avoid
issuing an unsupported command to the flash.

Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
---

root@sama5d2-xplained:~# cat /sys/devices/platform/ahb/ahb:apb/f0020000.spi/spi_master/spi1/spi1.0/spi-nor/jedec_id
0102194d0080
root@sama5d2-xplained:~# cat /sys/devices/platform/ahb/ahb:apb/f0020000.spi/spi_master/spi1/spi1.0/spi-nor/manufacturer
spansion
root@sama5d2-xplained:~# cat /sys/devices/platform/ahb/ahb:apb/f0020000.spi/spi_master/spi1/spi1.0/spi-nor/partname
s25fl256s0
root@sama5d2-xplained:~# cat /sys/devices/platform/ahb/ahb:apb/f0020000.spi/spi_master/spi1/spi1.0/spi-nor/sfdp
cat: '/sys/devices/platform/ahb/ahb:apb/f0020000.spi/spi_master/spi1/spi1.0/spi-nor/sfdp': No such file or directory

 drivers/mtd/spi-nor/spansion.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/mtd/spi-nor/spansion.c b/drivers/mtd/spi-nor/spansion.c
index f2a2995a7718..f44401287811 100644
--- a/drivers/mtd/spi-nor/spansion.c
+++ b/drivers/mtd/spi-nor/spansion.c
@@ -210,7 +210,8 @@ static const struct flash_info spansion_parts[] = {
 		NO_SFDP_FLAGS(SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
 	{ "s25fl256s0", INFO6(0x010219, 0x4d0080, 256 * 1024, 128)
 		FLAGS(USE_CLSR)
-		NO_SFDP_FLAGS(SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
+		NO_SFDP_FLAGS(SPI_NOR_SKIP_SFDP | SPI_NOR_DUAL_READ |
+			      SPI_NOR_QUAD_READ) },
 	{ "s25fl256s1", INFO6(0x010219, 0x4d0180, 64 * 1024, 512)
 		FLAGS(USE_CLSR)
 		NO_SFDP_FLAGS(SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2021-12-07 14:33 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-07 14:02 [PATCH v6 00/14] mtd: spi-nor: Clean params init Tudor Ambarus
2021-12-07 14:02 ` Tudor Ambarus
2021-12-07 14:02 ` [PATCH v6 01/14] mtd: spi-nor: Fix mtd size for s3an flashes Tudor Ambarus
2021-12-07 14:02   ` Tudor Ambarus
2021-12-07 14:02 ` [PATCH v6 02/14] mtd: spi-nor: core: Don't use mtd_info in the NOR's probe sequence of calls Tudor Ambarus
2021-12-07 14:02   ` Tudor Ambarus
2021-12-07 14:02 ` [PATCH v6 03/14] mtd: spi-nor: Introduce spi_nor_set_mtd_info() Tudor Ambarus
2021-12-07 14:02   ` Tudor Ambarus
2021-12-07 14:02 ` [PATCH v6 04/14] mtd: spi-nor: core: Call spi_nor_post_sfdp_fixups() only when SFDP is defined Tudor Ambarus
2021-12-07 14:02   ` Tudor Ambarus
2021-12-07 14:02 ` [PATCH v6 05/14] mtd: spi-nor: core: Introduce flash_info mfr_flags Tudor Ambarus
2021-12-07 14:02   ` Tudor Ambarus
2021-12-07 14:02 ` [PATCH v6 06/14] mtd: spi-nor: Rework the flash_info flags Tudor Ambarus
2021-12-07 14:02   ` Tudor Ambarus
2021-12-07 14:02 ` [PATCH v6 07/14] mtd: spi-nor: Introduce spi_nor_init_flags() Tudor Ambarus
2021-12-07 14:02   ` Tudor Ambarus
2021-12-07 14:02 ` [PATCH v6 08/14] mtd: spi-nor: Introduce spi_nor_init_fixup_flags() Tudor Ambarus
2021-12-07 14:02   ` Tudor Ambarus
2021-12-07 14:02 ` [PATCH v6 09/14] mtd: spi-nor: core: Init all flash parameters based on SFDP where possible Tudor Ambarus
2021-12-07 14:02   ` Tudor Ambarus
2021-12-07 14:02 ` [PATCH v6 10/14] mtd: spi-nor: core: Move spi_nor_set_addr_width() in spi_nor_setup() Tudor Ambarus
2021-12-07 14:02   ` Tudor Ambarus
2021-12-07 14:02 ` [PATCH v6 11/14] mtd: spi-nor: winbond: w25q256jvm: Init flash based on SFDP Tudor Ambarus
2021-12-07 14:02   ` Tudor Ambarus
2021-12-07 14:02 ` Tudor Ambarus [this message]
2021-12-07 14:02   ` [PATCH v6 12/14] mtd: spi-nor: spansion: s25fl256s0: Skip SFDP parsing Tudor Ambarus
2021-12-07 14:02 ` [PATCH v6 13/14] mtd: spi-nor: gigadevice: gd25q256: Init flash based on SFDP Tudor Ambarus
2021-12-07 14:02   ` Tudor Ambarus
2021-12-07 14:02 ` [PATCH v6 14/14] mtd: spi-nor: issi: is25lp256: " Tudor Ambarus
2021-12-07 14:02   ` Tudor Ambarus
2021-12-07 15:07 ` [PATCH v6 00/14] mtd: spi-nor: Clean params init Tudor Ambarus
2021-12-07 15:07   ` Tudor Ambarus

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=20211207140254.87681-13-tudor.ambarus@microchip.com \
    --to=tudor.ambarus@microchip.com \
    --cc=code@reto-schneider.ch \
    --cc=esben@geanix.com \
    --cc=heiko.thiery@gmail.com \
    --cc=jaimeliao@mxic.com.tw \
    --cc=knaerzche@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=macromorgan@hotmail.com \
    --cc=mail@david-bauer.net \
    --cc=michael@walle.cc \
    --cc=miquel.raynal@bootlin.com \
    --cc=nicolas.ferre@microchip.com \
    --cc=p.yadav@ti.com \
    --cc=richard@nod.at \
    --cc=sr@denx.de \
    --cc=vigneshr@ti.com \
    --cc=zhengxunli@mxic.com.tw \
    /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.