mbox series

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

Message ID CAPnjgZ1YeWG8LO1XgWjs-9Zu0=nYNRDpT_2SegKeyyNvKY2iBA@mail.gmail.com
State Changes Requested
Delegated to: Tom Rini
Headers show
Series [U-Boot] Please pull u-boot-dm | expand

Pull-request

git://git.denx.de/u-boot-dm.git tags/pull-15oct-18

Message

Simon Glass Oct. 15, 2018, 8:17 p.m. UTC
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)

----------------------------------------------------------------
Bring in part of the regmap series (the part that builds)
Minor fixes in core driver model

----------------------------------------------------------------
Bin Meng (8):
      dm: cpu: Fix print_cpuinfo() output
      cpu: mpc83xx: Remove unnecessary characters in the description string
      dm: util: Add a livetree equivalent API of dm_fdt_pre_reloc()
      dm: core: Respect drivers with the DM_FLAG_PRE_RELOC flag in
lists_bind_fdt()
      dm: Correct pre_reloc_only parameter description in several APIs' comments
      dm: core: Mirror the chosen node parse logic in the livetree scanning
      test: dm: core: Add a test case for driver marked with
DM_FLAG_PRE_RELOC flag
      timer: Sort Kconfig driver entries

Mario Six (8):
      test: regmap: Increase size of syscon0 memory
      regmap: Fix documentation
      regmap: Add documentation
      regmap: Improve error handling
      misc: Sort Makefile entries
      misc: Add gdsys_soc driver
      misc: Add IHS FPGA driver
      core: ofnode: Fix mem leak in error path

Simon Glass (2):
      sandbox: Try to start the RAM buffer at a particular address
      buildman: Add a --boards option to specify particular boards to build

 Documentation/devicetree/bindings/misc/gdsys,iocon_fpga.txt |  19 +
 Documentation/devicetree/bindings/misc/gdsys,iocpu_fpga.txt |  19 +
 Documentation/devicetree/bindings/misc/gdsys,soc.txt        |  16 +
 arch/sandbox/cpu/os.c                                       |   7 +-
 arch/sandbox/dts/test.dts                                   |   6 +-
 common/board_f.c                                            |   2 +-
 drivers/core/device.c                                       |   2 +-
 drivers/core/lists.c                                        |   9 +-
 drivers/core/ofnode.c                                       |   4 +-
 drivers/core/regmap.c                                       |  23 +
 drivers/core/root.c                                         |  20 +-
 drivers/core/util.c                                         |  25 +
 drivers/cpu/mpc83xx_cpu.c                                   |   2 +-
 drivers/misc/Kconfig                                        |  17 +
 drivers/misc/Makefile                                       |  60 +--
 drivers/misc/gdsys_soc.c                                    |  74 +++
 drivers/misc/gdsys_soc.h                                    |  23 +
 drivers/misc/ihs_fpga.c                                     | 867
++++++++++++++++++++++++++++++++++
 drivers/misc/ihs_fpga.h                                     |  49 ++
 drivers/serial/serial-uclass.c                              |   2 +-
 drivers/timer/Kconfig                                       | 110 ++---
 drivers/timer/timer-uclass.c                                |   2 +-
 include/dm/device-internal.h                                |   4 +-
 include/dm/lists.h                                          |   9 +-
 include/dm/root.h                                           |  17 +-
 include/dm/util.h                                           |  27 +-
 include/regmap.h                                            |  48 +-
 test/dm/bus.c                                               |   2 +-
 test/dm/regmap.c                                            |   2 +-
 test/dm/test-fdt.c                                          |  29 +-
 tools/buildman/README                                       |  12 +-
 tools/buildman/board.py                                     |  28 +-
 tools/buildman/cmdline.py                                   |   4 +-
 tools/buildman/control.py                                   |  20 +-
 tools/buildman/test.py                                      |  31 +-
 35 files changed, 1440 insertions(+), 151 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/misc/gdsys,iocon_fpga.txt
 create mode 100644 Documentation/devicetree/bindings/misc/gdsys,iocpu_fpga.txt
 create mode 100644 Documentation/devicetree/bindings/misc/gdsys,soc.txt
 create mode 100644 drivers/misc/gdsys_soc.c
 create mode 100644 drivers/misc/gdsys_soc.h
 create mode 100644 drivers/misc/ihs_fpga.c
 create mode 100644 drivers/misc/ihs_fpga.h

