From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lukasz Majewski Date: Wed, 2 Jan 2019 09:42:40 +0100 Subject: [U-Boot] [PATCH v1 09/14] imx: serial: dm: Enable DM_FLAG_PRE_RELOC in the IMX uart driver In-Reply-To: References: <20190101233745.16433-1-lukma@denx.de> <20190101233745.16433-10-lukma@denx.de> Message-ID: <20190102094240.1dcb8d3f@jawa> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 > > --- > > > > 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: