All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean-Philippe Brucker <jean-philippe@linaro.org>
To: peter.maydell@linaro.org
Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org, robh+dt@kernel.org,
	Jean-Philippe Brucker <jean-philippe@linaro.org>
Subject: [PATCH v2 8/8] hw/arm/virt: Fix devicetree warnings about node names
Date: Tue, 27 Sep 2022 11:03:49 +0100	[thread overview]
Message-ID: <20220927100347.176606-9-jean-philippe@linaro.org> (raw)
In-Reply-To: <20220927100347.176606-1-jean-philippe@linaro.org>

The devicetree specification requires that nodes use a generic name
where appropriate. Fix the corresponding dt-validate warnings:

  pl061@9030000: $nodename:0: 'pl061@9030000' does not match '^gpio@[0-9a-f]+$'
  From schema: linux/Documentation/devicetree/bindings/gpio/pl061-gpio.yaml
  pl031@9010000: $nodename:0: 'pl031@9010000' does not match '^rtc(@.*|-[0-9a-f])*$'
  From schema: linux/Documentation/devicetree/bindings/rtc/arm,pl031.yaml
  pl011@9000000: $nodename:0: 'pl011@9000000' does not match '^serial(@.*)?$'
  From schema: linux/Documentation/devicetree/bindings/serial/pl011.yaml
  intc@8000000: $nodename:0: 'intc@8000000' does not match '^interrupt-controller(@[0-9a-f,]+)*$'
  From schema: linux/Documentation/devicetree/bindings/interrupt-controller/arm,gic-v3.yaml
  intc@8000000: 'its@8080000' does not match any of the regexes: '^(msi-controller|gic-its|interrupt-controller)@[0-9a-f]+$', '^gic-its@', '^interrupt-controller@[0-9a-f]+$', 'pinctrl-[0-9]+'
  From schema: linux/Documentation/devicetree/bindings/interrupt-controller/arm,gic-v3.yaml
  smmuv3@9050000: $nodename:0: 'smmuv3@9050000' does not match '^iommu@[0-9a-f]*'
  From schema: linux/Documentation/devicetree/bindings/iommu/arm,smmu-v3.yaml

Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
---
 hw/arm/virt.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 5e16d54bbb..c1e384e06f 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -481,7 +481,7 @@ static void fdt_add_its_gic_node(VirtMachineState *vms)
     MachineState *ms = MACHINE(vms);
 
     vms->msi_phandle = qemu_fdt_alloc_phandle(ms->fdt);
