spi-nor: maxronix MX25L12835F support

Pratyush Yadav p.yadav at ti.com
Mon Mar 1 15:40:19 GMT 2021


On 01/03/21 02:50PM, Michael Walle wrote:
> Am 2021-03-01 14:36, schrieb Pratyush Yadav:
> > I think printing the correct flash name is somewhat important. Other
> > than the handful of people who are reading this thread, few would know
> > that SPI NOR calls mx25l12835f as mx25l12805d or vice versa. This can
> > cause a lot of confusion among people trying to debug any issues.
> 
> Unfortunately, this is kind of a mess. If multiple flash devices
> share the same id, it seems to be first come first serve. The kernel
> will print the name which was introduced first.

Install the same default_init() hook on both flashes [0]. In that hook 
check if SFDP is supported or not. Set nor->info to the correct entry 
based on this hook. I admit this is a bit hacky but getting the flash 
name right is worth the trouble IMO.

[0] Currently the flash that comes first in the order will be selected 
but that might change later and doing this will help guard against that.

> 
> This isn't the only flash which is affected. Have a look at
>   drivers/mtd/spi-nor/winbond.c
> There are all kind of flash names, some of them are not even existing
> as this particular string, eg. take w25q64jwm, its actually "Winbond
> W25Q64JW-IM or W25Q64JW-JM".
> 
> So yes, it would be nice to have such a thing, but for now, I will
> take the kernel output as a rough estimation what might really be
> used on the board.
> 
> -michael

-- 
Regards,
Pratyush Yadav
Texas Instruments Inc.



More information about the linux-mtd mailing list