[PATCH v1] mtd: parsers: ofpart: Fix parsing when size-cells is 0
marex at denx.de
Thu Jan 5 06:51:10 PST 2023
On 1/5/23 13:47, Francesco Dolcini wrote:
> Hello Miquel,
>> Let's move forward with this. Let's assume my fears are baseless. We
>> might consider the situation where someone tries to hide the partitions
>> by setting #size-cell to 0 even wronger and too unlikely. Hopefully we
>> will not break any other existing setups by applying an always-on fix.
> Nice, good!
>> I would still like to see U-Boot partitions handling evolve, at least:
>> - fix #size-cells in fdt_fixup_mtd()
>> - avoid the fdt_fixup_mtd() call from Collibri boards (ie. an example
>> that can be followed by the other users)
> Fine, I can do it.
> However I am just not 100% sure about your proposal, I wonder if we
> should just deprecate this function or we should fix it.
I would say fix it.
> The exact end result will depend on the discussion with the U-Boot
> folks, but I absolutely agree that the current situation needs to
> change. I'll keep you in CC on those patches.
>> On Linux side let's fix #size-cells like you proposed without filtering
>> against a list of compatibles. We however need to improve the
>> - Do it only when there are partitions declared within a NAND
>> controller node.
>> - Change the warning to avoid mentioning backward compatibility, just
>> mention this is utterly wrong and thus the value will be set to 1
>> instead of 0.
>> - Mention in the comment above this only works on systems with <4GiB
>> If you think about other conditions please feel free to add them.
>> Do you concur?
> Yes, I do agree.
Same here, agreed, thanks.
More information about the linux-mtd