From nobody Tue May 21 22:20:51 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=eik.bme.hu Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1712707001628874.2379253144031; Tue, 9 Apr 2024 16:56:41 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ruLJi-0007rY-KE; Tue, 09 Apr 2024 19:55:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ruLJg-0007qf-By; Tue, 09 Apr 2024 19:55:52 -0400 Received: from zero.eik.bme.hu ([152.66.115.2]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ruLJe-00053R-Go; Tue, 09 Apr 2024 19:55:52 -0400 Received: from zero.eik.bme.hu (localhost [127.0.0.1]) by zero.eik.bme.hu (Postfix) with ESMTP id F3B784E6030; Wed, 10 Apr 2024 01:55:44 +0200 (CEST) Received: from zero.eik.bme.hu ([127.0.0.1]) by zero.eik.bme.hu (zero.eik.bme.hu [127.0.0.1]) (amavisd-new, port 10028) with ESMTP id 8VEPxslYPZWw; Wed, 10 Apr 2024 01:55:43 +0200 (CEST) Received: by zero.eik.bme.hu (Postfix, from userid 432) id 0E0C34E601C; Wed, 10 Apr 2024 01:55:43 +0200 (CEST) X-Virus-Scanned: amavisd-new at eik.bme.hu From: BALATON Zoltan Subject: [PATCH for-9.0] ppc440_pcix: Do not expose a bridge device on PCI bus To: qemu-devel@nongnu.org, qemu-ppc@nongnu.org Cc: Nicholas Piggin , Peter Maydell , philmd@linaro.org Message-Id: <20240409235543.0E0C34E601C@zero.eik.bme.hu> Date: Wed, 10 Apr 2024 01:55:43 +0200 (CEST) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=152.66.115.2; envelope-from=balaton@eik.bme.hu; helo=zero.eik.bme.hu X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1712707004439100001 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Real 460EX SoC apparently does not expose a bridge device and having it appear on PCI bus confuses an AmigaOS file system driver that uses this to detect which machine it is running on. Since values written here by firmware are never read, just ignore these writes and drop the bridge device. Signed-off-by: BALATON Zoltan --- This is only used by sam460ex and this fixes an issue with AmigaOS on this machine so I'd like this to be merged for 9.0 please. hw/pci-host/ppc440_pcix.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/hw/pci-host/ppc440_pcix.c b/hw/pci-host/ppc440_pcix.c index 1926ae2a27..ba38172989 100644 --- a/hw/pci-host/ppc440_pcix.c +++ b/hw/pci-host/ppc440_pcix.c @@ -52,7 +52,6 @@ OBJECT_DECLARE_SIMPLE_TYPE(PPC440PCIXState, PPC440_PCIX_H= OST) struct PPC440PCIXState { PCIHostState parent_obj; =20 - PCIDevice *dev; struct PLBOutMap pom[PPC440_PCIX_NR_POMS]; struct PLBInMap pim[PPC440_PCIX_NR_PIMS]; uint32_t sts; @@ -170,10 +169,6 @@ static void ppc440_pcix_reg_write4(void *opaque, hwadd= r addr, =20 trace_ppc440_pcix_reg_write(addr, val, size); switch (addr) { - case PCI_VENDOR_ID ... PCI_MAX_LAT: - stl_le_p(s->dev->config + addr, val); - break; - case PCIX0_POM0LAL: s->pom[0].la &=3D 0xffffffff00000000ULL; s->pom[0].la |=3D val; @@ -301,10 +296,6 @@ static uint64_t ppc440_pcix_reg_read4(void *opaque, hw= addr addr, uint32_t val; =20 switch (addr) { - case PCI_VENDOR_ID ... PCI_MAX_LAT: - val =3D ldl_le_p(s->dev->config + addr); - break; - case PCIX0_POM0LAL: val =3D s->pom[0].la; break; @@ -498,10 +489,7 @@ static void ppc440_pcix_realize(DeviceState *dev, Erro= r **errp) memory_region_init(&s->iomem, OBJECT(dev), "pci-io", 64 * KiB); h->bus =3D pci_register_root_bus(dev, NULL, ppc440_pcix_set_irq, ppc440_pcix_map_irq, &s->irq, &s->busmem, &s->iom= em, - PCI_DEVFN(0, 0), 1, TYPE_PCI_BUS); - - s->dev =3D pci_create_simple(h->bus, PCI_DEVFN(0, 0), - TYPE_PPC4xx_HOST_BRIDGE); + PCI_DEVFN(1, 0), 1, TYPE_PCI_BUS); =20 memory_region_init(&s->bm, OBJECT(s), "bm-ppc440-pcix", UINT64_MAX); memory_region_add_subregion(&s->bm, 0x0, &s->busmem); --=20 2.30.9