[PATCH v4 0/2] mtd: spi: nor: force mtd name to "nor%d"

Marek Vasut marex at denx.de
Thu Sep 23 03:32:49 CEST 2021


On 9/22/21 10:00 PM, Tom Rini wrote:
> On Wed, Sep 22, 2021 at 09:56:26PM +0200, Marek Vasut wrote:
>> On 9/22/21 9:46 PM, Tom Rini wrote:
>>> On Wed, Sep 22, 2021 at 09:24:24PM +0200, Marek Vasut wrote:
>>>
>>>> I am talking about using nor%d in MTDIDS in U-Boot UBI code to look up from
>>>> which device to attach UBI in U-Boot.
>>>
>>> OK, so are we not able to pass in the correct name now?  Or just worried
>>> about old environment and new U-Boot?
>>
>> Say you have the following in board config:
>>
>> CONFIG_MTDIDS_DEFAULT="nor0=ff705000.spi.0"
>> CONFIG_MTDPARTS_DEFAULT="mtdparts=ff705000.spi.0:-(fs);"
>>
>> Then run "=> ubi part fs", which will fail to find nor0, because now that
>> nor0 is called something else. That is what this series tries to fix.
> 
> Yes, and what is nor0 now, and what happens if you use it?

Now it is "mt25ql02g", for all mt25ql02g on the board, so ... I cannot 
even select the one SPI NOR I want to use, since they are not even 
enumerated in any way, they are all the same. You might want to look at 
get_mtd_device_nm() in drivers/mtd/mtdcore.c .


More information about the U-Boot mailing list