Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755167AbcDKWpv (ORCPT ); Mon, 11 Apr 2016 18:45:51 -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" 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-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1682 Lines: 58 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 -- 1.9.1