From patchwork Thu Aug 26 07:15:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeremy Linton X-Patchwork-Id: 12459181 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DB4DAC432BE for ; Thu, 26 Aug 2021 07:18:14 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A23E561076 for ; Thu, 26 Aug 2021 07:18:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A23E561076 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=Sy/IwOknDaTvMhfvDmdiEhanWM+mv4xYWc3vyJjDzus=; b=IY1mhMNNANbyKK uaXzV6NboepUNoPYgQQeHPJnEmW3SIpUaZo+uAsI7xIY10iLshnlGcrkmIgwL7YXU+UZOy7bsQZFp JleXEmOFWjOF2q0ltc1PhCZAUHpcF7wM8wlVUjwpFlewUUws555JCiJk3UKip773KJ15xUjxb5FUm rzlyDSWHBH8bKtAF6JzLHHdLJh/C60Mj7q97w7fu9Dr1rP0B2G/e81pGDVHWKWPdVZIaZgLiTZU8+ c+Vu+O0v88ruFAPUAB7f6PtvhKtlJcjiiV2K/TkzpGtLLrjqaESSHqkKs8iDkzKofml3TKleRnhHC ZYNH6dVyG7NpfCfE5q1A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mJ9cN-009NjK-56; Thu, 26 Aug 2021 07:16:07 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mJ9cI-009NhJ-DP; Thu, 26 Aug 2021 07:16:03 +0000 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 39BC8D6E; Thu, 26 Aug 2021 00:15:59 -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 B9B3F3F5A1; Thu, 26 Aug 2021 00:15:58 -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 v3 0/4] CM4 ACPI PCIe quirk Date: Thu, 26 Aug 2021 02:15:53 -0500 Message-Id: <20210826071557.29239-1-jeremy.linton@arm.com> X-Mailer: git-send-email 2.26.3 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210826_001602_565912_C9E1B6E7 X-CRM114-Status: UNSURE ( 9.41 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The PFTF CM4 is an ACPI platform that is following the Arm PCIe SMC (DEN0115) standard because its PCIe config space isn't ECAM compliant since it is split into two parts. One part describes the root port registers, and another contains a moveable window pointing at a given device's 4K config space. Thus it doesn't have an MCFG table. As Linux doesn't support the PCI/SMC, a host bridge specific _DSD is added and associated with custom ECAM ops and cfgres. The custom cfg op selects between those two regions, as well as disallowing problematic accesses. V2->V3: Rebase to -next to pickup new MAINTAINERS entries that needed updating. Enforce _DSD property is exactly the same len as the MCFG OEM field it is overriding. More commit/comment tweaks. V1->V2: Only move register definitions to new .h file, add include guards. Change quirk namespace identifier. Update Maintainers file. A number of whitespace, grammar, etc fixes. Jeremy Linton (4): PCI: brcmstb: Break register definitions into separate header PCI: brcmstb: Add ACPI config space quirk PCI/ACPI: Add Broadcom bcm2711 MCFG quirk MAINTAINERS: Widen brcmstb PCIe file scope MAINTAINERS | 6 +- drivers/acpi/pci_mcfg.c | 17 +++ drivers/pci/controller/Makefile | 1 + drivers/pci/controller/pcie-brcmstb-acpi.c | 79 +++++++++++ drivers/pci/controller/pcie-brcmstb.c | 149 +------------------- drivers/pci/controller/pcie-brcmstb.h | 155 +++++++++++++++++++++ include/linux/pci-ecam.h | 1 + 7 files changed, 257 insertions(+), 151 deletions(-) create mode 100644 drivers/pci/controller/pcie-brcmstb-acpi.c create mode 100644 drivers/pci/controller/pcie-brcmstb.h