From: David Gibson <david@gibson.dropbear.id.au>
To: Bin Meng <bmeng.cn@gmail.com>
Cc: Bin Meng <bin.meng@windriver.com>,
qemu-ppc@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [RESEND PATCH] hw/ppc: e500: Add missing #address-cells and #size-cells in the eTSEC node
Date: Fri, 12 Mar 2021 12:25:56 +1100 [thread overview]
Message-ID: <YErDJJMlqq4j/r7V@yekko.fritz.box> (raw)
In-Reply-To: <20210311081608.66891-1-bmeng.cn@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1836 bytes --]
On Thu, Mar 11, 2021 at 04:16:08PM +0800, Bin Meng wrote:
> From: Bin Meng <bin.meng@windriver.com>
>
> Per devicetree spec v0.3 [1] chapter 2.3.5:
>
> The #address-cells and #size-cells properties are not inherited
> from ancestors in the devicetree. They shall be explicitly defined.
> If missing, a client program should assume a default value of 2
> for #address-cells, and a value of 1 for #size-cells.
>
> These properties are currently missing, causing the <reg> property
> of the queue-group subnode to be incorrectly parsed using default
> values.
>
> [1] https://github.com/devicetree-org/devicetree-specification/releases/download/v0.3/devicetree-specification-v0.3.pdf
>
> Fixes: fdfb7f2cdb2d ("e500: Add support for eTSEC in device tree")
> Signed-off-by: Bin Meng <bin.meng@windriver.com>
Applied to ppc-for-6.0 (again), thanks.
> ---
>
> hw/ppc/e500.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c
> index 1d94485ac8..79467ac512 100644
> --- a/hw/ppc/e500.c
> +++ b/hw/ppc/e500.c
> @@ -237,6 +237,8 @@ static int create_devtree_etsec(SysBusDevice *sbdev, PlatformDevtreeData *data)
> qemu_fdt_setprop_string(fdt, node, "model", "eTSEC");
> qemu_fdt_setprop(fdt, node, "local-mac-address", etsec->conf.macaddr.a, 6);
> qemu_fdt_setprop_cells(fdt, node, "fixed-link", 0, 1, 1000, 0, 0);
> + qemu_fdt_setprop_cells(fdt, node, "#size-cells", 1);
> + qemu_fdt_setprop_cells(fdt, node, "#address-cells", 1);
>
> qemu_fdt_add_subnode(fdt, group);
> qemu_fdt_setprop_cells(fdt, group, "reg", mmio0, 0x1000);
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2021-03-12 2:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-11 8:16 [RESEND PATCH] hw/ppc: e500: Add missing #address-cells and #size-cells in the eTSEC node Bin Meng
2021-03-12 1:25 ` David Gibson [this message]
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=YErDJJMlqq4j/r7V@yekko.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=bin.meng@windriver.com \
--cc=bmeng.cn@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@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).