Re: [PATCH v1] Revert "ARM: dts: imx7: Fix NAND controller size-cells"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Francesco,

francesco@xxxxxxxxxx wrote on Mon, 5 Dec 2022 20:07:18 +0100:

> On Mon, Dec 05, 2022 at 07:52:08PM +0100, Marek Vasut wrote:
> > On 12/5/22 19:18, Miquel Raynal wrote:  
> > > marex@xxxxxxx wrote on Mon, 5 Dec 2022 19:07:14 +0100:  
> > > > On 12/5/22 18:58, Miquel Raynal wrote:  
> > > > > , it's not
> > > > > complex to do, there are plenty of examples. This would be IMHO a
> > > > > better step ahead rather than just a cell change. Anyway, I don't mind
> > > > > reverting this once we've sorted this mess out and fixed U-Boot.  
> > > > 
> > > > Won't we still have issues with older bootloader versions which
> > > > paste partitions directly into this &gpmi {} node, and which needs
> > > > to be fixed up in the parser in the end ?  
> > > 
> > > I believe fdt_fixup_mtdparts() should be killed, so we should no longer
> > > have this problem.  
> > 
> > The fdt_fixup_mtdparts is U-Boot code. If contemporary Linux kernel is
> > booted with ancient U-Boot, then you would still get defective DT passed to
> > Linux, and that should be fixed up by Linux. Removing fdt_fixup_mtdparts()
> > from current mainline U-Boot won't solve this problem.
> > 
> > I think this is also what Francesco is trying to convey (please correct me
> > if I'm wrong).  

If we can get rid of fdt_fixup_mtdparts(), it means someone has to
create the partitions. I guess the easy way would be to just provide
mtdparts to Linux like all the other boards and let Linux deal with it.
Then we can just assume in Linux that perhaps if the partitions are
invalid (#size-cell is wrong?) then we should just stop their creation
and fallback to another mechanism instead of failing entirely. This way
no need for hackish changes in the parsers and compatibility is still
valid with old U-Boot (if mtdparts was provided on the cmdline, to be
checked). Otherwise we'll have to deal with it in Linux, that's a pity.

Thanks,
Miquèl




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux