[U-Boot] [PATCH v1 09/14] imx: serial: dm: Enable DM_FLAG_PRE_RELOC in the IMX uart driver

Lukasz Majewski lukma at denx.de
Wed Jan 2 08:42:40 UTC 2019


Hi Marek,

> On 1/2/19 12:37 AM, Lukasz Majewski wrote:
> > The DM_FLAG_PRE_RELOC shall be enabled as this driver is going to be
> > re-used in the i.MX based SoCs.
> > 
> > It is crucial to have running the serial console before
> > relocation.  
> 
> But the patch doesn't do what the subject/commit message claims is
> does. If I understand it correctly, it sets the PRE_RELOC flag
> unconditionally.

The !CONFIG_IS_ENABLED(OF_CONTROL) [*] was set as a "workaround" for DM
problem:
SHA1: 4687919684e0e4390b9fc20d1809ecaa9dc3cb81

Let's look on this check [*] - we add this flag if the board doesn't
support OF_CONTROL. This is a bit strange as the serial_mxc.c can be
used with CONFIG_DM_SERIAL but without corresponding device tree
description (OF_CONTROL).

Other boards/SoCs have this flag set unconditionally.

And one more remark - with OF_CONTROL one needs to declare
'u-boot,dm-pre-reloc;' property in DTS to have the device probed in the
SPL's pre relocation stage.

> 
> > Signed-off-by: Lukasz Majewski <lukma at denx.de>
> > ---
> > 
> >  drivers/serial/serial_mxc.c | 2 --
> >  1 file changed, 2 deletions(-)
> > 
> > diff --git a/drivers/serial/serial_mxc.c
> > b/drivers/serial/serial_mxc.c index 7e4e6d36b8..e586c18cf0 100644
> > --- a/drivers/serial/serial_mxc.c
> > +++ b/drivers/serial/serial_mxc.c
> > @@ -354,9 +354,7 @@ U_BOOT_DRIVER(serial_mxc) = {
> >  #endif
> >  	.probe = mxc_serial_probe,
> >  	.ops	= &mxc_serial_ops,
> > -#if !CONFIG_IS_ENABLED(OF_CONTROL)
> >  	.flags = DM_FLAG_PRE_RELOC,
> > -#endif
> >  };
> >  #endif
> >  
> >   
> 
> 




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190102/e5f2ab89/attachment.sig>


More information about the U-Boot mailing list