diff mbox

[U-Boot,2/4] dm: serial: ns16550: Add pre-reloc flag to the driver

Message ID 1449244720-19253-2-git-send-email-sjg@chromium.org
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Simon Glass Dec. 4, 2015, 3:58 p.m. UTC
For platforms that don't use device tree in SPL the only way to mark this
driver as 'required by relocation' is with the DM_FLAG_PRE_RELOC flag. Add
this to ensure that the driver is bound.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Stephen Warren <swarren@nvidia.com>
---

 drivers/serial/ns16550.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Thomas Chou Dec. 5, 2015, 5:53 a.m. UTC | #1
On 2015年12月04日 23:58, Simon Glass wrote:
> For platforms that don't use device tree in SPL the only way to mark this
> driver as 'required by relocation' is with the DM_FLAG_PRE_RELOC flag. Add
> this to ensure that the driver is bound.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> Reported-by: Stephen Warren <swarren@nvidia.com>
> ---
>
>   drivers/serial/ns16550.c | 1 +
>   1 file changed, 1 insertion(+)
>

Acked-by: Thomas Chou <thomas@wytron.com.tw>
Tom Rini Dec. 6, 2015, 10:08 p.m. UTC | #2
On Fri, Dec 04, 2015 at 08:58:38AM -0700, Simon Glass wrote:

> For platforms that don't use device tree in SPL the only way to mark this
> driver as 'required by relocation' is with the DM_FLAG_PRE_RELOC flag. Add
> this to ensure that the driver is bound.
> 
> Fixes: fde7e18938d8 ("dm: tegra: pci: Move CONFIG_PCI_TEGRA to Kconfig")
> Signed-off-by: Simon Glass <sjg@chromium.org>
> Reported-by: Stephen Warren <swarren@nvidia.com>
> Acked-by: Thomas Chou <thomas@wytron.com.tw>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c
index 166deab..256c7ea 100644
--- a/drivers/serial/ns16550.c
+++ b/drivers/serial/ns16550.c
@@ -451,5 +451,6 @@  U_BOOT_DRIVER(ns16550_serial) = {
 	.priv_auto_alloc_size = sizeof(struct NS16550),
 	.probe = ns16550_serial_probe,
 	.ops	= &ns16550_serial_ops,
+	.flags	= DM_FLAG_PRE_RELOC,
 };
 #endif /* CONFIG_DM_SERIAL */