From patchwork Tue Jun 28 07:54:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Nowicki X-Patchwork-Id: 9202209 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 030E060B17 for ; Tue, 28 Jun 2016 07:55:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E9F40285BD for ; Tue, 28 Jun 2016 07:55:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DE5BA285C6; Tue, 28 Jun 2016 07:55:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3EC37285D1 for ; Tue, 28 Jun 2016 07:55:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752361AbcF1Hyk (ORCPT ); Tue, 28 Jun 2016 03:54:40 -0400 Received: from mail-lf0-f43.google.com ([209.85.215.43]:34213 "EHLO mail-lf0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752268AbcF1Hyj (ORCPT ); Tue, 28 Jun 2016 03:54:39 -0400 Received: by mail-lf0-f43.google.com with SMTP id h129so5566944lfh.1 for ; Tue, 28 Jun 2016 00:54:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=j62y8kMgPw56QB5nMFpnxu1XnaTFcBOdDkwNUWg8D74=; b=CQZzqwFPSwi8rKqTAqt630VhIJtJCgemH5NRjJol0hO2tAiY3YKRIS6UjMFWGxrjp0 /SJiJWfjM+WyPF8bZcnECeRKCqTdUXkrkbkfaQU1wsXWiwbMtqLr87aC5A/E5V5KCekb zs2L2QgTsNAv+E+VV44ayK9Q69i7TlQIeXTgTCQCssPTpOhFkDTKt6BKnJKPtnLHAnXo Il0SKxnLptrXSEP4ocebzquReVivkW7fHnXD0JB1bXo4qxWyXKhgiG/Wk1iBvpDnhl5c YuOgl18WwNwq0d1zHNEp/TJGVzVTGtrtKnh2OQ2KBJPPPUqHaQXP11PreMbOnoaFqPP8 gQ3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=j62y8kMgPw56QB5nMFpnxu1XnaTFcBOdDkwNUWg8D74=; b=W24NQiHMGVqg0HvjGqCTDLVYhevFdrmRd/XJJCJcig9/sjEqkpS3noCtXeKmF/xk3w PtVszTy+3/4qrmZylmBnNjNIRSevZGu2o4cvc1TCostKNAGKQZ3gtQoQLgtM327wTtH3 70xDgqfkwCdxNN0t8R1Muyf02QqV155WM6sRKEjuFBmzELxHv2eJz1UxN6sl5pScgZsH F747VhFW5CBG+78n5VP7O8RHoRfaBxn1pVRxgXwWGatIiGTg6DP83Grj3CWft3NMmQxv 5vpDrYW716lhRM/iMkmwSn6EZ7sexrZ63PWikiP4fHfWMiYmsFOXqCeGQEi41JiYlwDp XrzQ== X-Gm-Message-State: ALyK8tLVJnk1YTgpehgLhxhn/W3Q7QEKRVRDFwUMHbhUME6Q5Yl6L36nQOLKJ7X0vSCHQg== X-Received: by 10.46.9.215 with SMTP id 206mr486482ljj.63.1467100472637; Tue, 28 Jun 2016 00:54:32 -0700 (PDT) Received: from tn-HP-4.semihalf.local (31-172-191-173.noc.fibertech.net.pl. [31.172.191.173]) by smtp.gmail.com with ESMTPSA id f66sm3856201lji.13.2016.06.28.00.54.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 28 Jun 2016 00:54:31 -0700 (PDT) From: Tomasz Nowicki To: helgaas@kernel.org, arnd@arndb.de, will.deacon@arm.com, catalin.marinas@arm.com, rafael@kernel.org, hanjun.guo@linaro.org, Lorenzo.Pieralisi@arm.com, okaya@codeaurora.org, jchandra@broadcom.com Cc: robert.richter@caviumnetworks.com, mw@semihalf.com, Liviu.Dudau@arm.com, ddaney@caviumnetworks.com, wangyijing@huawei.com, msalter@redhat.com, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linaro-acpi@lists.linaro.org, jcm@redhat.com, andrea.gallo@linaro.org, dhdang@apm.com, jeremy.linton@arm.com, liudongdong3@huawei.com, cov@codeaurora.org, gabriele.paoloni@huawei.com, jhugo@codeaurora.org, Tomasz Nowicki Subject: [RFC PATCH v4 4/5] ARM64/PCI: Start using quirks handling for ACPI based PCI host controller Date: Tue, 28 Jun 2016 09:54:01 +0200 Message-Id: <1467100442-28078-5-git-send-email-tn@semihalf.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1467100442-28078-1-git-send-email-tn@semihalf.com> References: <1467100442-28078-1-git-send-email-tn@semihalf.com> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since there are platforms which have non-compliant ECAM space we need to override these accessors prior to PCI buses enumeration. In order to do that we call pci_mcfg_match_quirks() to retrieve custom pci_config_window structure. If no correlated quirk on list, use fully ECAM compliant generic PCI config accessors. Signed-off-by: Tomasz Nowicki --- arch/arm64/kernel/pci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arm64/kernel/pci.c b/arch/arm64/kernel/pci.c index addf00c..ef142b8 100644 --- a/arch/arm64/kernel/pci.c +++ b/arch/arm64/kernel/pci.c @@ -152,8 +152,7 @@ struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root) if (!ri) return NULL; - ri->cfg = pci_acpi_setup_ecam_mapping(root, - &pci_generic_ecam_ops.pci_ops); + ri->cfg = pci_mcfg_match_quirks(root); if (!ri->cfg) { kfree(ri); return NULL;