Regards,
Simon

Comments

Stephen Warren Oct. 15, 2018, 9:53 p.m. UTC | #1
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.
Stephen Warren Oct. 15, 2018, 10:43 p.m. UTC | #2
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.
Bin Meng Oct. 15, 2018, 11:43 p.m. UTC | #3
Hi Stephen,

On Tue, Oct 16, 2018 at 6:43 AM Stephen Warren <swarren@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?

Regards,
Bin
Tom Rini Oct. 16, 2018, 12:32 a.m. UTC | #4
On Tue, Oct 16, 2018 at 07:43:21AM +0800, Bin Meng wrote:
> Hi Stephen,
> 
> On Tue, Oct 16, 2018 at 6:43 AM Stephen Warren <swarren@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?

and I'm going to hold off on this PR until we have this sorted out.
Thanks all!
Stephen Warren Oct. 16, 2018, 4:27 p.m. UTC | #5
On 10/15/18 5:43 PM, Bin Meng wrote:
> Hi Stephen,
> 
> On Tue, Oct 16, 2018 at 6:43 AM Stephen Warren <swarren@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.
Bin Meng Oct. 16, 2018, 11:01 p.m. UTC | #6
Hi Stephen,

On Wed, Oct 17, 2018 at 12:27 AM Stephen Warren <swarren@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@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.

Regards,
Bin
Bin Meng Oct. 17, 2018, 2:33 a.m. UTC | #7
On Wed, Oct 17, 2018 at 7:01 AM Bin Meng <bmeng.cn@gmail.com> wrote:
>
> Hi Stephen,
>
> On Wed, Oct 17, 2018 at 12:27 AM Stephen Warren <swarren@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@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
Bin Meng Oct. 17, 2018, 2:40 a.m. UTC | #8
On Wed, Oct 17, 2018 at 10:33 AM Bin Meng <bmeng.cn@gmail.com> wrote:
>
> On Wed, Oct 17, 2018 at 7:01 AM Bin Meng <bmeng.cn@gmail.com> wrote:
> >
> > Hi Stephen,
> >
> > On Wed, Oct 17, 2018 at 12:27 AM Stephen Warren <swarren@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@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.
>

I don't think we have enough time before release to address all of
these issues. Let's go with the following:

Simon, can you please just drop the 3 patches below:

      dm: core: Respect drivers with the DM_FLAG_PRE_RELOC flag in
lists_bind_fdt()
      dm: core: Mirror the chosen node parse logic in the livetree scanning
      test: dm: core: Add a test case for driver marked with
DM_FLAG_PRE_RELOC flag

> 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.
>

I will work with a complete patchset targeting next release to clean up these.

Regards,
Bin
Stephen Warren Oct. 17, 2018, 5:14 p.m. UTC | #9
On 10/16/18 8:33 PM, Bin Meng wrote:
> On Wed, Oct 17, 2018 at 7:01 AM Bin Meng <bmeng.cn@gmail.com> wrote:
>>
>> Hi Stephen,
>>
>> On Wed, Oct 17, 2018 at 12:27 AM Stephen Warren <swarren@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@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.

I don't see any cases where u-boot,dm-pre-reloc exists in DT for the 
Tegra GPIO driver specifically, so I think a simple patch removing the 
DM_FLAG_PRE_RELOC flag from the two Tegra GPIO drivers would be fine. Of 
course, I didn't look at any non-Tegra DTs, or at drivers other than 
Tegra GPIO.
Simon Glass Oct. 19, 2018, 3:27 a.m. UTC | #10
Hi,

On 17 October 2018 at 11:14, Stephen Warren <swarren@wwwdotorg.org> wrote:
> On 10/16/18 8:33 PM, Bin Meng wrote:
>>
>> On Wed, Oct 17, 2018 at 7:01 AM Bin Meng <bmeng.cn@gmail.com> wrote:
>>>
>>>
>>> Hi Stephen,
>>>
>>> On Wed, Oct 17, 2018 at 12:27 AM Stephen Warren <swarren@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@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.

Thanks Bin,

>>
>>
>> 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.
>
>
> I don't see any cases where u-boot,dm-pre-reloc exists in DT for the Tegra
> GPIO driver specifically, so I think a simple patch removing the
> DM_FLAG_PRE_RELOC flag from the two Tegra GPIO drivers would be fine. Of
> course, I didn't look at any non-Tegra DTs, or at drivers other than Tegra
> GPIO.

