Re: [PATCH v2] mtd: spi-nor: gigadevice: Add support for gd25lb256

From: Tudor Ambarus
Date: Tue Jul 18 2023 - 13:49:57 EST


Hi!

On 13.06.2023 07:53, Hao Yao wrote:

You need some commit message here describing your changes. Please read
https://www.kernel.org/doc/html/latest/process/submitting-patches.html
before submitting v3.

We require contributors that submit flash additions or updates to dump
the SFDP tables and do some sanity checks. Here's an example on how to
do it:
https://lore.kernel.org/linux-mtd/20230712161503.448024-1-miquel.raynal@xxxxxxxxxxx/

> Signed-off-by: Hao Yao <hao.yao@xxxxxxxxx>
> ---
> drivers/mtd/spi-nor/gigadevice.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/mtd/spi-nor/gigadevice.c b/drivers/mtd/spi-nor/gigadevice.c
> index d57ddaf1525b..d56c1876549f 100644
> --- a/drivers/mtd/spi-nor/gigadevice.c
> +++ b/drivers/mtd/spi-nor/gigadevice.c
> @@ -62,6 +62,10 @@ static const struct flash_info gigadevice_nor_parts[] = {
> FLAGS(SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
> NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ |
> SPI_NOR_QUAD_READ) },
> + { "gd25lb256", INFO(0xc86719, 0, 64 * 1024, 512)

INFO(0xc86719, 0, 0, 0) please, those params can be retrieved at SFDP
parsing time.


> + PARSE_SFDP
> + FLAGS(SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB | SPI_NOR_TB_SR_BIT6)
> + FIXUP_FLAGS(SPI_NOR_4B_OPCODES) },

Is the SPI_NOR_4B_OPCODES really needed, isn't the support determined at
SFDP parsing time?

> { "gd25q256", INFO(0xc84019, 0, 64 * 1024, 512)
> PARSE_SFDP
> FLAGS(SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB | SPI_NOR_TB_SR_BIT6)