From: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Masahiro Yamada
<yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
Cc: Devicetree Compiler
<devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
David Gibson
<david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>,
"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: Question about "unit address format error" of DTC
Date: Thu, 9 Nov 2017 08:15:11 -0600 [thread overview]
Message-ID: <CAL_Jsq+eZkCQTEHLb62Le3e6eLxt=N7EWGk7dsPAfLF9-73soQ@mail.gmail.com> (raw)
In-Reply-To: <CAK7LNARujG8J_z62bc+PQOz34rf-Bo=+M54kvtokZxnktn2Y+A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Thu, Nov 9, 2017 at 6:14 AM, Masahiro Yamada
<yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org> wrote:
> Hi Rob, David,
>
>
> I am just curious about a DTC warning.
>
>
> For example,
>
> soc {
> compatible = "simple-bus";
> #address-cells = <1>;
> #size-cells = <1>;
> ranges;
>
> foo@11111111 {
> compatible = "foo";
> reg = <0x54006800 0x40>;
> };
> };
>
> This emits the following warning.
>
> Warning (simple_bus_reg): Node /soc/foo@11111111 simple-bus unit
> address format error, expected "54006800"
>
>
> But, if I replace "simple-bus" with "simple-mfd",
> DTC is completely happy.
We could probably add simple-mfd to the check. Though, if you have
addresses, then you probably should use simple-bus. I'm not a bit fan
of simple-mfd in general.
> Why is this check limited to simple bus / PCI bus?
Because bus types are free to define their own unit address format to
some extent.
> For other cases, is mismatching @<address> allowed?
No, but it is not checked. Most other cases such as I2C and SPI buses
aren't checked because we have no generic way to key off of them. We
need schema data with compatible strings of those bus controllers to
do the checking.
Any bus type needs to define its unit address format. Generally, it
must match data fields in reg property and distinct fields are
separated by commas.
Rob
next prev parent reply other threads:[~2017-11-09 14:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-09 12:14 Question about "unit address format error" of DTC Masahiro Yamada
[not found] ` <CAK7LNARujG8J_z62bc+PQOz34rf-Bo=+M54kvtokZxnktn2Y+A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-09 14:15 ` Rob Herring [this message]
[not found] ` <CAL_Jsq+eZkCQTEHLb62Le3e6eLxt=N7EWGk7dsPAfLF9-73soQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-09 15:09 ` Masahiro Yamada
[not found] ` <CAK7LNARoE6hhhH36ZugfqCNubUQzSLYGkMrx5TzTQe-gpu4CaQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-09 18:04 ` Rob Herring
[not found] ` <CAL_JsqKjF0um6UrsyBSKF5bY3rRscRqua0ncJca6ZCOh5VcKwA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-10 1:48 ` Masahiro Yamada
[not found] ` <CAK7LNASRMBY1KjtzGxtXzkzDWgXmu3ZzfJu5kh1GRqP1WxQ6TQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-10 15:48 ` Rob Herring
[not found] ` <CAL_JsqLXRxz-VpFe5AC6NHu5UBvi8frt1CtEFSJH_JhaLDk8QQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-13 5:27 ` 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='CAL_Jsq+eZkCQTEHLb62Le3e6eLxt=N7EWGk7dsPAfLF9-73soQ@mail.gmail.com' \
--to=robh+dt-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
--cc=david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org \
--cc=devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@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).