OK.

I tend to agree that it is getting a bit late. I am considering
delaying this pull request until the next merge window. I still have
regmap and virtio to bring in. Tom, what do you think?

Regards,
Simon
Tom Rini Oct. 19, 2018, 12:10 p.m. UTC | #11
On Thu, Oct 18, 2018 at 09:27:49PM -0600, Simon Glass wrote:
> Hi,
> 
> On 17 October 2018 at 11:14, Stephen Warren <swarren@wwwdotorg.org> wrote:
> > On 10/16/18 8:33 PM, Bin Meng wrote:
> >>
> >> On Wed, Oct 17, 2018 at 7:01 AM Bin Meng <bmeng.cn@gmail.com> wrote:
> >>>
> >>>
> >>> Hi Stephen,
> >>>
> >>> On Wed, Oct 17, 2018 at 12:27 AM Stephen Warren <swarren@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@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.
> 
> Thanks Bin,
> 
> >>
> >>
> >> 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.
> >
> >
> > I don't see any cases where u-boot,dm-pre-reloc exists in DT for the Tegra
> > GPIO driver specifically, so I think a simple patch removing the
> > DM_FLAG_PRE_RELOC flag from the two Tegra GPIO drivers would be fine. Of
> > course, I didn't look at any non-Tegra DTs, or at drivers other than Tegra
> > GPIO.
> 
> OK.
> 
> I tend to agree that it is getting a bit late. I am considering
> delaying this pull request until the next merge window. I still have
> regmap and virtio to bring in. Tom, what do you think?
> 

Start the PR over and look for things it really makes sense to grab at
-rc2 (bugfixes, Kconfig migrations, etc) is what I think we need to do
at this point, thanks!
Bin Meng Oct. 22, 2018, 9:46 a.m. UTC | #12
Hi Simon,

On Fri, Oct 19, 2018 at 8:10 PM Tom Rini <trini@konsulko.com> wrote:
>
> On Thu, Oct 18, 2018 at 09:27:49PM -0600, Simon Glass wrote:
> > Hi,
> >
> > On 17 October 2018 at 11:14, Stephen Warren <swarren@wwwdotorg.org> wrote:
> > > On 10/16/18 8:33 PM, Bin Meng wrote:
> > >>
> > >> On Wed, Oct 17, 2018 at 7:01 AM Bin Meng <bmeng.cn@gmail.com> wrote:
> > >>>
> > >>>
> > >>> Hi Stephen,
> > >>>
> > >>> On Wed, Oct 17, 2018 at 12:27 AM Stephen Warren <swarren@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@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.
> >
> > Thanks Bin,
> >
> > >>
> > >>
> > >> 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.
> > >
> > >
> > > I don't see any cases where u-boot,dm-pre-reloc exists in DT for the Tegra
> > > GPIO driver specifically, so I think a simple patch removing the
> > > DM_FLAG_PRE_RELOC flag from the two Tegra GPIO drivers would be fine. Of
> > > course, I didn't look at any non-Tegra DTs, or at drivers other than Tegra
> > > GPIO.
> >
> > OK.
> >
> > I tend to agree that it is getting a bit late. I am considering
> > delaying this pull request until the next merge window. I still have
> > regmap and virtio to bring in. Tom, what do you think?
> >
>
> Start the PR over and look for things it really makes sense to grab at
> -rc2 (bugfixes, Kconfig migrations, etc) is what I think we need to do
> at this point, thanks!

I just realized that without my fix in this PR, some x86 boards just
don't boot. I have a series that fixes the x86 boot problem @
http://patchwork.ozlabs.org/project/uboot/list/?series=70686.

It looks that I have to send out a fix to correct Tegra in this
release now, and leave other clean ups in next release. Is that OK?

