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: 8806041 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@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 77DBFC0553 for ; Mon, 11 Apr 2016 22:46:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id ADCD020138 for ; Mon, 11 Apr 2016 22:46:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8991A20219 for ; Mon, 11 Apr 2016 22:46:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754805AbcDKWpu (ORCPT ); Mon, 11 Apr 2016 18:45:50 -0400 Received: from mail-gw1-out.broadcom.com ([216.31.210.62]:39646 "EHLO mail-gw1-out.broadcom.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754617AbcDKWpt (ORCPT ); Mon, 11 Apr 2016 18:45:49 -0400 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 Cc: Jayachandran C , Arnd Bergmann , Will Deacon , Catalin Marinas , Hanjun Guo , Lorenzo Pieralisi , okaya@codeaurora.org, jiang.liu@linux.intel.com, Stefano Stabellini , robert.richter@caviumnetworks.com, Marcin Wojtas , Liviu.Dudau@arm.com, David Daney , wangyijing@huawei.com, Suravee.Suthikulpanit@amd.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, Jon Masters 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> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, 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