-    nodename = g_strdup_printf("/intc/its@%" PRIx64,
+    nodename = g_strdup_printf("/interrupt-controller/msi-controller@%" PRIx64,
                                vms->memmap[VIRT_GIC_ITS].base);
     qemu_fdt_add_subnode(ms->fdt, nodename);
     qemu_fdt_setprop_string(ms->fdt, nodename, "compatible",
@@ -500,7 +500,7 @@ static void fdt_add_v2m_gic_node(VirtMachineState *vms)
     MachineState *ms = MACHINE(vms);
     char *nodename;
 
-    nodename = g_strdup_printf("/intc/v2m@%" PRIx64,
+    nodename = g_strdup_printf("/interrupt-controller/v2m@%" PRIx64,
                                vms->memmap[VIRT_GIC_V2M].base);
     vms->msi_phandle = qemu_fdt_alloc_phandle(ms->fdt);
     qemu_fdt_add_subnode(ms->fdt, nodename);
@@ -522,7 +522,7 @@ static void fdt_add_gic_node(VirtMachineState *vms)
     vms->gic_phandle = qemu_fdt_alloc_phandle(ms->fdt);
     qemu_fdt_setprop_cell(ms->fdt, "/", "interrupt-parent", vms->gic_phandle);
 
-    nodename = g_strdup_printf("/intc@%" PRIx64,
+    nodename = g_strdup_printf("/interrupt-controller@%" PRIx64,
                                vms->memmap[VIRT_GIC_DIST].base);
     qemu_fdt_add_subnode(ms->fdt, nodename);
     qemu_fdt_setprop_cell(ms->fdt, nodename, "#interrupt-cells", 3);
@@ -857,7 +857,7 @@ static void create_uart(const VirtMachineState *vms, int uart,
                                 sysbus_mmio_get_region(s, 0));
     sysbus_connect_irq(s, 0, qdev_get_gpio_in(vms->gic, irq));
 
-    nodename = g_strdup_printf("/pl011@%" PRIx64, base);
+    nodename = g_strdup_printf("/serial@%" PRIx64, base);
     qemu_fdt_add_subnode(ms->fdt, nodename);
     /* Note that we can't use setprop_string because of the embedded NUL */
     qemu_fdt_setprop(ms->fdt, nodename, "compatible",
@@ -897,7 +897,7 @@ static void create_rtc(const VirtMachineState *vms)
 
     sysbus_create_simple("pl031", base, qdev_get_gpio_in(vms->gic, irq));
 
-    nodename = g_strdup_printf("/pl031@%" PRIx64, base);
+    nodename = g_strdup_printf("/rtc@%" PRIx64, base);
     qemu_fdt_add_subnode(ms->fdt, nodename);
     qemu_fdt_setprop(ms->fdt, nodename, "compatible", compat, sizeof(compat));
     qemu_fdt_setprop_sized_cells(ms->fdt, nodename, "reg",
@@ -999,7 +999,7 @@ static void create_gpio_devices(const VirtMachineState *vms, int gpio,
     sysbus_connect_irq(s, 0, qdev_get_gpio_in(vms->gic, irq));
 
     uint32_t phandle = qemu_fdt_alloc_phandle(ms->fdt);
-    nodename = g_strdup_printf("/pl061@%" PRIx64, base);
+    nodename = g_strdup_printf("/gpio@%" PRIx64, base);
     qemu_fdt_add_subnode(ms->fdt, nodename);
     qemu_fdt_setprop_sized_cells(ms->fdt, nodename, "reg",
                                  2, base, 2, size);
@@ -1348,7 +1348,7 @@ static void create_smmu(const VirtMachineState *vms,
                            qdev_get_gpio_in(vms->gic, irq + i));
     }
 
-    node = g_strdup_printf("/smmuv3@%" PRIx64, base);
+    node = g_strdup_printf("/iommu@%" PRIx64, base);
     qemu_fdt_add_subnode(ms->fdt, node);
     qemu_fdt_setprop(ms->fdt, node, "compatible", compat, sizeof(compat));
     qemu_fdt_setprop_sized_cells(ms->fdt, node, "reg", 2, base, 2, size);
@@ -1653,7 +1653,7 @@ void virt_machine_done(Notifier *notifier, void *data)
      * while qemu takes charge of the qom stuff.
      */
     if (info->dtb_filename == NULL) {
-        platform_bus_add_all_fdt_nodes(ms->fdt, "/intc",
+        platform_bus_add_all_fdt_nodes(ms->fdt, "/interrupt-controller",
                                        vms->memmap[VIRT_PLATFORM_BUS].base,
                                        vms->memmap[VIRT_PLATFORM_BUS].size,
                                        vms->irqmap[VIRT_PLATFORM_BUS]);
-- 
2.37.3



  parent reply	other threads:[~2022-09-27 10:19 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-27 10:03 [PATCH v2 0/8] hw/arm/virt: Fix dt-schema warnings Jean-Philippe Brucker
2022-09-27 10:03 ` [PATCH v2 1/8] hw/arm/virt: Fix devicetree warning about the root node Jean-Philippe Brucker
2022-09-27 11:30   ` Peter Maydell
2022-09-27 12:48   ` Eric Auger
2022-09-27 10:03 ` [PATCH v2 2/8] hw/arm/virt: Fix devicetree warning about the GIC node Jean-Philippe Brucker
2022-09-27 11:33   ` Peter Maydell
2022-09-27 12:48   ` Eric Auger
2022-09-27 10:03 ` [PATCH v2 3/8] hw/arm/virt: Use "msi-map" devicetree property for PCI Jean-Philippe Brucker
2022-09-27 11:36   ` Peter Maydell
2022-09-27 12:48   ` Eric Auger
2022-09-27 10:03 ` [PATCH v2 4/8] hw/arm/virt: Fix devicetree warning about the gpio-key node Jean-Philippe Brucker
2022-09-27 11:56   ` Peter Maydell
2022-10-13 21:46     ` Rob Herring
2022-10-14 11:37       ` Peter Maydell
2022-09-27 12:48   ` Eric Auger
2022-09-27 10:03 ` [PATCH v2 5/8] hw/arm/virt: Fix devicetree warnings about the GPIO node Jean-Philippe Brucker
2022-09-27 11:25   ` Peter Maydell
2022-11-29 20:55     ` Rob Herring
2022-11-30 12:27       ` Peter Maydell
2022-09-27 10:03 ` [PATCH v2 6/8] hw/arm/virt: Fix devicetree warning about the SMMU node Jean-Philippe Brucker
2022-09-27 11:37   ` Peter Maydell
2022-09-27 13:24   ` Eric Auger
2022-09-27 10:03 ` [PATCH v2 7/8] hw/arm/virt: Fix devicetree warnings about the virtio-iommu node Jean-Philippe Brucker
2022-09-27 11:46   ` Peter Maydell
2022-09-27 14:35     ` Eric Auger
2022-10-21 14:33       ` Jean-Philippe Brucker
2022-10-24 10:44         ` Peter Maydell
2022-09-27 10:03 ` Jean-Philippe Brucker [this message]
2022-09-27 11:28   ` [PATCH v2 8/8] hw/arm/virt: Fix devicetree warnings about node names Peter Maydell
2022-10-13 21:27     ` Rob Herring
2022-09-29 16:53 ` [PATCH v2 0/8] hw/arm/virt: Fix dt-schema warnings Peter Maydell

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=20220927100347.176606-9-jean-philippe@linaro.org \
    --to=jean-philippe@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=robh+dt@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.