From patchwork Mon Aug 8 13:05:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Nowicki X-Patchwork-Id: 9268335 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 8515A607D6 for ; Mon, 8 Aug 2016 13:09:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 774EC1FF15 for ; Mon, 8 Aug 2016 13:09:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6A07B283EC; Mon, 8 Aug 2016 13:09:43 +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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6F7D9283E4 for ; Mon, 8 Aug 2016 13:09:42 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bWkHl-0002iF-Dk; Mon, 08 Aug 2016 13:08:05 +0000 Received: from mail-wm0-x230.google.com ([2a00:1450:400c:c09::230]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bWkGA-0001Y3-0Q for linux-arm-kernel@lists.infradead.org; Mon, 08 Aug 2016 13:06:28 +0000 Received: by mail-wm0-x230.google.com with SMTP id o80so137879838wme.1 for ; Mon, 08 Aug 2016 06:06:05 -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=Ot9fzdP25V2t3cTMyu7w6NhN1mqeFhUUPObx638zG7+dhQphLZ2tMd3xNnRt0AJmGD 6+E5DUvdjIXMJrPDzjyLud6oBYrR//33/7IpmvkF9Dglqc0Pp8OJizU++fRHpbd7o5QQ zYKPCCLRiAPipa3ieUBMfd6nZOy0+ZDj8gLDK7yPaXP1B7sh76+LtULM1KPfxST2tg34 R/RlQRmSMI3cOVV79HURkBh9BZa7FkJHKrJuOdRJKge0AlNFa+BQOCq6g4FnreKjFWWl 0Q2Yj2dZszPTyMYNKWFTCQmmu9sMSq++ltO/Tb6+3HA+oKSZ1Cqcq20oqyj1jgGtV2Ms 1kCw== 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=awKYXg4aiQ0D1usiUZ6+hGfn2efYyjdXsLhOOfFeUeu8ZGJ1zN8CFW3Kvty+eQ9SqT X4BdCtbRby/vJvuVgdRO/u2pHdiaFG9E1QugZt6dxerFpSt++xI2ILMN24SwgiQWya39 7Qdtgn1+di71QInP70D9HN/9lfMW/fQMw+o2tW3hs+s1ryUGDhWHXp4417WrmtoIS7PG cvd5eJVjdJfUBZuCOG1i9l3PmRLhINaqEeN+rDdf7P/2IkJSz1v1J15UiEzodxm9cO1u SY/pKOat6Tma93MwMkOT2RNmlBJdmRIoYEWs82F/xJTX6nrEdju2o8r/Yf3R0sxljpfp 6CGA== X-Gm-Message-State: AEkoouub5b05fcty4vAf3C4xh5FsezoNS7WEZuGL8qYIg69yTn6p5X54C55ZysZX2TSjtg== X-Received: by 10.25.18.90 with SMTP id h87mr9872993lfi.118.1470661563977; Mon, 08 Aug 2016 06:06:03 -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 g11sm5644098lji.25.2016.08.08.06.06.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 08 Aug 2016 06:06:03 -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 Subject: [RFC PATCH V5 4/5] ARM64/PCI: Start using quirks handling for ACPI based PCI host controller Date: Mon, 8 Aug 2016 15:05:40 +0200 Message-Id: <1470661541-26270-5-git-send-email-tn@semihalf.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1470661541-26270-1-git-send-email-tn@semihalf.com> References: <1470661541-26270-1-git-send-email-tn@semihalf.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160808_060626_542529_50EBA872 X-CRM114-Status: GOOD ( 10.51 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: gabriele.paoloni@huawei.com, linaro-acpi@lists.linaro.org, linux-pci@vger.kernel.org, Liviu.Dudau@arm.com, okaya@codeaurora.org, wangyijing@huawei.com, andrea.gallo@linaro.org, jhugo@codeaurora.org, Tomasz Nowicki , ddaney@caviumnetworks.com, linux-acpi@vger.kernel.org, robert.richter@caviumnetworks.com, liudongdong3@huawei.com, msalter@redhat.com, jcm@redhat.com, cov@codeaurora.org, mw@semihalf.com, linux-arm-kernel@lists.infradead.org, jchandra@broadcom.com, ard.biesheuvel@linaro.org, dhdang@apm.com, linux-kernel@vger.kernel.org, jeremy.linton@arm.com, hanjun.guo@linaro.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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;