From patchwork Mon Aug 8 12:56:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Nowicki X-Patchwork-Id: 9268271 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 74FE560871 for ; Mon, 8 Aug 2016 12:57:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 65DEB27FA9 for ; Mon, 8 Aug 2016 12:57:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5A0C72838D; Mon, 8 Aug 2016 12:57:25 +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 F0D85283E4 for ; Mon, 8 Aug 2016 12:57:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752246AbcHHM5Y (ORCPT ); Mon, 8 Aug 2016 08:57:24 -0400 Received: from mail-wm0-f50.google.com ([74.125.82.50]:36966 "EHLO mail-wm0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752346AbcHHM5X (ORCPT ); Mon, 8 Aug 2016 08:57:23 -0400 Received: by mail-wm0-f50.google.com with SMTP id i5so137485624wmg.0 for ; Mon, 08 Aug 2016 05:57:23 -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=4NEydwGjoZhnNs7+5yHG6RkmVa0A7zENnLnhZ14rIE0=; b=CrvI6jZr6uzkWDclZyQCRfmWGf4yOQRLhiwipz9+Kbl3r73YEh6LIDke2Kk11w1NTg I4pFYd9GP6X6/96x1DJu9EmCOHXI3fu6z/P92m8icjzPGlt2m+68v8gbd8ufzL8YXo8t OxmQ2m8w758fvQetr+Da/pR1kedmR7WLRRL63X9q0+EvfnBWYaKK9ASDS37fxHwTjZIi cn61VfaJ+GSxgMG7b3i4eEw6inhzwzYtEHypj8U/yP61T7fvt76IwkAeBq+yf836e8Oy Ft8znDmnshNAfig0HJ8JsyPADTkIi82S9bloUF+CQIIVTAKRedbohG3qJy3JbngPOPgd XN0Q== 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=4NEydwGjoZhnNs7+5yHG6RkmVa0A7zENnLnhZ14rIE0=; b=cCtjLYvFdGUwQHDNmxdMt0J20rsg8IdyjlpozmtxLcq2YJ4KFReiNV6dXhKMLDlOOv djOADGaOaOom+nBj/OqjMO4GILItwZAp+aw2Cnf4DBYQbtVSjeVjcSGYP8gPQ3xLmWWf pK90LxR5XgH4AoUBv7Y+vibi899qVZrg2Oh/1Xb6EyKgZfY4DggSip6ToARrvGLv8ldR WGbloFWxQTGyKyki9aR7U7TpyeYD5DSGjcUMSWfjxvvSuj2A7mh27kZjV4eLECY/RPJe ayBE1VOQ12jBztr1iRC5qKK2f4inVnn2u84rEX9dIJRz9OfmeVv6HBxnOowvUGZvT4E+ pQPg== X-Gm-Message-State: AEkoous05OKCpqSrE9hqzpnkTTMNUmggtlMn2Alcg2fwP9esP8EpheGmGBqMwV1Fz0HQYg== X-Received: by 10.46.33.5 with SMTP id h5mr26062704ljh.43.1470661042265; Mon, 08 Aug 2016 05:57:22 -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 k63sm5708186lfe.48.2016.08.08.05.57.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 08 Aug 2016 05:57:21 -0700 (PDT) From: Tomasz Nowicki To: helgaas@kernel.org, arnd@arndb.de, will.deacon@arm.com, catalin.marinas@arm.com, rafael@kernel.org, Lorenzo.Pieralisi@arm.com Cc: hanjun.guo@linaro.org, okaya@codeaurora.org, jchandra@broadcom.com, cov@codeaurora.org, dhdang@apm.com, ard.biesheuvel@linaro.org, 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, linaro-acpi@lists.linaro.org, jcm@redhat.com, andrea.gallo@linaro.org, jeremy.linton@arm.com, liudongdong3@huawei.com, gabriele.paoloni@huawei.com, jhugo@codeaurora.org, Tomasz Nowicki Subject: [RFC PATCH V5 4/5] ARM64/PCI: Start using quirks handling for ACPI based PCI host controller Date: Mon, 8 Aug 2016 14:56:41 +0200 Message-Id: <1470661002-26213-5-git-send-email-tn@semihalf.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1470661002-26213-1-git-send-email-tn@semihalf.com> References: <1470661002-26213-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 2e7bed4..aa734bd 100644 --- a/arch/arm64/kernel/pci.c +++ b/arch/arm64/kernel/pci.c @@ -139,8 +139,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;