Regards,
Bin
Tom Rini Oct. 22, 2018, 11:11 a.m. UTC | #13
On Mon, Oct 22, 2018 at 05:46:20PM +0800, Bin Meng wrote:
> Hi Simon,
> 
> On Fri, Oct 19, 2018 at 8:10 PM Tom Rini <trini@konsulko.com> wrote:
> >
> > On Thu, Oct 18, 2018 at 09:27:49PM -0600, Simon Glass wrote:
> > > Hi,
> > >
> > > On 17 October 2018 at 11:14, Stephen Warren <swarren@wwwdotorg.org> wrote:
> > > > On 10/16/18 8:33 PM, Bin Meng wrote:
> > > >>
> > > >> On Wed, Oct 17, 2018 at 7:01 AM Bin Meng <bmeng.cn@gmail.com> wrote:
> > > >>>
> > > >>>
> > > >>> Hi Stephen,
> > > >>>
> > > >>> On Wed, Oct 17, 2018 at 12:27 AM Stephen Warren <swarren@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@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.
> > >
> > > Thanks Bin,
> > >
> > > >>
> > > >>
> > > >> 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.
> > > >
> > > >
> > > > I don't see any cases where u-boot,dm-pre-reloc exists in DT for the Tegra
> > > > GPIO driver specifically, so I think a simple patch removing the
> > > > DM_FLAG_PRE_RELOC flag from the two Tegra GPIO drivers would be fine. Of
> > > > course, I didn't look at any non-Tegra DTs, or at drivers other than Tegra
> > > > GPIO.
> > >
> > > OK.
> > >
> > > I tend to agree that it is getting a bit late. I am considering
> > > delaying this pull request until the next merge window. I still have
> > > regmap and virtio to bring in. Tom, what do you think?
> > >
> >
> > Start the PR over and look for things it really makes sense to grab at
> > -rc2 (bugfixes, Kconfig migrations, etc) is what I think we need to do
> > at this point, thanks!
> 
> I just realized that without my fix in this PR, some x86 boards just
> don't boot. I have a series that fixes the x86 boot problem @
> http://patchwork.ozlabs.org/project/uboot/list/?series=70686.
> 
> It looks that I have to send out a fix to correct Tegra in this
> release now, and leave other clean ups in next release. Is that OK?

OK with me.
Bin Meng Oct. 24, 2018, 1:40 p.m. UTC | #14
Hi Simon,

On Mon, Oct 22, 2018 at 7:11 PM Tom Rini <trini@konsulko.com> wrote:
>
> On Mon, Oct 22, 2018 at 05:46:20PM +0800, Bin Meng wrote:
> > Hi Simon,
> >
> > On Fri, Oct 19, 2018 at 8:10 PM Tom Rini <trini@konsulko.com> wrote:
> > >
> > > On Thu, Oct 18, 2018 at 09:27:49PM -0600, Simon Glass wrote:
> > > > Hi,
> > > >
> > > > On 17 October 2018 at 11:14, Stephen Warren <swarren@wwwdotorg.org> wrote:
> > > > > On 10/16/18 8:33 PM, Bin Meng wrote:
> > > > >>
> > > > >> On Wed, Oct 17, 2018 at 7:01 AM Bin Meng <bmeng.cn@gmail.com> wrote:
> > > > >>>
> > > > >>>
> > > > >>> Hi Stephen,
> > > > >>>
> > > > >>> On Wed, Oct 17, 2018 at 12:27 AM Stephen Warren <swarren@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@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.
> > > >
> > > > Thanks Bin,
> > > >
> > > > >>
> > > > >>
> > > > >> 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.
> > > > >
> > > > >
> > > > > I don't see any cases where u-boot,dm-pre-reloc exists in DT for the Tegra
> > > > > GPIO driver specifically, so I think a simple patch removing the
> > > > > DM_FLAG_PRE_RELOC flag from the two Tegra GPIO drivers would be fine. Of
> > > > > course, I didn't look at any non-Tegra DTs, or at drivers other than Tegra
> > > > > GPIO.
> > > >
> > > > OK.
> > > >
> > > > I tend to agree that it is getting a bit late. I am considering
> > > > delaying this pull request until the next merge window. I still have
> > > > regmap and virtio to bring in. Tom, what do you think?
> > > >
> > >
> > > Start the PR over and look for things it really makes sense to grab at
> > > -rc2 (bugfixes, Kconfig migrations, etc) is what I think we need to do
> > > at this point, thanks!
> >
> > I just realized that without my fix in this PR, some x86 boards just
> > don't boot. I have a series that fixes the x86 boot problem @
> > http://patchwork.ozlabs.org/project/uboot/list/?series=70686.
> >
> > It looks that I have to send out a fix to correct Tegra in this
> > release now, and leave other clean ups in next release. Is that OK?
>
> OK with me.

I spent some time creating a complete patch series [1] which cleans up
all (I hope) DM_FLAG_PRE_RELOC flag usage. That should fix the
reported Tegra issue as well as potential issues on some other boards.

