From: Mark Rutland <mark.rutland@arm.com>
To: Laszlo Ersek <lersek@redhat.com>
Cc: "peter.maydell@linaro.org" <peter.maydell@linaro.org>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
Arnd Bergmann <arnd@arndb.de>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: [Qemu-devel] [kernel PATCH] devicetree: document ARM bindings for QEMU's Firmware Config interface
Date: Fri, 28 Nov 2014 13:33:00 +0000 [thread overview]
Message-ID: <20141128133300.GG25883@leverpostej> (raw)
In-Reply-To: <54787715.6030407@redhat.com>
On Fri, Nov 28, 2014 at 01:22:29PM +0000, Laszlo Ersek wrote:
> On 11/28/14 13:59, Arnd Bergmann wrote:
> > On Friday 28 November 2014 13:26:44 Laszlo Ersek wrote:
> >> +Example:
> >> +
> >> +/ {
> >> + #size-cells = <0x2>;
> >> + #address-cells = <0x2>;
> >> +
> >> + fw-cfg@9020000 {
> >> + reg = <0x0 0x9020000 0x0 0x2 0x0 0x9020002 0x0 0x1>;
> >> + compatible = "fw-cfg,mmio";
> >> + };
> >> +};
> >>
> >
> > "fw-cfg" is not a valid vendor string. Are you emulating an actual piece
> > of hardware here or is this something that comes from qemu?
>
> It's a made up name.
>
> > How about using "qemu,fwcfg" as the compatible string, and documenting
> > "qemu" as an official vendor string in Documentation/devicetree/bindings/vendor-prefixes.txt
>
> I can do that, certainly, but I'm not sure if that implies other QEMU
> devices should follow suit.
>
> For example, the virtio-mmio transports that qemu advertises have the
> "compatible" property "virtio,mmio". "virtio" is not a vendor prefix
> either (according to the above text file).
True, but it's a documented standard. It's obvious that 'virtio' has
something to do with the virtio standard, while it's not obvious that
'fw-cfg' as a prefix is for a qemu-specific device.
We should probably add 'virtio' as a vendor prefix.
>
> Here's the full list of compatible strings from the generated DTB:
>
> compatible = "arm,cortex-a15";
> compatible = "arm,armv7-timer";
> compatible = "arm,cortex-a15-gic";
> compatible = "arm,pl011", "arm,primecell";
> compatible = "arm,pl031", "arm,primecell";
> compatible = "arm,psci-0.2", "arm,psci";
All of these are emulated real devices or standards from ARM, so that
makes sense.
> compatible = "cfi-flash";
> compatible = "fixed-clock";
These are generic bindings, arguably they should have been 'linux,'
prefixed but it's too late now.
> compatible = "fw-cfg,mmio";
> compatible = "virtio,mmio";
> compatible = "linux,dummy-virt";
>
> According to
> <http://devicetree.org/Device_Tree_Usage#Understanding_the_compatible_Property>,
> "cfi-flash" and "fixed-clock" don't even have the correct format
> (there's no comma separating <manufacturer> from <model>).
>
> > We don't normally list contiguous registers separately. Maybe just round
> > up to one page and make the register property
> >
> > reg = <0x0 0x9020000 0x0 0x1000>;
>
> The registers are not necessarily placed shoulder to shoulder (it's not
> a requirement in the QEMU source).
It might not be at the moment, but if no-one separates them it could be
a requirement for using this binding. Is there any benefit to having
them separated?
Thanks,
Mark.
next prev parent reply other threads:[~2014-11-28 13:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-28 12:26 [Qemu-devel] [kernel PATCH] devicetree: document ARM bindings for QEMU's Firmware Config interface Laszlo Ersek
2014-11-28 12:59 ` Arnd Bergmann
2014-11-28 13:22 ` Laszlo Ersek
2014-11-28 13:33 ` Mark Rutland [this message]
2014-11-28 13:49 ` Laszlo Ersek
2014-11-28 13:17 ` Mark Rutland
2014-11-28 13:47 ` Laszlo Ersek
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=20141128133300.GG25883@leverpostej \
--to=mark.rutland@arm.com \
--cc=arnd@arndb.de \
--cc=devicetree@vger.kernel.org \
--cc=lersek@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.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).