From patchwork Thu Apr 4 12:58:24 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 15922 Return-Path: X-Original-To: linaro@staging.patches.linaro.org Delivered-To: linaro@staging.patches.linaro.org Received: from mail-qa0-f69.google.com (mail-qa0-f69.google.com [209.85.216.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 334E7277DD for ; Thu, 4 Apr 2013 12:58:55 +0000 (UTC) Received: by mail-qa0-f69.google.com with SMTP id o13sf3979463qaj.4 for ; Thu, 04 Apr 2013 05:58:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:x-beenthere:x-received:received-spf :x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=TsIAPW3oRgWtQwFcDVyGamiYigS2MUosapqihOb02Lg=; b=pmz7ij9116MMWR91O1+GDRPFCiUyf0JOkhwLE8sFLqR1RFZlF+J0HY12yQHb7Q3v7O VVh6fUm+QSv4/78R+Pwg8kYQKt4A9eAUT3HAjqJlT7e3W3VdAMtM0AWrqxU04VBbdLh5 gQ4o8yqJDyXkSt1LHfoYZEhjTos8y2E5YLzLFziwiyxDuoMJiiLBYhIWP+ARFzij51cD gIJM+DYC93k6wShulPg/Y6Nq6wVxYPxh8qDjNHOPU560RfhUbpcNsmNPGoyMJP0pZ5hY hH2IXHcB2o7RH6PxsEh9Igqk3p3/5Mh0RJ34q8JYzt8fmI8jTT0+s/vejyemMZXDu6tk ktJg== X-Received: by 10.236.37.36 with SMTP id x24mr2740905yha.35.1365080329941; Thu, 04 Apr 2013 05:58:49 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.0.132 with SMTP id 4ls1415976qee.56.gmail; Thu, 04 Apr 2013 05:58:49 -0700 (PDT) X-Received: by 10.52.180.195 with SMTP id dq3mr4094496vdc.9.1365080329830; Thu, 04 Apr 2013 05:58:49 -0700 (PDT) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by mx.google.com with ESMTPS id x3si8094907vdh.107.2013.04.04.05.58.49 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 04 Apr 2013 05:58:49 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.170; Received: by mail-vc0-f170.google.com with SMTP id lf11so568233vcb.1 for ; Thu, 04 Apr 2013 05:58:49 -0700 (PDT) X-Received: by 10.52.245.6 with SMTP id xk6mr3840467vdc.114.1365080328638; Thu, 04 Apr 2013 05:58:48 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.58.85.136 with SMTP id h8csp214679vez; Thu, 4 Apr 2013 05:58:47 -0700 (PDT) X-Received: by 10.205.33.81 with SMTP id sn17mr4318920bkb.53.1365080318175; Thu, 04 Apr 2013 05:58:38 -0700 (PDT) Received: from mnementh.archaic.org.uk (1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.d.1.0.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id ub3si4907187bkb.283.2013.04.04.05.58.37 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 04 Apr 2013 05:58:38 -0700 (PDT) Received-SPF: neutral (google.com: 2001:8b0:1d0::1 is neither permitted nor denied by best guess record for domain of pm215@archaic.org.uk) client-ip=2001:8b0:1d0::1; Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1UNjkP-0005RC-Iv; Thu, 04 Apr 2013 13:58:33 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Arnd Bergmann , "Michael S. Tsirkin" , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Will Deacon , Paul Brook , Aurelien Jarno Subject: [PATCH v3 02/11] versatile_pci: Expose PCI I/O region on Versatile PB Date: Thu, 4 Apr 2013 13:58:24 +0100 Message-Id: <1365080313-20875-3-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1365080313-20875-1-git-send-email-peter.maydell@linaro.org> References: <1365080313-20875-1-git-send-email-peter.maydell@linaro.org> X-Gm-Message-State: ALoCoQkl7vT4wH06pk/imTALkpv6fDMCUs7KuLChqz0Th3dXjutyudgCDGYOQkjLFKCayTF13Cnr X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Comments in the QEMU source code claim that the version of the PCI controller on the VersatilePB board doesn't support the PCI I/O region, but this is incorrect; expose that region, map it in the correct location, and drop the misleading comments. This change removes the only currently implemented difference between the realview-pci and versatile-pci models; however there are other differences in not-yet-implemented functionality, so we retain the distinction between the two device types. Signed-off-by: Peter Maydell Acked-by: Paul Brook --- hw/arm/versatilepb.c | 3 +-- hw/versatile_pci.c | 8 +++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/hw/arm/versatilepb.c b/hw/arm/versatilepb.c index baaa265..0d08d15 100644 --- a/hw/arm/versatilepb.c +++ b/hw/arm/versatilepb.c @@ -226,14 +226,13 @@ static void versatile_init(QEMUMachineInitArgs *args, int board_id) qdev_init_nofail(dev); sysbus_mmio_map(busdev, 0, 0x41000000); /* PCI self-config */ sysbus_mmio_map(busdev, 1, 0x42000000); /* PCI config */ + sysbus_mmio_map(busdev, 2, 0x43000000); /* PCI I/O */ sysbus_connect_irq(busdev, 0, sic[27]); sysbus_connect_irq(busdev, 1, sic[28]); sysbus_connect_irq(busdev, 2, sic[29]); sysbus_connect_irq(busdev, 3, sic[30]); pci_bus = (PCIBus *)qdev_get_child_bus(dev, "pci"); - /* The Versatile PCI bridge does not provide access to PCI IO space, - so many of the qemu PCI devices are not useable. */ for(n = 0; n < nb_nics; n++) { nd = &nd_table[n]; diff --git a/hw/versatile_pci.c b/hw/versatile_pci.c index 16ce5d1..1312f46 100644 --- a/hw/versatile_pci.c +++ b/hw/versatile_pci.c @@ -77,7 +77,7 @@ static int pci_vpb_init(SysBusDevice *dev) /* Our memory regions are: * 0 : PCI self config window * 1 : PCI config window - * 2 : PCI IO window (realview_pci only) + * 2 : PCI IO window */ memory_region_init_io(&s->mem_config, &pci_vpb_config_ops, bus, "pci-vpb-selfconfig", 0x1000000); @@ -85,10 +85,8 @@ static int pci_vpb_init(SysBusDevice *dev) memory_region_init_io(&s->mem_config2, &pci_vpb_config_ops, bus, "pci-vpb-config", 0x1000000); sysbus_init_mmio(dev, &s->mem_config2); - if (s->realview) { - isa_mmio_setup(&s->isa, 0x0100000); - sysbus_init_mmio(dev, &s->isa); - } + isa_mmio_setup(&s->isa, 0x0100000); + sysbus_init_mmio(dev, &s->isa); pci_create_simple(bus, -1, "versatile_pci_host"); return 0;