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

Tom Rini trini at konsulko.com
Wed Sep 22 21:41:15 CEST 2021


On Wed, Sep 22, 2021 at 09:24:24PM +0200, Marek Vasut wrote:
> On 9/22/21 9:05 PM, Marek Behún wrote:
> 
> Hi,
> 
> [...]
> 
> > > > I find this either not complete or not needed:
> > > > 
> > > > - either you need mtd names to be of this format so that old MTDPARTS
> > > >     config definitions do not need to be changed, i.e. something like
> > > >       CONFIG_MTDPARTS_DEFAULT="nor0:1M(u-boot),0x1000 at 0xfff000(env)"
> > > >     does not work currently, and you want to make it work.
> > > > 
> > > >     I find your solution here incomplete because MTDPARTS can also be
> > > >     used to be passed to Linux as mtdparts parameter, but there is no
> > > >     guarantee that the "norN" numbering you are creating in U-Boot will
> > > >     be the same as the one in kernel.
> > > > 
> > > > - or it is not needed, because you can remove MTDPARTS definition from
> > > >     the board config entirely and move the information into device tree.
> > > >     In fact this was the main idea behind making the series
> > > >       Support SPI NORs and OF partitions in `mtd list`
> > > >     The SPI-NOR MTDs after this series can have conflicting names,
> > > >     because you can still choose between them via OF path with the `mtd`
> > > >     command.
> > > > 
> > > >     Tom and I were of the opinion that MTDPARTS should be deprecated and
> > > >     removed in favor of OF. Marek Vasut says that this is not possible
> > > >     for every board, and so needs to stay.
> > > > 
> > > > BTW, I find it a little weird for Marek to defend old API which should
> > > > be converted to DT, when in discussion about DM USB / Nokia N900
> > > > USB TTY console [1] he was defending the opinion that we should be
> > > > heading to DT in U-Boot.
> > > > 
> > > > [1]
> > > > https://patchwork.ozlabs.org/project/uboot/patch/20210618145724.2558-1-pali@kernel.org/
> > > 
> > > That USB discussion is completely unrelated to the problem here, the USB
> > > discussion is about internal (i.e. not user facing) conversion to DM/DT.
> > > The user-facing ABI does not change there. Also, that discussion was
> > > about patching USB stack to permit new non-DM/DT operation, not fixing
> > > existing one.
> > 
> > This is not only about the user ABI (altough now I agree that you are
> > correct there, see below). What I meant is this:
> >    Should we push for converting to device-tree even if for some boards
> >    it is not possible, and would mean removing them?
> 
> The N900 could however be converted to DT as far as I can tell, there was a
> solution which didn't end up patching the USB core with legacy stuff.

Just for the record and to hopefully end this specific tangent, the
"fix" at the time was to correct the "CONFIG_USB means host or gadget"
so that N900 has more time (and an active developer on) migrating gadget
as it does not use host.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210922/f0c23d60/attachment.sig>


More information about the U-Boot mailing list