From patchwork Tue May 19 08:49:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 1293115 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49R8hY1XSPz9sTC for ; Tue, 19 May 2020 18:49:49 +1000 (AEST) Received: from localhost ([::1]:54724 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaxwY-0003qx-HC for incoming@patchwork.ozlabs.org; Tue, 19 May 2020 04:49:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53776) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jaxw5-0003oO-7G for qemu-devel@nongnu.org; Tue, 19 May 2020 04:49:17 -0400 Received: from michel.telenet-ops.be ([2a02:1800:110:4::f00:18]:42062) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jaxw2-0003vT-2S for qemu-devel@nongnu.org; Tue, 19 May 2020 04:49:16 -0400 Received: from ramsan ([IPv6:2a02:1810:ac12:ed60:918e:b928:22c1:d715]) by michel.telenet-ops.be with bizsmtp id gYp6220074CPMDc06Yp60y; Tue, 19 May 2020 10:49:07 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan with esmtp (Exim 4.90_1) (envelope-from ) id 1jaxvu-0002Fv-1l; Tue, 19 May 2020 10:49:06 +0200 Received: from geert by rox.of.borg with local (Exim 4.90_1) (envelope-from ) id 1jaxvt-0000I0-Va; Tue, 19 May 2020 10:49:05 +0200 From: Geert Uytterhoeven To: Peter Maydell Subject: [PATCH] hw/arm/virt: Fix PL061 node name and properties Date: Tue, 19 May 2020 10:49:04 +0200 Message-Id: <20200519084904.1069-1-geert+renesas@glider.be> X-Mailer: git-send-email 2.17.1 Received-SPF: none client-ip=2a02:1800:110:4::f00:18; envelope-from=geert@linux-m68k.org; helo=michel.telenet-ops.be X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -23 X-Spam_score: -2.4 X-Spam_bar: -- X-Spam_report: (-2.4 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_LOW=-0.7, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Geert Uytterhoeven , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Make the created node comply with the PL061 Device Tree bindings: - Use generic node name "gpio" instead of "pl061", - Add missing "#interrupt-cells" and "interrupt-controller" properties. Signed-off-by: Geert Uytterhoeven --- Split off from "[PATCH QEMU v2 2/5] ARM: PL061: Extract pl061_create_fdt()" (https://lore.kernel.org/r/20200423090118.11199-3-geert+renesas@glider.be). --- hw/arm/virt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 7dc96abf72cf2b9a..99593d7bce4d85cb 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -818,13 +818,15 @@ static void create_gpio(const VirtMachineState *vms) qdev_get_gpio_in(vms->gic, irq)); uint32_t phandle = qemu_fdt_alloc_phandle(vms->fdt); - nodename = g_strdup_printf("/pl061@%" PRIx64, base); + nodename = g_strdup_printf("/gpio@%" PRIx64, base); qemu_fdt_add_subnode(vms->fdt, nodename); qemu_fdt_setprop_sized_cells(vms->fdt, nodename, "reg", 2, base, 2, size); qemu_fdt_setprop(vms->fdt, nodename, "compatible", compat, sizeof(compat)); qemu_fdt_setprop_cell(vms->fdt, nodename, "#gpio-cells", 2); qemu_fdt_setprop(vms->fdt, nodename, "gpio-controller", NULL, 0); + qemu_fdt_setprop_cell(vms->fdt, nodename, "#interrupt-cells", 2); + qemu_fdt_setprop(vms->fdt, nodename, "interrupt-controller", NULL, 0); qemu_fdt_setprop_cells(vms->fdt, nodename, "interrupts", GIC_FDT_IRQ_TYPE_SPI, irq, GIC_FDT_IRQ_FLAGS_LEVEL_HI);