[1] http://patchwork.ozlabs.org/project/uboot/list/?series=72403

Regards,
Bin
Simon Glass Oct. 24, 2018, 2:14 p.m. UTC | #15
Hi Tom,

On 19 October 2018 at 06:10, Tom Rini <trini@konsulko.com> wrote:
> On Thu, Oct 18, 2018 at 09:27:49PM -0600, Simon Glass wrote:
>> Hi,
>>
>> On 17 October 2018 at 11:14, Stephen Warren <swarren@wwwdotorg.org> wrote:
>> > On 10/16/18 8:33 PM, Bin Meng wrote:
>> >>
>> >> On Wed, Oct 17, 2018 at 7:01 AM Bin Meng <bmeng.cn@gmail.com> wrote:
>> >>>
>> >>>
>> >>> Hi Stephen,
>> >>>
>> >>> On Wed, Oct 17, 2018 at 12:27 AM Stephen Warren <swarren@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@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.
>>
>> Thanks Bin,
>>
>> >>
>> >>
>> >> 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.
>> >
>> >
>> > I don't see any cases where u-boot,dm-pre-reloc exists in DT for the Tegra
>> > GPIO driver specifically, so I think a simple patch removing the
>> > DM_FLAG_PRE_RELOC flag from the two Tegra GPIO drivers would be fine. Of
>> > course, I didn't look at any non-Tegra DTs, or at drivers other than Tegra
>> > GPIO.
>>
>> OK.
>>
>> I tend to agree that it is getting a bit late. I am considering
>> delaying this pull request until the next merge window. I still have
>> regmap and virtio to bring in. Tom, what do you think?
>>
>
> Start the PR over and look for things it really makes sense to grab at
> -rc2 (bugfixes, Kconfig migrations, etc) is what I think we need to do
> at this point, thanks!

Just to follow up, I really don't see anything that fits that category.

Bin, are any of your patches necessary for this release to actually fix boards?

Regards,
Simon
Simon Glass Oct. 24, 2018, 2:14 p.m. UTC | #16
Hi BIn,

On 24 October 2018 at 07:40, Bin Meng <bmeng.cn@gmail.com> wrote:
> Hi Simon,
>
> On Mon, Oct 22, 2018 at 7:11 PM Tom Rini <trini@konsulko.com> wrote:
>>
>> On Mon, Oct 22, 2018 at 05:46:20PM +0800, Bin Meng wrote:
>> > Hi Simon,
>> >
>> > On Fri, Oct 19, 2018 at 8:10 PM Tom Rini <trini@konsulko.com> wrote:
>> > >
>> > > On Thu, Oct 18, 2018 at 09:27:49PM -0600, Simon Glass wrote:
>> > > > Hi,
>> > > >
>> > > > On 17 October 2018 at 11:14, Stephen Warren <swarren@wwwdotorg.org> wrote:
>> > > > > On 10/16/18 8:33 PM, Bin Meng wrote:
>> > > > >>
>> > > > >> On Wed, Oct 17, 2018 at 7:01 AM Bin Meng <bmeng.cn@gmail.com> wrote:
>> > > > >>>
>> > > > >>>
>> > > > >>> Hi Stephen,
>> > > > >>>
>> > > > >>> On Wed, Oct 17, 2018 at 12:27 AM Stephen Warren <swarren@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@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.
>> > > >
>> > > > Thanks Bin,
>> > > >
>> > > > >>
>> > > > >>
>> > > > >> 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.
>> > > > >
>> > > > >
>> > > > > I don't see any cases where u-boot,dm-pre-reloc exists in DT for the Tegra
>> > > > > GPIO driver specifically, so I think a simple patch removing the
>> > > > > DM_FLAG_PRE_RELOC flag from the two Tegra GPIO drivers would be fine. Of
>> > > > > course, I didn't look at any non-Tegra DTs, or at drivers other than Tegra
>> > > > > GPIO.
>> > > >
>> > > > OK.
>> > > >
>> > > > I tend to agree that it is getting a bit late. I am considering
>> > > > delaying this pull request until the next merge window. I still have
>> > > > regmap and virtio to bring in. Tom, what do you think?
>> > > >
>> > >
>> > > Start the PR over and look for things it really makes sense to grab at
>> > > -rc2 (bugfixes, Kconfig migrations, etc) is what I think we need to do
>> > > at this point, thanks!
>> >
>> > I just realized that without my fix in this PR, some x86 boards just
>> > don't boot. I have a series that fixes the x86 boot problem @
>> > http://patchwork.ozlabs.org/project/uboot/list/?series=70686.
>> >
>> > It looks that I have to send out a fix to correct Tegra in this
>> > release now, and leave other clean ups in next release. Is that OK?
>>
>> OK with me.
>
> I spent some time creating a complete patch series [1] which cleans up
> all (I hope) DM_FLAG_PRE_RELOC flag usage. That should fix the
> reported Tegra issue as well as potential issues on some other boards.
>
> [1] http://patchwork.ozlabs.org/project/uboot/list/?series=72403

