[U-Boot] [PATCH v1 2/4] dm: board: complete the initialization of the muxes in initr_dm()
Simon Glass
sjg at chromium.org
Mon Nov 4 20:01:23 UTC 2019
Hi Jean-Jacques,
On Mon, 4 Nov 2019 at 11:07, Jean-Jacques Hiblot <jjhiblot at ti.com> wrote:
>
>
> On 30/10/2019 02:48, Simon Glass wrote:
> > Hi Jean-Jacques,
> >
> > On Wed, 2 Oct 2019 at 06:47, Jean-Jacques Hiblot <jjhiblot at ti.com> wrote:
> >> This will probe the multiplexer devices that have a "u-boot,mux-autoprobe"
> >> property. As a consequence they will be put in their idle state.
> >>
> >> Signed-off-by: Jean-Jacques Hiblot <jjhiblot at ti.com>
> >> ---
> >>
> >> common/board_r.c | 2 ++
> >> 1 file changed, 2 insertions(+)
> > I worry this should happen later, or lazily, since at present we don't
> > actually probe any devices at this point, right?
>
> It has to be done early to make sure that the platform is in the right
> state before most of the drivers are initialized. Some devices may rely
> on it without knowing it. In this way, it is similar to the gpio-hog
> mechanism.
>
> Now, I have no strong opinion on when this should really take place.
> Only it has to be after dm is initialized. Maybe it could be inserted in
> init_sequence_r, after board_init() ?
>
> It should probably be before the serial port is used, just in case
> someone multiplexed the serial port of the console.
I hit a similar issue and created this patch, which I'll send soon.
https://gitlab.denx.de/u-boot/custodians/u-boot-dm/commit/087f241416bf7a1b65575840e02a3d270d4fa440
(actually it looks a bit broken, but hopefully you get the idea)
Regards,
Simon
More information about the U-Boot
mailing list