From: "Uwe Kleine-König" <u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
To: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: "devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org"
<kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: using labels for stdout-path
Date: Thu, 11 May 2017 20:40:23 +0200 [thread overview]
Message-ID: <20170511184023.oi4bwwrutllexjen@pengutronix.de> (raw)
In-Reply-To: <CAL_JsqL66sWFovGhYGaA_sB_pnvTrjyaQ7MW3=5pkD5Qwb6y_w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
Hello,
On Thu, May 11, 2017 at 10:49:15AM -0500, Rob Herring wrote:
> +dtc list because labels are purely dts syntax.
Ah, I wasn't aware that there is a separate list for that. Thanks.
> On Thu, May 11, 2017 at 8:05 AM, Uwe Kleine-König
> <u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> wrote:
> > Hello,
> >
> > on an i.MX28 based machine I want to have the console on &duart with
> > 115200 Bd, 8 Bit, no parity.
> >
> > The options for that are AFAICT:
> >
> > - use an alias, like:
> >
> > stdout-path = "serialX:115200n8";
> >
> > the problem here is, that the duart doesn't have an alias. I guess I
> > shouldn't introduce a new one for my setup?
> >
> > - use a label, like:
> >
> > stdout-path = &duart, ":115200n8";
> >
> > This would be the prettiest, but that doesn't work, because there is
> > a '\0' separating the path and the options.
>
> You could make that work changing the kernel parsing, but that's
> probably not a good option if we ever want to support more than 1 out
> path.
Good point. That's a good reason to not use this syntax.
> > - use the full path, like:
> >
> > stdout-path = "/apb@80000000/apbx@80040000/serial@80074000:115200n8";
> >
> > This is ugly.
> >
> > Do I miss something? Is that worth to introduce new syntax, maybe
> >
> > stdout-path = &duart . ":115200n8";
> >
> > or similar?
>
> Seems like we should make a comma be significant in splitting strings.
> I'm not sure if there's anything relying on "foo" "bar" and "foo",
> "bar" being the same. At least for numbers, a comma has no meaning, so
> it would complicate the parsing I'd imagine. Not really an area I'm
> familiar with.
"foo" "bar" is a syntax error now (and another obvious candidate for
string concatination). So writing in the dts
stdout-path = &duart ":115200n8";
and getting the same result as
stdout-path = "/apb@80000000/apbx@80040000/serial@80074000:115200n8";
looks nicely and consistent with
stdout-path = &duart;
being equivalent to
stdout-path = "/apb@80000000/apbx@80040000/serial@80074000";
After a quick look into the dtc sources I imagine that wouldn't be too
hard to implement for someone being fluent in lex and yacc. And probably
it would be cheap to add the other obvious extensions like:
property = < 0x12 0x43 > "a string" &label /incbin/(filename);
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
next prev parent reply other threads:[~2017-05-11 18:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20170511130545.co6pyyvlwuitbyne@pengutronix.de>
[not found] ` <20170511130545.co6pyyvlwuitbyne-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2017-05-11 15:49 ` using labels for stdout-path Rob Herring
[not found] ` <CAL_JsqL66sWFovGhYGaA_sB_pnvTrjyaQ7MW3=5pkD5Qwb6y_w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-05-11 18:40 ` Uwe Kleine-König [this message]
[not found] ` <20170511184023.oi4bwwrutllexjen-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2017-05-12 3:48 ` David Gibson
[not found] ` <20170512034816.GA12908-K0bRW+63XPQe6aEkudXLsA@public.gmane.org>
2017-05-12 7:41 ` Uwe Kleine-König
[not found] ` <20170512074155.oshpdio2hb7cz377-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2017-05-13 8:29 ` David Gibson
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=20170511184023.oi4bwwrutllexjen@pengutronix.de \
--to=u.kleine-koenig-bicnvbalz9megne8c9+irq@public.gmane.org \
--cc=devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
--cc=robh-DgEjT+Ai2ygdnm+yROfE0A@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 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).