From: Peter Hurley <peter-WaGBZJeGNqdsbIuE7sb01tBPR1lH4CV8@public.gmane.org>
To: Stefan Agner <stefan-XLVq0VzYD2Y@public.gmane.org>,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org
Cc: galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] of/fdt: fix aliases with baudrate in earlycon
Date: Sat, 10 Oct 2015 08:48:15 -0400 [thread overview]
Message-ID: <5619090F.7040108@hurleysoftware.com> (raw)
In-Reply-To: <1444465770-3103-1-git-send-email-stefan-XLVq0VzYD2Y@public.gmane.org>
On 10/10/2015 04:29 AM, Stefan Agner wrote:
> Many boards use an alias in the stdout-path specification along
> with console options after a colon (e.g. serial0:115200n8). When
> using earlycon, this specification currently does not work. While
> fdt_path_offset supports alias resolution, it does not remove the
> console options by itself. Use the fdt_path_offset_namelen variant
> and provide the length of the alias to enable aliases with console
> options in the stdout-path.
>
> Signed-off-by: Stefan Agner <stefan-XLVq0VzYD2Y@public.gmane.org>
> ---
> Hi,
>
> Stumbled upon this while testing 32-bit ARM earlycon support. It
> seems that this once already came up on the list:
> https://lkml.org/lkml/2015/3/13/562
Yeah, looks like my patch got lost somewhere.
https://lkml.org/lkml/2015/4/8/604
Regards,
Peter Hurley
>
> drivers/of/fdt.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
> index 6e82bc42..9fc3568 100644
> --- a/drivers/of/fdt.c
> +++ b/drivers/of/fdt.c
> @@ -813,8 +813,11 @@ static int __init early_init_dt_scan_chosen_serial(void)
> if (!p || !l)
> return -ENOENT;
>
> + /* Remove console options if present */
> + l = strchrnul(p, ':') - p;
> +
> /* Get the node specified by stdout-path */
> - offset = fdt_path_offset(fdt, p);
> + offset = fdt_path_offset_namelen(fdt, p, l);
> if (offset < 0)
> return -ENODEV;
>
>
--
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
WARNING: multiple messages have this Message-ID (diff)
From: Peter Hurley <peter@hurleysoftware.com>
To: Stefan Agner <stefan@agner.ch>,
robh+dt@kernel.org, frowand.list@gmail.com,
grant.likely@linaro.org
Cc: galak@codeaurora.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] of/fdt: fix aliases with baudrate in earlycon
Date: Sat, 10 Oct 2015 08:48:15 -0400 [thread overview]
Message-ID: <5619090F.7040108@hurleysoftware.com> (raw)
In-Reply-To: <1444465770-3103-1-git-send-email-stefan@agner.ch>
On 10/10/2015 04:29 AM, Stefan Agner wrote:
> Many boards use an alias in the stdout-path specification along
> with console options after a colon (e.g. serial0:115200n8). When
> using earlycon, this specification currently does not work. While
> fdt_path_offset supports alias resolution, it does not remove the
> console options by itself. Use the fdt_path_offset_namelen variant
> and provide the length of the alias to enable aliases with console
> options in the stdout-path.
>
> Signed-off-by: Stefan Agner <stefan@agner.ch>
> ---
> Hi,
>
> Stumbled upon this while testing 32-bit ARM earlycon support. It
> seems that this once already came up on the list:
> https://lkml.org/lkml/2015/3/13/562
Yeah, looks like my patch got lost somewhere.
https://lkml.org/lkml/2015/4/8/604
Regards,
Peter Hurley
>
> drivers/of/fdt.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
> index 6e82bc42..9fc3568 100644
> --- a/drivers/of/fdt.c
> +++ b/drivers/of/fdt.c
> @@ -813,8 +813,11 @@ static int __init early_init_dt_scan_chosen_serial(void)
> if (!p || !l)
> return -ENOENT;
>
> + /* Remove console options if present */
> + l = strchrnul(p, ':') - p;
> +
> /* Get the node specified by stdout-path */
> - offset = fdt_path_offset(fdt, p);
> + offset = fdt_path_offset_namelen(fdt, p, l);
> if (offset < 0)
> return -ENODEV;
>
>
next prev parent reply other threads:[~2015-10-10 12:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-10 8:29 [PATCH] of/fdt: fix aliases with baudrate in earlycon Stefan Agner
[not found] ` <1444465770-3103-1-git-send-email-stefan-XLVq0VzYD2Y@public.gmane.org>
2015-10-10 12:48 ` Peter Hurley [this message]
2015-10-10 12:48 ` Peter Hurley
[not found] ` <5619090F.7040108-WaGBZJeGNqdsbIuE7sb01tBPR1lH4CV8@public.gmane.org>
2015-10-13 20:16 ` Rob Herring
2015-10-13 20:16 ` Rob Herring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5619090F.7040108@hurleysoftware.com \
--to=peter-wagbzjegnqdsbiue7sb01tbpr1lh4cv8@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=stefan-XLVq0VzYD2Y@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.