ARM: OMAP2+: Try to parse earlycon from parent too
authorTony Lindgren <tony@atomide.com>
Thu, 22 Feb 2018 22:04:25 +0000 (14:04 -0800)
committerTony Lindgren <tony@atomide.com>
Thu, 1 Mar 2018 00:32:09 +0000 (16:32 -0800)
With ti-sysc driver the "ti,hwmods" property will be moved to the
interconnect target module instead of the child device. To keep
earlycon working, we need to match against the interconnect target
module in the ti-sysc case.

Cc: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/omap_hwmod.c

index fca22f7ac0e3b19b0c7ebc1dd39a852792cce9ab..2d554a48eb617433d8e7cc8d5058f1a7a11b6e5d 100644 (file)
@@ -3492,6 +3492,12 @@ static void __init omap_hwmod_setup_earlycon_flags(void)
                        if (np) {
                                uart = of_get_property(np, "ti,hwmods", NULL);
                                oh = omap_hwmod_lookup(uart);
+                               if (!oh) {
+                                       uart = of_get_property(np->parent,
+                                                              "ti,hwmods",
+                                                              NULL);
+                                       oh = omap_hwmod_lookup(uart);
+                               }
                                if (oh)
                                        oh->flags |= DEBUG_OMAPUART_FLAGS;
                        }