All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] IMX: serial: dm: Set DM_FLAG_PRE_RELOC in the IMX uart driver
@ 2019-06-04 13:42 Lukasz Majewski
  2019-07-20  8:45 ` sbabic at denx.de
  0 siblings, 1 reply; 2+ messages in thread
From: Lukasz Majewski @ 2019-06-04 13:42 UTC (permalink / raw)
  To: u-boot

The DM_FLAG_PRE_RELOC shall be set unconditionally as this driver is going
to be re-used in both early SPL and U-Boot proper's pre-reloc.

For i.MX based devices it is crucial to have available the serial console
before relocation (otherwise the board may hand).

The device definition may be provided either via device tree description or
with U_BOOT_DEVICE(mxc_serial) definition. In the latter case the device
will not bind in U-Boot proper when DM_FLAG_PRE_RELOC is not set.

The !CONFIG_IS_ENABLED(OF_CONTROL) #if check was set as a "workaround" for
DM problem described in following commit 4687919684e0
("serial: Remove DM_FLAG_PRE_RELOC flag in various drivers").

Let's look on this check more thoroughly - 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). In such case the aforementioned
U_BOOT_DEVICE(mxc_serial) definition is used.

Other boards/SoCs have this flag set unconditionally for serial driver.

Signed-off-by: Lukasz Majewski <lukma@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 c9e7bddb7a..3996ddcf3a 100644
--- a/drivers/serial/serial_mxc.c
+++ b/drivers/serial/serial_mxc.c
@@ -366,9 +366,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
 
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot] [PATCH] IMX: serial: dm: Set DM_FLAG_PRE_RELOC in the IMX uart driver
  2019-06-04 13:42 [U-Boot] [PATCH] IMX: serial: dm: Set DM_FLAG_PRE_RELOC in the IMX uart driver Lukasz Majewski
@ 2019-07-20  8:45 ` sbabic at denx.de
  0 siblings, 0 replies; 2+ messages in thread
From: sbabic at denx.de @ 2019-07-20  8:45 UTC (permalink / raw)
  To: u-boot

> The DM_FLAG_PRE_RELOC shall be set unconditionally as this driver is going
> to be re-used in both early SPL and U-Boot proper's pre-reloc.
> For i.MX based devices it is crucial to have available the serial console
> before relocation (otherwise the board may hand).
> The device definition may be provided either via device tree description or
> with U_BOOT_DEVICE(mxc_serial) definition. In the latter case the device
> will not bind in U-Boot proper when DM_FLAG_PRE_RELOC is not set.
> The !CONFIG_IS_ENABLED(OF_CONTROL) #if check was set as a "workaround" for
> DM problem described in following commit 4687919684e0
> ("serial: Remove DM_FLAG_PRE_RELOC flag in various drivers").
> Let's look on this check more thoroughly - 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). In such case the aforementioned
> U_BOOT_DEVICE(mxc_serial) definition is used.
> Other boards/SoCs have this flag set unconditionally for serial driver.
> Signed-off-by: Lukasz Majewski <lukma@denx.de>

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-07-20  8:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-04 13:42 [U-Boot] [PATCH] IMX: serial: dm: Set DM_FLAG_PRE_RELOC in the IMX uart driver Lukasz Majewski
2019-07-20  8:45 ` sbabic at denx.de

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.