From patchwork Tue Sep 27 10:03:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Philippe Brucker X-Patchwork-Id: 609596 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp247422pvb; Tue, 27 Sep 2022 03:19:01 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4/nFQrPUigFwVPj/z0QFUId52CM39MQBL7cpSFK6rEKba1kuinA+9/HhsJz1TPa0x4hsOM X-Received: by 2002:a05:622a:15d4:b0:35c:dda3:7bc5 with SMTP id d20-20020a05622a15d400b0035cdda37bc5mr21762239qty.676.1664273941258; Tue, 27 Sep 2022 03:19:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664273941; cv=none; d=google.com; s=arc-20160816; b=UGCPevroYjH61ai1gT1W8MEiYIousrA/vwsfmJitWowwxm9uL6OEBPw4l01Ppu/7HL 0wKhzPRB47O+vBpnHmrbQ3I01EsobbrMk1mk/p/JQnhoCNRq1Vmcqnb+h2aJ955zxRJT dHzZGmLdFlNn/6V4Vot/UnJlCqIwOKgg9JE+v8P0ScYS6sljEMRrC52Y06NuZjccIKSx YjVZOiDcKzLwlKsI72ujG17Dx39bFBfuMxgO9zPaqLmrGfjATX4hxL65mZJ+I3j/QmFt wgBdFALLV1GsfMPsciVwykBdWvg2ndnD9h0zxDwFmc/qPZ0R9QtVyLO0VU6CAe3K2UWG n5OQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=l/uG4uTbqpFsuZ8etvP0cLENEL6FoiOD5ehdUdm22Dk=; b=f/FGo4hrWhaNCrTgWuy6+ln+YWT9GnHcKFcoDE/HRH2W5kvRyzqSNwN71TBM8gc8ta DvzdKEh2xtRk5fa6jEiuu/iHWyc+wgp/KCe5z3uuA4QUxtQ32q9OYufUQz82SfIrbDit 9LlOGh1PKTrjNMJ0NWYLPlA/hF6QZ8X6bflU3f8kFJiOlk6R+gK9Nngh8VIsMDjsUxZF cKHz7on6Q7s9gYimxTVBfKVAIyotGPXzMRZVmxcv4Rb6wbiG/CmEV7wCW+06OvK9ix1A 574shIqkd+pEyvDNbYHokFQbpK8Mb/rWkZmwIzCACHx6nif5SnYKBV2m0YblBgc/1qwv PThQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SzmT04nj; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id p11-20020ad45f4b000000b004ad137e6124si652806qvg.481.2022.09.27.03.19.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 27 Sep 2022 03:19:01 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SzmT04nj; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:49132 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1od7g4-0007xZ-Qv for patch@linaro.org; Tue, 27 Sep 2022 06:19:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40112) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1od7aC-0000xn-6H for qemu-devel@nongnu.org; Tue, 27 Sep 2022 06:12:56 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]:53916) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1od7a9-0002X9-EW for qemu-devel@nongnu.org; Tue, 27 Sep 2022 06:12:55 -0400 Received: by mail-wm1-x336.google.com with SMTP id e18so6199051wmq.3 for ; Tue, 27 Sep 2022 03:12:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=l/uG4uTbqpFsuZ8etvP0cLENEL6FoiOD5ehdUdm22Dk=; b=SzmT04njVq7na/dk2EWJyqyPPOZsiwAhLTcaf7lj94wYpC4/igomIrYEzwm2CwyxX4 RrVw44Be3+rqja/PyfjAIsn7gnlxyy+4EFJxHgwpjRz44aTSRc1wXA4TGSG9KKLKrOGD lcj+mdJlSt2FoC40aMjHKqj0RaDMnUOm3YCuYoEbYNcTGkiuV2cyUa47NSH+MUerYXUi uZVCOmyr0mMe9Sv1n5VgYDU+Dfr4OkY4crVDsGSBO6dXROuwe66KNQK+DE0Vw9Gjksfc pvTrsP/HUxT3J6awcwywpf6ChHRrkZenEa7WcT1ljxH2EvM3ea5PJ+iMLzihaJ0nbyz5 A6+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=l/uG4uTbqpFsuZ8etvP0cLENEL6FoiOD5ehdUdm22Dk=; b=Em4Pyff1JpPjqaVuLA/VvAY1dOXIROkfHqmqqH76OUDKsEKiKFgJbB2heeiYRNfRmX HpbUudimfxrA6cLg1J6BKOCOeFRw63yhX0GIC656PNTN8UcyAm0UaE5Ur00sDVxD9VZg DURKlIULAfz6sUis0JLP1vDKk54jS9XbgzdyU/T2IaBwAFfWxBcLIj2/H/0Oaednxp2C zSm4XocXgbHJNm1cFMW379n5XmygqSOQn+1sQrgZ5C09FCTJ7MnPaStBvaTrnqr2dYeE mh+BUjF/RC68CcrlYycuHTo2aqTUsKIs+zsXh1wAL9e+NNrkVKoVPtHNU4nanBERjod6 lZrA== X-Gm-Message-State: ACrzQf3Ed4ny6O3u+CoUGw1q2tbmMUWKbDUYV62f/qD/8xxtK8aeDH5L SAeFThqgGFZHetmGfOfOr4NnBQ== X-Received: by 2002:a05:600c:4fce:b0:3b4:935f:b952 with SMTP id o14-20020a05600c4fce00b003b4935fb952mr1975172wmq.197.1664273571857; Tue, 27 Sep 2022 03:12:51 -0700 (PDT) Received: from localhost.localdomain (cpc92880-cmbg19-2-0-cust679.5-4.cable.virginm.net. [82.27.106.168]) by smtp.gmail.com with ESMTPSA id w6-20020adfd4c6000000b00223b8168b15sm1398387wrk.66.2022.09.27.03.12.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Sep 2022 03:12:51 -0700 (PDT) From: Jean-Philippe Brucker To: peter.maydell@linaro.org Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org, robh+dt@kernel.org, Jean-Philippe Brucker Subject: [PATCH v2 8/8] hw/arm/virt: Fix devicetree warnings about node names Date: Tue, 27 Sep 2022 11:03:49 +0100 Message-Id: <20220927100347.176606-9-jean-philippe@linaro.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220927100347.176606-1-jean-philippe@linaro.org> References: <20220927100347.176606-1-jean-philippe@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=jean-philippe@linaro.org; helo=mail-wm1-x336.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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 --- 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]);