From patchwork Thu Aug 5 21:11:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeremy Linton X-Patchwork-Id: 492273 Delivered-To: patch@linaro.org Received: by 2002:a05:6638:396:0:0:0:0 with SMTP id y22csp664597jap; Thu, 5 Aug 2021 14:12:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJZQHHYLgjyE5iUVWVUUueYkC5bAxHRa+fgj8iXAPjXEX/W+fscJoKcN2md8YuhzZsMvD9 X-Received: by 2002:a17:907:76b9:: with SMTP id jw25mr6645168ejc.393.1628197933143; Thu, 05 Aug 2021 14:12:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628197933; cv=none; d=google.com; s=arc-20160816; b=EOz5jvgaWPiU1ghjWgTSColmTqO/OhWT+mwwrlWi077xKxkVAq8ssIoQBXwmg2qeHG nKYrNSDXQc98eJHrGgPUEoNmMyOYIJuETn+xV9dkGWdQcU2ZwAC7zHUBO1tn9IdC+NqO 820sm/h/cpt6OyOAT5JAbV89DTABMjR67j0Mx94wtACe/F5XhDZXSXQTkNEFtiywBoxW lXEAAGRscqy3bBlyQFDB9xcOX07rVVOjS8RzBLaZ0dgsD+RRtnxWIy1J4ZvyydO532RD WbNe5nrRfe1K6LMeBB+hvpjnjqekS1ymrMGeqIZ8SFWO9tKOduZnaMzbIJqaFqqoq6je wlVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=mNwZgI0lkPiSRELXBtoERdp/GDZXsgCnzbwePoFHQaM=; b=t3zZK3AeFRztEoh4j0TISVajcXY08IDj7l+fdVSzt3bP001VTAWQbKrqFO640D/tGs CshAR2Wvfk5kVkbOG+uAjLxSlUVNpmLnsxBlPzK8rw87/ZuXAKBU1wqzF+j5ozbKO7Vb nDKeGPgo/Hzm2q01naNVsu3+R5iq26T26+XPNGExAZCU46VHzBqubqk7VkSp6nU3IVQb mrYLpgt/1M6WV2XHfJ+6bLaNqpiaoNrN0gZQrFJEb0QQmHhlhI3/zSyhjDMplSRwW2WP yoztAAYJcPZLl29/b/XC5M2XNVBqwTENIrfDLfQv4xB/Wi/7o1PhlwIGu8xH0fx5foA0 +NqA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-acpi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-acpi-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ee27si7087336edb.168.2021.08.05.14.12.12; Thu, 05 Aug 2021 14:12:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-acpi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-acpi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-acpi-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241792AbhHEVMV (ORCPT + 4 others); Thu, 5 Aug 2021 17:12:21 -0400 Received: from foss.arm.com ([217.140.110.172]:52374 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231587AbhHEVMU (ORCPT ); Thu, 5 Aug 2021 17:12:20 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 9BEE31042; Thu, 5 Aug 2021 14:12:05 -0700 (PDT) Received: from u200856.usa.arm.com (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0BB833F719; Thu, 5 Aug 2021 14:12:05 -0700 (PDT) From: Jeremy Linton To: linux-pci@vger.kernel.org Cc: lorenzo.pieralisi@arm.com, nsaenz@kernel.org, bhelgaas@google.com, rjw@rjwysocki.net, lenb@kernel.org, robh@kernel.org, kw@linux.com, f.fainelli@gmail.com, bcm-kernel-feedback-list@broadcom.com, linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rpi-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Jeremy Linton Subject: [PATCH 0/3] CM4 ACPI PCIe quirk Date: Thu, 5 Aug 2021 16:11:57 -0500 Message-Id: <20210805211200.491275-1-jeremy.linton@arm.com> X-Mailer: git-send-email 2.26.3 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org The PFTF CM4 is an ACPI platform that is following the PCIe SMCCC standard because its PCIe config space isn't ECAM compliant and is split into two parts. One part for the root port registers and a moveable window which points at a given device's 4K config space. Thus it doesn't have a MCFG (and really any MCFG provided would be nonsense anyway). As linux doesn't support the PCIe SMCCC standard we key off a linux specific host bridge _DSD to add custom ECAM ops and cfgres. The cfg op selects between those two regions, as well as disallowing problematic accesses, particularly if the link is down because there isn't an attached device. Jeremy Linton (3): PCI: brcmstb: Break register definitions into separate header PCI: brcmstb: Add ACPI config space quirk PCI/ACPI: Add new quirk detection, enable bcm2711 drivers/acpi/pci_mcfg.c | 14 ++ drivers/pci/controller/Makefile | 1 + drivers/pci/controller/pcie-brcmstb-acpi.c | 77 +++++++++ drivers/pci/controller/pcie-brcmstb.c | 179 +------------------- drivers/pci/controller/pcie-brcmstb.h | 182 +++++++++++++++++++++ include/linux/pci-ecam.h | 1 + 6 files changed, 276 insertions(+), 178 deletions(-) create mode 100644 drivers/pci/controller/pcie-brcmstb-acpi.c create mode 100644 drivers/pci/controller/pcie-brcmstb.h -- 2.31.1