devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] of: Fix premature bootconsole disable with 'stdout-path'
@ 2015-03-01 17:21 Peter Hurley
       [not found] ` <1425230482-6423-1-git-send-email-peter-WaGBZJeGNqdsbIuE7sb01tBPR1lH4CV8@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Hurley @ 2015-03-01 17:21 UTC (permalink / raw)
  To: Rob Herring, devicetree-u79uwXL29TY76Z2rM5mHXA, Grant Likely
  Cc: Mark Rutland, Peter Hurley, Andrew Morton

Support for devicetree serial consoles via 'stdout-path' causes
bootconsoles to be disabled when the vt dummy console loads, since
there is no preferred console (the preferred console is not added
until the device is probed).

Ensure there is at least a preferred console, even if never matched.

Requires: "console: Fix console name size mismatch"
Cc: Andrew Morton <akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
Signed-off-by: Peter Hurley <peter-WaGBZJeGNqdsbIuE7sb01tBPR1lH4CV8@public.gmane.org>
---
 drivers/of/base.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/of/base.c b/drivers/of/base.c
index 36536b6..83dc8a6 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -1885,8 +1885,10 @@ void of_alias_scan(void * (*dt_alloc)(u64 size, u64 align))
 			name = of_get_property(of_chosen, "linux,stdout-path", NULL);
 		if (IS_ENABLED(CONFIG_PPC) && !name)
 			name = of_get_property(of_aliases, "stdout", NULL);
-		if (name)
+		if (name) {
 			of_stdout = of_find_node_opts_by_path(name, &of_stdout_options);
+			add_preferred_console("stdout-path", 0, NULL);
+		}
 	}
 
 	if (!of_aliases)
-- 
2.3.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] of: Fix premature bootconsole disable with 'stdout-path'
       [not found] ` <1425230482-6423-1-git-send-email-peter-WaGBZJeGNqdsbIuE7sb01tBPR1lH4CV8@public.gmane.org>
@ 2015-03-13 15:27   ` Rob Herring
  0 siblings, 0 replies; 2+ messages in thread
From: Rob Herring @ 2015-03-13 15:27 UTC (permalink / raw)
  To: Peter Hurley
  Cc: Rob Herring, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Grant Likely, Mark Rutland, Andrew Morton

On Sun, Mar 1, 2015 at 11:21 AM, Peter Hurley <peter-WaGBZJeGNqdsbIuE7sb01tBPR1lH4CV8@public.gmane.org> wrote:
> Support for devicetree serial consoles via 'stdout-path' causes
> bootconsoles to be disabled when the vt dummy console loads, since
> there is no preferred console (the preferred console is not added
> until the device is probed).
>
> Ensure there is at least a preferred console, even if never matched.
>
> Requires: "console: Fix console name size mismatch"
> Cc: Andrew Morton <akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
> Signed-off-by: Peter Hurley <peter-WaGBZJeGNqdsbIuE7sb01tBPR1lH4CV8@public.gmane.org>

Applied for 4.0. Thanks.

Rob

> ---
>  drivers/of/base.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/of/base.c b/drivers/of/base.c
> index 36536b6..83dc8a6 100644
> --- a/drivers/of/base.c
> +++ b/drivers/of/base.c
> @@ -1885,8 +1885,10 @@ void of_alias_scan(void * (*dt_alloc)(u64 size, u64 align))
>                         name = of_get_property(of_chosen, "linux,stdout-path", NULL);
>                 if (IS_ENABLED(CONFIG_PPC) && !name)
>                         name = of_get_property(of_aliases, "stdout", NULL);
> -               if (name)
> +               if (name) {
>                         of_stdout = of_find_node_opts_by_path(name, &of_stdout_options);
> +                       add_preferred_console("stdout-path", 0, NULL);
> +               }
>         }
>
>         if (!of_aliases)
> --
> 2.3.0
>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2015-03-13 15:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-01 17:21 [PATCH] of: Fix premature bootconsole disable with 'stdout-path' Peter Hurley
     [not found] ` <1425230482-6423-1-git-send-email-peter-WaGBZJeGNqdsbIuE7sb01tBPR1lH4CV8@public.gmane.org>
2015-03-13 15:27   ` Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).