Thank you for that, will take a look.

Regards,
Simon
Bin Meng Oct. 24, 2018, 2:28 p.m. UTC | #17
Hi Simon,

On Wed, Oct 24, 2018 at 10:14 PM Simon Glass <sjg@chromium.org> wrote:
>
> Hi Tom,
>
> On 19 October 2018 at 06:10, Tom Rini <trini@konsulko.com> wrote:
> > On Thu, Oct 18, 2018 at 09:27:49PM -0600, Simon Glass wrote:
> >> Hi,
> >>
> >> On 17 October 2018 at 11:14, Stephen Warren <swarren@wwwdotorg.org> wrote:
> >> > On 10/16/18 8:33 PM, Bin Meng wrote:
> >> >>
> >> >> On Wed, Oct 17, 2018 at 7:01 AM Bin Meng <bmeng.cn@gmail.com> wrote:
> >> >>>
> >> >>>
> >> >>> Hi Stephen,
> >> >>>
> >> >>> On Wed, Oct 17, 2018 at 12:27 AM Stephen Warren <swarren@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@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.
> >>
> >> Thanks Bin,
> >>
> >> >>
> >> >>
> >> >> 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.
> >> >
> >> >
> >> > I don't see any cases where u-boot,dm-pre-reloc exists in DT for the Tegra
> >> > GPIO driver specifically, so I think a simple patch removing the
> >> > DM_FLAG_PRE_RELOC flag from the two Tegra GPIO drivers would be fine. Of
> >> > course, I didn't look at any non-Tegra DTs, or at drivers other than Tegra
> >> > GPIO.
> >>
> >> OK.
> >>
> >> I tend to agree that it is getting a bit late. I am considering
> >> delaying this pull request until the next merge window. I still have
> >> regmap and virtio to bring in. Tom, what do you think?
> >>
> >
> > Start the PR over and look for things it really makes sense to grab at
> > -rc2 (bugfixes, Kconfig migrations, etc) is what I think we need to do
> > at this point, thanks!
>
> Just to follow up, I really don't see anything that fits that category.
>
> Bin, are any of your patches necessary for this release to actually fix boards?
>

Do you mean VirtIO patches? If we can get that merged, that will be
great! We can mention a feature-rich support of QEMU RISC-V as so far
it only has a serial port :)

Regards,
Bin
Simon Glass Oct. 24, 2018, 2:33 p.m. UTC | #18
Hi Tom,

On 24 October 2018 at 08:28, Bin Meng <bmeng.cn@gmail.com> wrote:
> Hi Simon,
>
> On Wed, Oct 24, 2018 at 10:14 PM Simon Glass <sjg@chromium.org> wrote:
>>
>> Hi Tom,
>>
>> On 19 October 2018 at 06:10, Tom Rini <trini@konsulko.com> wrote:
>> > On Thu, Oct 18, 2018 at 09:27:49PM -0600, Simon Glass wrote:
>> >> Hi,
>> >>
>> >> On 17 October 2018 at 11:14, Stephen Warren <swarren@wwwdotorg.org> wrote:
>> >> > On 10/16/18 8:33 PM, Bin Meng wrote:
>> >> >>
>> >> >> On Wed, Oct 17, 2018 at 7:01 AM Bin Meng <bmeng.cn@gmail.com> wrote:
>> >> >>>
>> >> >>>
>> >> >>> Hi Stephen,
>> >> >>>
>> >> >>> On Wed, Oct 17, 2018 at 12:27 AM Stephen Warren <swarren@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@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.
>> >>
>> >> Thanks Bin,
>> >>
>> >> >>
>> >> >>
>> >> >> 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.
>> >> >
>> >> >
>> >> > I don't see any cases where u-boot,dm-pre-reloc exists in DT for the Tegra
>> >> > GPIO driver specifically, so I think a simple patch removing the
>> >> > DM_FLAG_PRE_RELOC flag from the two Tegra GPIO drivers would be fine. Of
>> >> > course, I didn't look at any non-Tegra DTs, or at drivers other than Tegra
>> >> > GPIO.
>> >>
>> >> OK.
>> >>
>> >> I tend to agree that it is getting a bit late. I am considering
>> >> delaying this pull request until the next merge window. I still have
>> >> regmap and virtio to bring in. Tom, what do you think?
>> >>
>> >
>> > Start the PR over and look for things it really makes sense to grab at
>> > -rc2 (bugfixes, Kconfig migrations, etc) is what I think we need to do
>> > at this point, thanks!
>>
>> Just to follow up, I really don't see anything that fits that category.
>>
>> Bin, are any of your patches necessary for this release to actually fix boards?
>>
>
> Do you mean VirtIO patches? If we can get that merged, that will be
> great! We can mention a feature-rich support of QEMU RISC-V as so far
> it only has a serial port :)

