From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: Defining schemas for Device Tree
Date: Wed, 31 Jul 2013 00:01:09 -0700 [thread overview]
Message-ID: <20130731070108.GS7656@atomide.com> (raw)
In-Reply-To: <CAKON4OwY3xh3UGjTxb4ypkcmrTpVYO-FZovq-ierabYMf4CDQA@mail.gmail.com>
* jonsmirl at gmail.com <jonsmirl@gmail.com> [130730 11:36]:
> On Tue, Jul 30, 2013 at 2:25 PM, Stephen Warren <swarren@wwwdotorg.org> wrote:
> > On 07/30/2013 12:04 PM, jonsmirl at gmail.com wrote:
> > ...
> >> So what does an alternating use of strings do?
> >>
> >> dmas = "tx", <&pdma0 7>, "rx", <&pdma0 6>;
> >
> > cat > temp.dts << ENDOFHERE
> > /dts-v1/;
> >
> > / {
> > dmas = "tx", <&pdma0 7>, "rx", <&pdma0 6>;
> >
> > pdma0: dma { };
> > };
> > ENDOFHERE
> >
> > dtc -O dtb -o temp.dtb -I dts temp.dts
> >
> > hexdump -C temp.dtb
> >
> > yields:
> >
> >> 00000000 d0 0d fe ed 00 00 00 ab 00 00 00 38 00 00 00 98 |...........8....|
> >> 00000010 00 00 00 28 00 00 00 11 00 00 00 10 00 00 00 00 |...(............|
> >> 00000020 00 00 00 13 00 00 00 60 00 00 00 00 00 00 00 00 |.......`........|
> >> 00000030 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 |................|
> >> 00000040 00 00 00 03 00 00 00 16 00 00 00 00 74 78 00 00 |............tx..|
> > ss ss ss pp
> >> 00000050 00 00 01 00 00 00 07 72 78 00 00 00 00 01 00 00 |.......rx.......|
> > pp pp pp ii ii ii ii ss ss ss pp pp pp pp ii ii
> >> 00000060 00 06 00 00 00 00 00 01 64 6d 61 00 00 00 00 03 |........dma.....|
> > ii ii
> >
> > ... where ss represents a string byte, pp a phandle byte, ii an integer
> > byte.
> >
> >> 00000070 00 00 00 04 00 00 00 05 00 00 00 01 00 00 00 03 |................|
> >> 00000080 00 00 00 04 00 00 00 0b 00 00 00 01 00 00 00 02 |................|
> >> 00000090 00 00 00 02 00 00 00 09 64 6d 61 73 00 6c 69 6e |........dmas.lin|
> >> 000000a0 75 78 2c 70 68 61 6e 64 6c 65 00 |ux,phandle.|
> >
> > Starting about half way through that last line is the string table.
> >
> > (the string table indirection is for property names, not property
> > values, and it looks like not for node names either)
>
> Ok, so this won't work without introducing variable length data. Too
> bad, I would have liked to eliminate the paired attributes.
Yup that's my experience too. But then again, using string values
in .dts should not be done in general as it bloats things and makes
the parsing slow.
These kind of names for something is usually something that should
be implemented as user space debug tools, and the kernel really does
not need to know names for something coming from DT.
Of course without using string names there's the issue how to know
what is rx dma and what is tx dma in the binding :) Probably what
we've done with interrupt numbers is the way to go with DT to avoid
string names.
Regards,
Tony
next prev parent reply other threads:[~2013-07-31 7:01 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-29 0:21 Defining schemas for Device Tree Tomasz Figa
2013-07-29 1:30 ` jonsmirl at gmail.com
2013-07-29 8:27 ` David Woodhouse
2013-07-29 8:40 ` Tomasz Figa
2013-07-29 15:01 ` Jason Cooper
2013-07-29 16:49 ` Dave Martin
2013-07-29 17:11 ` Jason Gunthorpe
2013-07-29 17:23 ` [Ksummit-2013-discuss] " Jason Cooper
2013-07-29 17:29 ` Jason Gunthorpe
2013-07-29 19:48 ` Mark Brown
2013-07-29 22:29 ` David Gibson
2013-07-29 22:48 ` Jason Cooper
2013-07-29 23:45 ` David Gibson
2013-07-30 12:12 ` Jason Cooper
2013-07-30 0:41 ` David Lang
2013-07-30 0:49 ` jonsmirl at gmail.com
2013-07-30 1:50 ` David Gibson
2013-07-30 12:17 ` Jason Cooper
2013-07-29 18:15 ` Jason Gunthorpe
2013-07-29 22:26 ` Tomasz Figa
2013-07-29 21:47 ` Stephen Warren
2013-07-29 22:20 ` Tomasz Figa
2013-07-30 0:02 ` Stephen Warren
2013-07-29 22:23 ` jonsmirl at gmail.com
2013-07-29 22:45 ` Tomasz Figa
2013-07-30 0:30 ` jonsmirl at gmail.com
2013-07-30 10:25 ` Mark Brown
2013-07-30 13:14 ` jonsmirl at gmail.com
2013-07-30 17:19 ` Stephen Warren
2013-07-30 17:29 ` jonsmirl at gmail.com
2013-07-30 17:34 ` Stephen Warren
2013-07-30 17:45 ` jonsmirl at gmail.com
2013-07-30 17:49 ` Stephen Warren
2013-07-30 18:03 ` jonsmirl at gmail.com
2013-07-30 18:04 ` jonsmirl at gmail.com
2013-07-30 18:25 ` Stephen Warren
2013-07-30 18:28 ` jonsmirl at gmail.com
2013-07-31 7:01 ` Tony Lindgren [this message]
2013-08-01 20:04 ` Matt Sealey
2013-07-30 18:26 ` jonsmirl at gmail.com
2013-07-30 20:57 ` Mark Brown
2013-07-30 22:19 ` jonsmirl at gmail.com
2013-07-30 23:03 ` Mark Brown
2013-07-30 23:23 ` jonsmirl at gmail.com
2013-07-31 11:34 ` Mark Brown
2013-07-31 12:01 ` jonsmirl at gmail.com
2013-07-31 12:21 ` Tomasz Figa
2013-07-31 16:29 ` [Ksummit-2013-discuss] " Thomas Petazzoni
2013-07-31 16:41 ` Sascha Hauer
2013-07-31 16:59 ` Dave Martin
2013-07-31 18:59 ` Mark Brown
2013-08-01 14:29 ` Dave Martin
2013-07-31 19:57 ` Stephen Warren
2013-07-31 20:47 ` Stephen Warren
2013-07-31 23:04 ` Tomasz Figa
2013-07-30 22:16 ` Tomasz Figa
2013-07-30 22:26 ` Stephen Warren
2013-07-30 22:27 ` jonsmirl at gmail.com
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=20130731070108.GS7656@atomide.com \
--to=tony@atomide.com \
--cc=linux-arm-kernel@lists.infradead.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).