From patchwork Tue Jun 2 16:33:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 49416 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3FD1920BD1 for ; Tue, 2 Jun 2015 16:37:21 +0000 (UTC) Received: by wifx6 with SMTP id x6sf32573105wif.1 for ; Tue, 02 Jun 2015 09:37:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:in-reply-to:references:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=X4zz46VbFBGSj8zRugzRM/+gzFZbWGh5PDFpjjq3ajs=; b=EvlnnNMnnLONJgQZdqK3kcFJbmkIVSGPMsCYAfbSPmmtzaiHAnBE+wIS1ivYzDyIir i27YR9PVMbPN4cxIyK4tveS7ky0F/bC5GmDCC1nauPhdyka0EcyUa764/GmbtZ0JCHEs lR9lag8GE3DeejfdEnL9y9RoNIXgcSXkcj2kV1EJcTdbbyr1ZeezOU7akV/1Dt3sEwG/ pUlu5z2iom2GVf+kY47NRCNk+yF99cNxXL1dYggWYSD49FOfooS3oKahZ5dhBk9AxoyC hA2YiD5zPlQrP1CUyNsRq8bfBeMrpcd+9SFu3nlG+w6k16SZHh/Al7YlrqTgU4s9iLxA D+8g== X-Gm-Message-State: ALoCoQkrlDWVZdhP3TjHbS8ugXSDflh8HUFcEdgQKWbnIpMI6Blw65Ojw0PENEe3YG9v/Bqmyw2r X-Received: by 10.112.26.5 with SMTP id h5mr26783666lbg.4.1433263040526; Tue, 02 Jun 2015 09:37:20 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.6.74 with SMTP id y10ls384400lay.41.gmail; Tue, 02 Jun 2015 09:37:20 -0700 (PDT) X-Received: by 10.152.21.197 with SMTP id x5mr5097344lae.108.1433263040312; Tue, 02 Jun 2015 09:37:20 -0700 (PDT) Received: from mail-lb0-f169.google.com (mail-lb0-f169.google.com. [209.85.217.169]) by mx.google.com with ESMTPS id px4si6693724lac.63.2015.06.02.09.37.20 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Jun 2015 09:37:20 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.169 as permitted sender) client-ip=209.85.217.169; Received: by lbbuc2 with SMTP id uc2so108288517lbb.2 for ; Tue, 02 Jun 2015 09:37:20 -0700 (PDT) X-Received: by 10.112.220.7 with SMTP id ps7mr26718185lbc.72.1433263040220; Tue, 02 Jun 2015 09:37:20 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp3199891lbb; Tue, 2 Jun 2015 09:37:19 -0700 (PDT) X-Received: by 10.55.33.6 with SMTP id h6mr48301897qkh.99.1433263038771; Tue, 02 Jun 2015 09:37:18 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id 12si16266248qhx.61.2015.06.02.09.37.18 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 02 Jun 2015 09:37:18 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:59757 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzpBl-0006eF-P2 for patch@linaro.org; Tue, 02 Jun 2015 12:37:17 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40077) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yzp8Z-0001nM-DK for qemu-devel@nongnu.org; Tue, 02 Jun 2015 12:34:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yzp8Y-0000ur-4b for qemu-devel@nongnu.org; Tue, 02 Jun 2015 12:33:59 -0400 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:34364) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yzp8X-0000r2-Tt for qemu-devel@nongnu.org; Tue, 02 Jun 2015 12:33:58 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1Yzp8T-00031V-BA for qemu-devel@nongnu.org; Tue, 02 Jun 2015 17:33:53 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Tue, 2 Jun 2015 17:33:43 +0100 Message-Id: <1433262832-11527-14-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1433262832-11527-1-git-send-email-peter.maydell@linaro.org> References: <1433262832-11527-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:8b0:1d0::1 Subject: [Qemu-devel] [PULL 13/22] target-arm: Extend the gic node properties X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 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-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.169 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Christoffer Dall In preparation for adding the GICv2m which requires address specifiers and is a subnode of the gic, we extend the gic DT definition to specify the #address-cells and #size-cells properties and add an empty ranges property properties of the DT node, since this is required to add the v2m node as a child of the gic node. Note that we must also expand the irq-map to reference the gic with the right address-cells as a consequence of this change. Reviewed-by: Eric Auger Signed-off-by: Christoffer Dall Message-id: 1432897270-7780-4-git-send-email-christoffer.dall@linaro.org Suggested-by: Shanker Donthineni Signed-off-by: Christoffer Dall Signed-off-by: Peter Maydell --- hw/arm/virt.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index e5235ef..387dac8 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -317,6 +317,9 @@ static void fdt_add_gic_node(VirtBoardInfo *vbi) 2, vbi->memmap[VIRT_GIC_DIST].size, 2, vbi->memmap[VIRT_GIC_CPU].base, 2, vbi->memmap[VIRT_GIC_CPU].size); + qemu_fdt_setprop_cell(vbi->fdt, "/intc", "#address-cells", 0x2); + qemu_fdt_setprop_cell(vbi->fdt, "/intc", "#size-cells", 0x2); + qemu_fdt_setprop(vbi->fdt, "/intc", "ranges", NULL, 0); qemu_fdt_setprop_cell(vbi->fdt, "/intc", "phandle", vbi->gic_phandle); } @@ -585,7 +588,7 @@ static void create_pcie_irq_map(const VirtBoardInfo *vbi, uint32_t gic_phandle, int first_irq, const char *nodename) { int devfn, pin; - uint32_t full_irq_map[4 * 4 * 8] = { 0 }; + uint32_t full_irq_map[4 * 4 * 10] = { 0 }; uint32_t *irq_map = full_irq_map; for (devfn = 0; devfn <= 0x18; devfn += 0x8) { @@ -598,13 +601,13 @@ static void create_pcie_irq_map(const VirtBoardInfo *vbi, uint32_t gic_phandle, uint32_t map[] = { devfn << 8, 0, 0, /* devfn */ pin + 1, /* PCI pin */ - gic_phandle, irq_type, irq_nr, irq_level }; /* GIC irq */ + gic_phandle, 0, 0, irq_type, irq_nr, irq_level }; /* GIC irq */ /* Convert map to big endian */ - for (i = 0; i < 8; i++) { + for (i = 0; i < 10; i++) { irq_map[i] = cpu_to_be32(map[i]); } - irq_map += 8; + irq_map += 10; } }