[U-Boot] Please pull u-boot-dm

Bin Meng bmeng.cn at gmail.com
Wed Oct 17 02:33:25 UTC 2018


On Wed, Oct 17, 2018 at 7:01 AM Bin Meng <bmeng.cn at gmail.com> wrote:
>
> Hi Stephen,
>
> On Wed, Oct 17, 2018 at 12:27 AM Stephen Warren <swarren at wwwdotorg.org> wrote:
> >
> > On 10/15/18 5:43 PM, Bin Meng wrote:
> > > Hi Stephen,
> > >
> > > On Tue, Oct 16, 2018 at 6:43 AM Stephen Warren <swarren at wwwdotorg.org> wrote:
> > >>
> > >> On 10/15/18 3:53 PM, Stephen Warren wrote:
> > >>> On 10/15/18 2:17 PM, Simon Glass wrote:
> > >>>> Hi Tom,
> > >>>>
> > >>>> The following changes since commit
> > >>>> 6e7a186dc5d50f563e224e9ae7be70defff7ee0d:
> > >>>>
> > >>>>     Merge tag 'arc-more-updates-for-2018.11-rc2-2' of
> > >>>> git://git.denx.de/u-boot-arc (2018-10-15 07:20:07 -0400)
> > >>>>
> > >>>> are available in the Git repository at:
> > >>>>
> > >>>>     git://git.denx.de/u-boot-dm.git tags/pull-15oct-18
> > >>>>
> > >>>> for you to fetch changes up to 02f2d266c75106a2fefd1f4e8e6f703fe00ed21d:
> > >>>>
> > >>>>     buildman: Add a --boards option to specify particular boards to
> > >>>> build (2018-10-15 08:20:43 -0600)
> > >>>
> > >>> There's something wrong with these patches; both Jetson TX1 and Jetson
> > >>> TX2 (both 64-bit ARM without SPL) fail to boot with this branch; the
> > >>> system hangs with no output at all from U-Boot. Jetson TK1 (32-bit ARM
> > >>> with SPL) and sandbox boot fine.
> > >>
> > >> Reverting the following solves the issue:
> > >>
> > >> 1) dm: core: Mirror the chosen node parse logic in the livetree scanning
> > >>
> > >> 2) dm: core: Respect drivers with the DM_FLAG_PRE_RELOC flag in
> > >> lists_bind_fdt()
> > >>
> > >> Reverting just (1) or just (2) does not. Can you please take a look? Thanks.
> > >
> > > The failure is probably due to some drivers that Tegra uses are not
> > > properly written, ie: these drivers are declared via U_BOOT_DRIVER
> > > with flags DM_FLAG_PRE_RELOC yet it was never working (bound before
> > > relocation) until patch (1) & (2). Now these drivers get bound before
> > > relocation but they were never bound before (assume they were never
> > > required before relocation), so we should identify which driver were
> > > wrongly written, but as a quick solution, can you please enlarge the
> > > CONFIG_SYS_MALLOC_F_LEN of your board and have a try?
> >
> > Yes, bumping CONFIG_SYS_MALLOC_F_LEN from 0x1800 to 0x1a90 solves the
> > issue. Alternatively, removing DM_FLAG_PRE_RELOC in tegra_gpio.c or
> > tegra186_gpio.c (depending on board/SoC) also solves this.
> >
> > I suppose the correct solution is to remove the DM flag from the driver,
> > since if it never used to work before your patches, it's clear that the
> > flag/feature is not actually required.
>
> Thank you Stephen. I will prepare a patch to update the tegra*_gpio driver.

Ah, it turns out so many drivers/dts are mis-written ...

For example, the driver has the DM_FLAG_PRE_RELOC flag, and the dts
file also has "u-boot,dm-pre-reloc". The "u-boot,dm-pre-reloc" must
have been added to workaround the DM bug (fixed in patch 1 & 2
mentioned in this thread). But now since the DM bug has been fixed,
these "u-boot,dm-pre-reloc" properties are really unnecessary but I am
afraid I don't have the knowledge to clean up all of these.

Of course, I've identified some additional drivers that have
DM_FLAG_PRE_RELOC flag set but dts file doesn't have
"u-boot,dm-pre-reloc". These drivers should be updated to remove the
DM_FLAG_PRE_RELOC flag like the Tegra GPIO drivers.

Regards,
Bin


More information about the U-Boot mailing list