From: Pratyush Yadav <p.yadav@ti.com>
To: Tudor Ambarus <tudor.ambarus@microchip.com>
Cc: macromorgan@hotmail.com, vigneshr@ti.com, jaimeliao@mxic.com.tw,
richard@nod.at, esben@geanix.com, linux@rasmusvillemoes.dk,
knaerzche@gmail.com, nicolas.ferre@microchip.com,
michael@walle.cc, 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: Re: [PATCH v4 05/13] mtd: spi-nor: Rework the flash_info flags
Date: Thu, 2 Dec 2021 15:31:54 +0530 [thread overview]
Message-ID: <20211202100152.h2j2hlsbf7xwvi3h@ti.com> (raw)
In-Reply-To: <20211122095020.393346-6-tudor.ambarus@microchip.com>
On 22/11/21 11:50AM, Tudor Ambarus wrote:
> Clarify for what the flash_info flags are used for. Split them in
> four categories and a bool:
> 1/ FLAGS: flags that indicate support that is not defined by the JESD216
> standard in its SFDP tables.
> 2/ NO_SFDP_FLAGS: these flags are used when the flash does not define the
> SFDP tables. These flags indicate support that can be discovered via
> SFDP. Used together with SPI_NOR_SKIP_SFDP flag.
> 3/ FIXUP_FLAGS: flags that indicate support that can be discovered
> via SFDP ideally, but can not be discovered for this particular flash
> because the SFDP table that indicates this support is not defined by
> the flash. In case the table for this support is defined but has wrong
> values, one should instead use a post_sfdp() hook to set the SNOR_F
> equivalent flag.
> 4/ MFR_FLAGS: manufacturer private flags. Used in the manufacturer
> fixup hooks to differentiate support between flashes of the same
> manufacturer.
> 5/ PARSE_SFDP: sets info->parse_sfdp to true. All flash_info entries
> that support SFDP should be converted to set info->parse_sfdp to true.
>
> SPI NOR flashes that statically declare one of the
> SPI_NOR_{DUAL, QUAD, OCTAL, OCTAL_DTR}_READ flags and do not support
> the RDSFDP command are gratuiously receiving the RDSFDP command
> in the attempt of parsing the SFDP tables. It is not desirable to issue
> commands that are not supported, so introduce PARSE_SFDP to help on this
> situation.
>
> New flash additions/updates should be declared/updated to use either
> PARSE_SFDP or SPI_NOR_SKIP_SFDP. Once all the flash_info entries are
> converted to use SPI_NOR_SKIP_SFDP or PARSE_SFDP, we can get rid of the
> SPI_NOR_SKIP_SFDP flag and use just the bool nor->info->parse_sfdp to
> determine whether to parse SFDP or not. SPI_NOR_SKIP_SFDP flag is kept
> just as a way to differentiate whether a flash is converted to the new
> flags logic or not.
> Support that can be discovered when parsing SFDP should not be duplicated
> by explicit flags at flash declaration. All the flash parameters will be
> discovered when parsing SFDP. Sometimes manufacturers wrongly define some
> fields in the SFDP tables. If that's the case, SFDP data can be amended
> with the fixups() hooks. It is not common, but if the SFDP tables are
> entirely wrong, and it does not worth the hassle to tweak the SFDP
> parameters by using the fixups hooks, or if the flash does not define the
> SFDP tables at all, then statically init the flash with the
> SPI_NOR_SKIP_SFDP flag and specify the rest of flash capabilities with
> the flash info flags.
>
> With time, we want to convert all flashes to use PARSE_SFDP and
> stop triggering the SFDP parsing with the
> SPI_NOR_{DUAL, QUAD, OCTAL*}_READ flags. Getting rid of the
> SPI_NOR_{OCTAL, OCTAL_DTR}_READ trigger is easily achievable,
> the rest are a long term goal.
>
> Manufacturer specific flags like USE_CLSR, USE_FSR, SPI_NOR_XSR_RDY,
> will be removed in a future series.
>
> No functional changes intended in this patch.
>
> Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Thanks, this looks quite good to me.
Reviewed-by: Pratyush Yadav <p.yadav@ti.com>
--
Regards,
Pratyush Yadav
Texas Instruments Inc.
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2021-12-02 10:03 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-22 9:50 [PATCH v4 00/13] mtd: spi-nor: Clean params init Tudor Ambarus
2021-11-22 9:50 ` [PATCH v4 01/13] mtd: spi-nor: core: Don't use mtd_info in the NOR's probe sequence of calls Tudor Ambarus
2021-11-22 18:28 ` Michael Walle
2021-11-30 9:56 ` Pratyush Yadav
2021-12-03 12:03 ` Tudor.Ambarus
2021-11-22 9:50 ` [PATCH v4 02/13] mtd: spi-nor: Introduce spi_nor_set_mtd_info() Tudor Ambarus
2021-12-02 9:19 ` Pratyush Yadav
2021-12-03 12:03 ` Tudor.Ambarus
2021-11-22 9:50 ` [PATCH v4 03/13] mtd: spi-nor: core: Call spi_nor_post_sfdp_fixups() only when SFDP is defined Tudor Ambarus
2021-12-02 9:31 ` Pratyush Yadav
2021-11-22 9:50 ` [PATCH v4 04/13] mtd: spi-nor: core: Introduce flash_info mfr_flags Tudor Ambarus
2021-11-22 18:34 ` Michael Walle
2021-11-23 6:43 ` Tudor.Ambarus
2021-12-02 9:32 ` Pratyush Yadav
2021-11-22 9:50 ` [PATCH v4 05/13] mtd: spi-nor: Rework the flash_info flags Tudor Ambarus
2021-12-02 10:01 ` Pratyush Yadav [this message]
2021-11-22 9:50 ` [PATCH v4 06/13] mtd: spi-nor: Introduce spi_nor_init_flags() Tudor Ambarus
2021-11-22 9:50 ` [PATCH v4 07/13] mtd: spi-nor: Introduce spi_nor_init_fixup_flags() Tudor Ambarus
2021-11-22 9:50 ` [PATCH v4 08/13] mtd: spi-nor: core: Init all flash parameters based on SFDP where possible Tudor Ambarus
2021-11-22 9:50 ` [PATCH v4 09/13] mtd: spi-nor: core: Move spi_nor_set_addr_width() in spi_nor_setup() Tudor Ambarus
2021-11-22 9:50 ` [PATCH v4 10/13] mtd: spi-nor: winbond: w25q256jvm: Init flash based on SFDP Tudor Ambarus
2021-11-22 9:50 ` [PATCH v4 11/13] mtd: spi-nor: spansion: s25fl256s0: Skip SFDP parsing Tudor Ambarus
2021-11-22 9:50 ` [PATCH v4 12/13] mtd: spi-nor: gigadevice: gd25q256: Init flash based on SFDP Tudor Ambarus
2021-11-22 18:19 ` Michael Walle
2021-11-22 9:50 ` [PATCH v4 13/13] mtd: spi-nor: issi: is25lp256: " 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=20211202100152.h2j2hlsbf7xwvi3h@ti.com \
--to=p.yadav@ti.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=richard@nod.at \
--cc=sr@denx.de \
--cc=tudor.ambarus@microchip.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).