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: 9202219 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 6310B6074E for ; Tue, 28 Jun 2016 07:55:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 545C22837F for ; Tue, 28 Jun 2016 07:55:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 46D4B285DF; Tue, 28 Jun 2016 07:55:39 +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=unavailable 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 019182837F for ; Tue, 28 Jun 2016 07:55:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752363AbcF1Hyl (ORCPT ); Tue, 28 Jun 2016 03:54:41 -0400 Received: from mail-lf0-f44.google.com ([209.85.215.44]:34213 "EHLO mail-lf0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752336AbcF1Hyj (ORCPT ); Tue, 28 Jun 2016 03:54:39 -0400 Received: by mail-lf0-f44.google.com with SMTP id h129so5566945lfh.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=NHCMHLSg4xVrxSX8uSel55Z9TAGh5k/uxO/TjjBo3S7SrnlUUYcimkWpFb4JVftTTs FXWZytZtMKg1ZMb6R9BlGApDqS0sbnr5dsyu4j1l4ZVvew6XovdVuWGUGNd0G0QuRTfH VIV24OkFD9IcC8aO6W8E26o9eFmntfn7ER70IpEacEjtnNKgvwX5S38ynmIiTX+unVeL ehhUzylVQO9JwRpavG3PzlcY8Gu2JmYrPNRafOalLFWTJFLI5SWNdprGj2N+b8evkejY qGLgFxhvAvDkmAmd4xZpy0ORIn5NYErliAeQ41HpfEYsjU9yasqj+CA2uGG2TtF0jdUF AERw== X-Gm-Message-State: ALyK8tLVR4/Mf0wu59T6gtg65IamlX/CtkKwKCFVpN3yv+Dw/KjyblHmRzhyAvPtvwCUYw== 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-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@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;