From patchwork Wed Aug 24 15:51:13 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: 599742 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:4388:0:0:0:0 with SMTP id w8csp3248594mae; Wed, 24 Aug 2022 09:13:32 -0700 (PDT) X-Google-Smtp-Source: AA6agR4Z/6B6tDywjluXSz5nxjGg3SRfGxT5bPIJGArtWC/G5zzC1Zlf/UfvA4lG1pDlXYkJs6ft X-Received: by 2002:ae9:e312:0:b0:6bb:b0c9:a41d with SMTP id v18-20020ae9e312000000b006bbb0c9a41dmr20720015qkf.436.1661357612107; Wed, 24 Aug 2022 09:13:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661357612; cv=none; d=google.com; s=arc-20160816; b=ca0klm8wIpJRYouuDeqmVPGAgvd1qvTeNDvRq7QA4zkOeGO9SvDUjEmLMxec/MbezA 0XyWEgkyg6H5BBdLcOzRRU4JyMuun1Iex0KfpO9Y5GzYaVtYi5E98AWMNywYjbFgMJNN b+G7qXf9RwJVgifOzHteZ4RtouNz9eCd1OuIWfCfQxcYom62lqVRnC9RAZTPk5hEagZR glSEwUK31Waswxz4PZ58lIE0ejnm+NbZSQUH2teLsoOSU3fgoVGcHuQU2NEMGXtbikgA go8F1Uo0jp7Pnm5T1OvTP3k4EXialA7ijDmU555YqE8REyssL2dAohFSKNYnPjYvMR/j otOQ== 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=/y1zm97n6IGKhSBa6qGqkTluIHtkqiOpSJE6ybC/cmQ=; b=uodD6Dycj076U9u5R/Xk0/VriktmcHei4ZN2REZQJo7Sc/MMMe24rR2ofkTSQXSfiX C8UjzbwgGl+ivBSKEaeyj2tWyd84C2IhPKzAfzySqlDUqtMjlyMyI2zZOLXgenQ9nXiC fm6z4nuSXFBT+j3Cs0dMgGx+WjQAklimu5o/pp8BjACFuhuQyjosxzHzP3iPaAwxGz1R 5/wOrl2yi+WPuu3KEFErp7H4lSnJlJ9EEsFA/ErWw12+43Ap4P46l390Xraw2nq0b613 uloWrJffwhhIDknF2PaDrHi4vUKvfd916udlmHGjNd6MtqlwO7by/CFT6DSiEQ/qpm/B Yipw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XwlW40h1; 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 s22-20020a05620a0bd600b006b97a3ec632si8819649qki.95.2022.08.24.09.13.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 Aug 2022 09:13:32 -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=XwlW40h1; 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]:41182 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oQt0V-00052G-Lt for patch@linaro.org; Wed, 24 Aug 2022 12:13:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45998) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQsfA-0002BD-1B for qemu-devel@nongnu.org; Wed, 24 Aug 2022 11:51:28 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:38679) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oQsf7-0002Eg-5s for qemu-devel@nongnu.org; Wed, 24 Aug 2022 11:51:27 -0400 Received: by mail-wr1-x42f.google.com with SMTP id b5so17006950wrr.5 for ; Wed, 24 Aug 2022 08:51:24 -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; bh=/y1zm97n6IGKhSBa6qGqkTluIHtkqiOpSJE6ybC/cmQ=; b=XwlW40h1EREpZkq6bDzc17N3GOMsYtv0OAPbS70wPH/7excd57FtyJRddtkf1pDhu8 phIoFoGUmX75T8ofO/nMriJKx8K1YgW0F70ec5EM1ixE5PoC7+r03CkEv6AMFSQ0pq+N bOZQAatftnREL+sp6QjSfb51wbYJa2kCPb4qI1JTGF/58357c/JFAWFNGSLOGGRu+1Af q9VCzXLigWE6aqNp0sP23osm4Po9n9rtqC3szzkkuQgJ6A/Tb873QaPDDDSwTSDgiYvM VfPippxj9mE1sQ5FKI3wRST2nejAh054NJDoS1oy/qVdz0pfVu0DDp4CvruJw4NvRN2n BwGw== 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; bh=/y1zm97n6IGKhSBa6qGqkTluIHtkqiOpSJE6ybC/cmQ=; b=SgMmj8nsG6SX82cgnVbeoVEUgrIgtjNYV+1qhP4PV0c6GkrZUXI16JTdfJx0jJu26i HaO6nA4NTzRgAXzs+0nDEJW0vkDS/HnHt7zoh6X+1uouhgwA8LcSGLKPGtzuGYbr24oL m3WKLq/zOrrke6U8DsDjRqSS9+FVKDTyan1yIDH1c4mAO8D3Sxccl9SNZGsVQzVi75fD sMLeMK/GHcQjZvv3JdnJDFx8b6a7ffg+SHuJiGoptlG77ZzO9HwWyvhEGwFrpvEiEKSr QuG60mIwuN5u10fHkR7sQOz1YC5I9CmQH+yRGPQBYWvFZfuUUryX9qShys7GopiJlpnZ B17w== X-Gm-Message-State: ACgBeo3LRd6M0RtA9sqMRx7dZ12GQm73QMBtbTxDXY7CEOOMzVQi/DwI PKTSigrpMIWVDphYvepCUDGXRBMOvu551QrX X-Received: by 2002:a05:6000:1812:b0:225:7383:d739 with SMTP id m18-20020a056000181200b002257383d739mr1654652wrh.333.1661356284426; Wed, 24 Aug 2022 08:51:24 -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 q11-20020a5d61cb000000b00223b8168b15sm17236411wrv.66.2022.08.24.08.51.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Aug 2022 08:51:24 -0700 (PDT) From: Jean-Philippe Brucker To: peter.maydell@linaro.org Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org, robh+dt@kernel.org, eauger@redhat.com, Jean-Philippe Brucker Subject: [PATCH 09/10] hw/arm/virt: Fix devicetree warnings about the SMMU node Date: Wed, 24 Aug 2022 16:51:13 +0100 Message-Id: <20220824155113.286730-10-jean-philippe@linaro.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220824155113.286730-1-jean-philippe@linaro.org> References: <20220824155113.286730-1-jean-philippe@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=jean-philippe@linaro.org; helo=mail-wr1-x42f.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, T_SCC_BODY_TEXT_LINE=-0.01 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" dt-validate reports three issues in the SMMU device-tree node: smmuv3@9050000: $nodename:0: 'smmuv3@9050000' does not match '^iommu@[0-9a-f]*' smmuv3@9050000: interrupt-names: 'oneOf' conditional failed, one must be fixed: ['eventq', 'priq', 'cmdq-sync', 'gerror'] is too long 'combined' was expected 'gerror' was expected 'gerror' is not one of ['cmdq-sync', 'priq'] smmuv3@9050000: 'clock-names', 'clocks' do not match any of the regexes: 'pinctrl-[0-9]+' From schema: linux/Documentation/devicetree/bindings/iommu/arm,smmu-v3.yaml Fix them by: * changing the node name * reordering the IRQs * removing the clock properties which are not expected for the SMMU node 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 779eb5ea31..de508d5329 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -1329,7 +1329,9 @@ static void create_smmu(const VirtMachineState *vms, int i; hwaddr base = vms->memmap[VIRT_SMMU].base; hwaddr size = vms->memmap[VIRT_SMMU].size; - const char irq_names[] = "eventq\0priq\0cmdq-sync\0gerror"; + uint32_t irq_type = GIC_FDT_IRQ_TYPE_SPI; + uint32_t irq_trigger = GIC_FDT_IRQ_FLAGS_EDGE_LO_HI; + const char irq_names[] = "eventq\0gerror\0priq\0cmdq-sync"; DeviceState *dev; MachineState *ms = MACHINE(vms); @@ -1348,22 +1350,20 @@ 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); qemu_fdt_setprop_cells(ms->fdt, node, "interrupts", - GIC_FDT_IRQ_TYPE_SPI, irq , GIC_FDT_IRQ_FLAGS_EDGE_LO_HI, - GIC_FDT_IRQ_TYPE_SPI, irq + 1, GIC_FDT_IRQ_FLAGS_EDGE_LO_HI, - GIC_FDT_IRQ_TYPE_SPI, irq + 2, GIC_FDT_IRQ_FLAGS_EDGE_LO_HI, - GIC_FDT_IRQ_TYPE_SPI, irq + 3, GIC_FDT_IRQ_FLAGS_EDGE_LO_HI); + irq_type, irq + SMMU_IRQ_EVTQ, irq_trigger, + irq_type, irq + SMMU_IRQ_GERROR, irq_trigger, + irq_type, irq + SMMU_IRQ_PRIQ, irq_trigger, + irq_type, irq + SMMU_IRQ_CMD_SYNC, irq_trigger); qemu_fdt_setprop(ms->fdt, node, "interrupt-names", irq_names, sizeof(irq_names)); - qemu_fdt_setprop_cell(ms->fdt, node, "clocks", vms->clock_phandle); - qemu_fdt_setprop_string(ms->fdt, node, "clock-names", "apb_pclk"); qemu_fdt_setprop(ms->fdt, node, "dma-coherent", NULL, 0); qemu_fdt_setprop_cell(ms->fdt, node, "#iommu-cells", 1);