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

Tudor Ambarus tudor.ambarus at linaro.org
Fri Nov 17 01:05:00 PST 2023



On 11/17/23 08:57, Michael Walle wrote:
> 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.
> 

I agree.

> 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.
> 

sounds good!



More information about the linux-mtd mailing list