[BUG] bind command leads to invalid state where plaform data is NULL
Simon Glass
sjg at chromium.org
Tue Jun 20 12:04:01 CEST 2023
Hi Heinrich,
On Mon, 19 Jun 2023 at 18:51, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
>
> On 6/19/23 14:57, Simon Glass wrote:
> > I suggest a simple device that needs no setup. The original commit[1]
> > suggests using USB - does that worK?
> >
> > Regards,
> > Simon
> >
> > [1] 49c752c93a78 ("cmd: Add bind/unbind commands to bind a device to a
> > driver from the command line")
>
> I see devices listed after bind but I do not see any device that could
> be used after binding it with the bind command.
It might be worth asking the author. If there is any
parent/uclass/device priv/plat then it won't be set up by this
command.
>
> Here is another instance where using the bind command leads to a crash
> (on pine64-lts_defconfig).
>
> Another question:
> Is it correct that two devices have the same name?
It shouldn't cause any problems since we don't normally reference
devices by name. But it could be confusing for the user if there are
two children of the same device with the same name.
>
> => dm tree
> Class Index Probed Driver Name
> --------------------------------------------------
> watchdog 0 [ + ] sunxi_wdt | |-- watchdog at 1c20ca0
> sysreset 0 [ ] wdt_reboot | | `-- watchdog at 1c20ca0
> => unbind sysreset 0
> => bind watchdog 0 wdt_reboot
> => reset
> resetting ...
> "Synchronous Abort" handler, esr 0x96000004, far 0xea000006ea000070
> elr: 000000004a044054 lr : 000000004a034c94 (reloc)
> elr: 00000000bdf8d054 lr : 00000000bdf7dc94
> x0 : 0000000000000000 x1 : 0000000000000000
> x2 : 00000000bdf7dc6c x3 : ea000006ea000008
> x4 : 00000000b9f1ec78 x5 : 00000000b9f2cbd0
> x6 : 0000000000000072 x7 : 00000000b9f1ed30
> x8 : 0000000000000040 x9 : fffffffffffffff0
> x10: 0000000000000006 x11: 000000000001869f
> x12: 00000000b9f1eec8 x13: 00000000b9f1efd0
> x14: 0000000000000000 x15: 00000000b9f1e79f
> x16: 00000000bdf7dc6c x17: 0000000000000000
> x18: 00000000b9f28d90 x19: 0000000000000001
> x20: 0000000000000001 x21: 0000000000000000
> x22: 00000000b9f38680 x23: 0000000000000001
> x24: 00000000bdff4f54 x25: 0000000000000000
> x26: 00000000b9f2d2d0 x27: 0000000000000000
> x28: 0000000000000000 x29: 00000000b9f1ecd0
>
> Code: a8c27bfd d65f03c0 d65f03c0 f9400003 (f9403463)
>
> The crash is in do_reset().
Looking at the device, it needs plat data and uses it in
wdt_reboot_of_to_plat().
Regards,
Simon
More information about the U-Boot
mailing list