I didn't mean that. Since it is fairly self-contained I could pull it
in if Tom agrees. If I did I suppose there are a few more patches that
might qualify.

Regards,
Simon
Tom Rini Oct. 25, 2018, 2:22 p.m. UTC | #19
On Wed, Oct 24, 2018 at 08:33:01AM -0600, Simon Glass wrote:
> Hi Tom,
> 
> On 24 October 2018 at 08:28, Bin Meng <bmeng.cn@gmail.com> wrote:
> > Hi Simon,
> >
> > On Wed, Oct 24, 2018 at 10:14 PM Simon Glass <sjg@chromium.org> wrote:
> >>
> >> Hi Tom,
> >>
> >> On 19 October 2018 at 06:10, Tom Rini <trini@konsulko.com> wrote:
> >> > On Thu, Oct 18, 2018 at 09:27:49PM -0600, Simon Glass wrote:
> >> >> Hi,
> >> >>
> >> >> On 17 October 2018 at 11:14, Stephen Warren <swarren@wwwdotorg.org> wrote:
> >> >> > On 10/16/18 8:33 PM, Bin Meng wrote:
> >> >> >>
> >> >> >> On Wed, Oct 17, 2018 at 7:01 AM Bin Meng <bmeng.cn@gmail.com> wrote:
> >> >> >>>
> >> >> >>>
> >> >> >>> Hi Stephen,
> >> >> >>>
> >> >> >>> On Wed, Oct 17, 2018 at 12:27 AM Stephen Warren <swarren@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@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.
> >> >>
> >> >> Thanks Bin,
> >> >>
> >> >> >>
> >> >> >>
> >> >> >> 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.
> >> >> >
> >> >> >
> >> >> > I don't see any cases where u-boot,dm-pre-reloc exists in DT for the Tegra
> >> >> > GPIO driver specifically, so I think a simple patch removing the
> >> >> > DM_FLAG_PRE_RELOC flag from the two Tegra GPIO drivers would be fine. Of
> >> >> > course, I didn't look at any non-Tegra DTs, or at drivers other than Tegra
> >> >> > GPIO.
> >> >>
> >> >> OK.
> >> >>
> >> >> I tend to agree that it is getting a bit late. I am considering
> >> >> delaying this pull request until the next merge window. I still have
> >> >> regmap and virtio to bring in. Tom, what do you think?
> >> >>
> >> >
> >> > Start the PR over and look for things it really makes sense to grab at
> >> > -rc2 (bugfixes, Kconfig migrations, etc) is what I think we need to do
> >> > at this point, thanks!
> >>
> >> Just to follow up, I really don't see anything that fits that category.
> >>
> >> Bin, are any of your patches necessary for this release to actually fix boards?
> >>
> >
> > Do you mean VirtIO patches? If we can get that merged, that will be
> > great! We can mention a feature-rich support of QEMU RISC-V as so far
> > it only has a serial port :)
> 
> I didn't mean that. Since it is fairly self-contained I could pull it
> in if Tom agrees. If I did I suppose there are a few more patches that
> might qualify.

While I sit here QA'ing the i.MX8 stuff again, I don't think the virtio
stuff has been waiting quite as long so.. If there's no bug/regression
fixes we need in the DM area right now, lets hold all of that off then,
we're ~2 weeks from v2018.11 at this point.  Thanks!