From patchwork Mon Apr 11 22:45:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jayachandran C." X-Patchwork-Id: 8806101 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 3F760C0553 for ; Mon, 11 Apr 2016 22:55:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5A0C120138 for ; Mon, 11 Apr 2016 22:55:51 +0000 (UTC) Received: from bombadil.infradead.org (unknown [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 666C720109 for ; Mon, 11 Apr 2016 22:55:50 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1apkbH-00045t-H6; Mon, 11 Apr 2016 22:46:31 +0000 Received: from mail-gw1-out.broadcom.com ([216.31.210.62]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1apkau-0003QI-PH for linux-arm-kernel@lists.infradead.org; Mon, 11 Apr 2016 22:46:14 +0000 X-IronPort-AV: E=Sophos;i="5.24,470,1455004800"; d="scan'208";a="92726972" Received: from mail-irv-18.broadcom.com ([10.15.198.37]) by mail-gw1-out.broadcom.com with ESMTP; 11 Apr 2016 16:22:49 -0700 Received: from mail-irva-13.broadcom.com (mail-irva-13.broadcom.com [10.11.16.103]) by mail-irv-18.broadcom.com (Postfix) with ESMTP id 6F6EF82025; Mon, 11 Apr 2016 15:45:48 -0700 (PDT) Received: from lc-blr-136.ban.broadcom.com (unknown [10.131.60.136]) by mail-irva-13.broadcom.com (Postfix) with ESMTP id 26D5240FE5; Mon, 11 Apr 2016 15:45:04 -0700 (PDT) From: Jayachandran C To: Bjorn Helgaas , Tomasz Nowicki , rafael@kernel.org Subject: [PATCH v2 1/4] arm64: Prepare to use generic ACPI PCI implementation Date: Tue, 12 Apr 2016 04:15:04 +0530 Message-Id: <1460414707-19153-2-git-send-email-jchandra@broadcom.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1460414707-19153-1-git-send-email-jchandra@broadcom.com> References: <1460414707-19153-1-git-send-email-jchandra@broadcom.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160411_154609_084361_90087A50 X-CRM114-Status: UNSURE ( 9.10 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -5.2 (-----) 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: linaro-acpi@lists.linaro.org, linux-pci@vger.kernel.org, Will Deacon , okaya@codeaurora.org, wangyijing@huawei.com, Lorenzo Pieralisi , David Daney , linux-acpi@vger.kernel.org, robert.richter@caviumnetworks.com, Catalin Marinas , Liviu.Dudau@arm.com, Arnd Bergmann , Stefano Stabellini , Jon Masters , msalter@redhat.com, Marcin Wojtas , linux-arm-kernel@lists.infradead.org, Jayachandran C , linux-kernel@vger.kernel.org, Hanjun Guo , Suravee.Suthikulpanit@amd.com, jiang.liu@linux.intel.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RDNS_NONE,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Define PCI_MMCONFIG config option for arm64. Weaken implementations of raw_pci_read/write and pci_acpi_scan_root, the generic ACPI PCI driver will implement these. Signed-off-by: Jayachandran C --- arch/arm64/Kconfig | 3 +++ arch/arm64/kernel/pci.c | 7 +++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 4f43622..6c6658a 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -236,6 +236,9 @@ config PCI_DOMAINS_GENERIC config PCI_SYSCALL def_bool PCI +config PCI_MMCONFIG + bool + source "drivers/pci/Kconfig" endmenu diff --git a/arch/arm64/kernel/pci.c b/arch/arm64/kernel/pci.c index 15109c11..098028c 100644 --- a/arch/arm64/kernel/pci.c +++ b/arch/arm64/kernel/pci.c @@ -67,13 +67,13 @@ int pcibios_alloc_irq(struct pci_dev *dev) /* * raw_pci_read/write - Platform-specific PCI config space access. */ -int raw_pci_read(unsigned int domain, unsigned int bus, +int __weak raw_pci_read(unsigned int domain, unsigned int bus, unsigned int devfn, int reg, int len, u32 *val) { return -ENXIO; } -int raw_pci_write(unsigned int domain, unsigned int bus, +int __weak raw_pci_write(unsigned int domain, unsigned int bus, unsigned int devfn, int reg, int len, u32 val) { return -ENXIO; @@ -81,9 +81,8 @@ int raw_pci_write(unsigned int domain, unsigned int bus, #ifdef CONFIG_ACPI /* Root bridge scanning */ -struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root) +struct pci_bus *__weak pci_acpi_scan_root(struct acpi_pci_root *root) { - /* TODO: Should be revisited when implementing PCI on ACPI */ return NULL; } #endif