[PATCH v5 6/6] mtd: spi-nor: add support for Macronix Octal flash

Michael Walle michael at walle.cc
Fri Nov 17 00:57:08 PST 2023


Hi,

> diff --git a/drivers/mtd/spi-nor/macronix.c 
> b/drivers/mtd/spi-nor/macronix.c
> index 48e570c04ad9..2115a25b21ce 100644
> --- a/drivers/mtd/spi-nor/macronix.c
> +++ b/drivers/mtd/spi-nor/macronix.c
> @@ -260,6 +260,27 @@ static const struct flash_info 
> macronix_nor_parts[] = {
>  		.name = "mx66uw2g345gx0",
>  		.n_banks = 4,
>  		.flags = SPI_NOR_RWW,
> +	}, {
> +		.id = SNOR_ID(0xc2, 0x83, 0x39),
> +		.name = "mx25um25345g",
> +	}, {
> +		.id = SNOR_ID(0xc2, 0x80, 0x39),
> +		.name = "mx25um25645g",
> +	}, {
> +		.id = SNOR_ID(0xc2, 0x85, 0x39),
> +		.name = "mx25lm25645g",
> +	}, {
> +		.id = SNOR_ID(0xc2, 0x80, 0x3a),
> +		.name = "mx25um51245g",
> +	}, {
> +		.id = SNOR_ID(0xc2, 0x85, 0x3a),
> +		.name = "mx25lm51245g",
> +	}, {
> +		.id = SNOR_ID(0xc2, 0x80, 0x3b),
> +		.name = "mx66um1g45g",
> +	}, {
> +		.id = SNOR_ID(0xc2, 0x85, 0x3b),
> +		.name = "mx66lm1g45g",

You need this because of the manufacturer fixup, correct? I'd like to
avoid these "empty" entries if possible. The name is useless to the 
kernel
and sometimes incorrect. Therefore, at least drop it and just list the
IDs.

Tudor, Pratyush, what do you think about calling the vendor fixups
by just looking at the JEDEC manufacturer ID *iff* there is no
entry in the flashdb? As a fallback so to speak. That would also
help for the chip erase topic, because I'd presume the chip erase
op is the same among the flashes of one vendor. So there could be
a vendor fixup, to set the chip erase op.

-michael



More information about the linux-mtd mailing list