From patchwork Wed May 1 15:50:15 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Deacon X-Patchwork-Id: 2507891 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 10550DF230 for ; Wed, 1 May 2013 15:50:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761490Ab3EAPuf (ORCPT ); Wed, 1 May 2013 11:50:35 -0400 Received: from cam-admin0.cambridge.arm.com ([217.140.96.50]:42914 "EHLO cam-admin0.cambridge.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755521Ab3EAPuc (ORCPT ); Wed, 1 May 2013 11:50:32 -0400 Received: from mudshark.cambridge.arm.com (mudshark.cambridge.arm.com [10.1.203.36]) by cam-admin0.cambridge.arm.com (8.12.6/8.12.6) with ESMTP id r41FoLki024157; Wed, 1 May 2013 16:50:21 +0100 (BST) Received: by mudshark.cambridge.arm.com (Postfix, from userid 1000) id 40A53C2C61; Wed, 1 May 2013 16:50:18 +0100 (BST) From: Will Deacon To: kvm@vger.kernel.org Cc: penberg@kernel.org, marc.zyngier@arm.com, anup@brainfault.org, rusty@rustcorp.com.au, pranavkumar@linaro.org, michael@ellerman.id.au, Will Deacon Subject: [RFC PATCH 10/11] kvm tools: ARM: generate fdt nodes for ioport devices Date: Wed, 1 May 2013 16:50:15 +0100 Message-Id: <1367423416-24640-11-git-send-email-will.deacon@arm.com> X-Mailer: git-send-email 1.8.0 In-Reply-To: <1367423416-24640-1-git-send-email-will.deacon@arm.com> References: <1367423416-24640-1-git-send-email-will.deacon@arm.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Now that ioport devices can generate fdt nodes, iterate over the ioport bus when generating our fdt. Signed-off-by: Will Deacon --- tools/kvm/arm/fdt.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/kvm/arm/fdt.c b/tools/kvm/arm/fdt.c index 7198fe8..5e18c11 100644 --- a/tools/kvm/arm/fdt.c +++ b/tools/kvm/arm/fdt.c @@ -144,6 +144,14 @@ static int setup_fdt(struct kvm *kvm) dev_hdr = device__next_dev(dev_hdr); } + /* IOPORT devices (!) */ + dev_hdr = device__first_dev(DEVICE_BUS_IOPORT); + while (dev_hdr) { + generate_mmio_fdt_nodes = dev_hdr->data; + generate_mmio_fdt_nodes(fdt, dev_hdr, generate_irq_prop); + dev_hdr = device__next_dev(dev_hdr); + } + /* PSCI firmware */ _FDT(fdt_begin_node(fdt, "psci")); _FDT(fdt_property_string(fdt, "compatible", "arm,psci"));