From patchwork Wed Mar 11 12:39:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 45636 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id DB212214C6 for ; Wed, 11 Mar 2015 12:41:48 +0000 (UTC) Received: by lamq1 with SMTP id q1sf6454127lam.3 for ; Wed, 11 Mar 2015 05:41:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=9ord+ypy1yST2JKnlYR8ja3fKH4JHuPZ6aFmbNIKE8o=; b=EeaV+RZkdwCsuoNCH7uPJjM8zUlCRZdAQNiwlmTHdQ61Kh8q4lKnZXJWmecByVHAtZ to9kHU7fl0BHeQHtHLHiAtXL9i36hekR7wwJ8hJx3LwtIhXkkODTyooNWBM0SdLQC752 2VcYpnFEshDtPRD8kAOR/IH3c6T7RWooGp+GSQzYkltvDlQ36WUM+A/IwfYeUI74DlRY T7ykHDwY15hkVpJd8RzITPwT+4C+CVixKPAxG9mpxIXBpxM86k2BQi+NGHAwNe3HojW/ xICyXjONU/83FJ9ESLHgIfETZEX4vWX0bMTA2wn75UaGgva/0grBFCvBNJNygQERVOp0 UO8g== X-Gm-Message-State: ALoCoQl8m/j6IVskrF1Ub7dqgAhkGlnlI4Cc45tIQvc9p4OUAx+TRsmWwkB32LX7PDhbg64tMi8S X-Received: by 10.180.109.34 with SMTP id hp2mr4213683wib.4.1426077707844; Wed, 11 Mar 2015 05:41:47 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.43.48 with SMTP id t16ls141301lal.55.gmail; Wed, 11 Mar 2015 05:41:47 -0700 (PDT) X-Received: by 10.112.204.197 with SMTP id la5mr34180461lbc.29.1426077707677; Wed, 11 Mar 2015 05:41:47 -0700 (PDT) Received: from mail-lb0-f173.google.com (mail-lb0-f173.google.com. [209.85.217.173]) by mx.google.com with ESMTPS id ji3si2299984lbc.63.2015.03.11.05.41.47 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Mar 2015 05:41:47 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.173 as permitted sender) client-ip=209.85.217.173; Received: by lbvn10 with SMTP id n10so8485212lbv.11 for ; Wed, 11 Mar 2015 05:41:47 -0700 (PDT) X-Received: by 10.112.204.197 with SMTP id la5mr34180446lbc.29.1426077707465; Wed, 11 Mar 2015 05:41:47 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp2751857lbj; Wed, 11 Mar 2015 05:41:46 -0700 (PDT) X-Received: by 10.66.234.2 with SMTP id ua2mr56345116pac.137.1426077699331; Wed, 11 Mar 2015 05:41:39 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ff6si6895444pad.132.2015.03.11.05.41.38; Wed, 11 Mar 2015 05:41:39 -0700 (PDT) Received-SPF: none (google.com: linux-acpi-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753034AbbCKMld (ORCPT + 7 others); Wed, 11 Mar 2015 08:41:33 -0400 Received: from mail-pa0-f41.google.com ([209.85.220.41]:44502 "EHLO mail-pa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753001AbbCKMl1 (ORCPT ); Wed, 11 Mar 2015 08:41:27 -0400 Received: by padet14 with SMTP id et14so11117082pad.11 for ; Wed, 11 Mar 2015 05:41:27 -0700 (PDT) X-Received: by 10.70.108.195 with SMTP id hm3mr77617973pdb.105.1426077686915; Wed, 11 Mar 2015 05:41:26 -0700 (PDT) Received: from localhost ([180.150.153.56]) by mx.google.com with ESMTPSA id f12sm5951643pat.43.2015.03.11.05.41.25 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 11 Mar 2015 05:41:25 -0700 (PDT) From: Hanjun Guo To: Catalin Marinas , "Rafael J. Wysocki" , Will Deacon , Olof Johansson , Grant Likely Cc: Lorenzo Pieralisi , Arnd Bergmann , Mark Rutland , Graeme Gregory , Sudeep Holla , Jon Masters , Marc Zyngier , Mark Brown , Robert Richter , Timur Tabi , Ashwin Chaugule , suravee.suthikulpanit@amd.com, linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linaro-acpi@lists.linaro.org, Hanjun Guo , Liviu Dudau Subject: [PATCH v10 07/21] ARM64 / ACPI: Introduce PCI stub functions for ACPI Date: Wed, 11 Mar 2015 20:39:33 +0800 Message-Id: <1426077587-1561-8-git-send-email-hanjun.guo@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1426077587-1561-1-git-send-email-hanjun.guo@linaro.org> References: <1426077587-1561-1-git-send-email-hanjun.guo@linaro.org> Sender: linux-acpi-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: hanjun.guo@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.173 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , CONFIG_ACPI depends CONFIG_PCI on x86 and ia64, in ARM64 server world we will have PCIe in most cases, but some of them may not, make CONFIG_ACPI depend CONFIG_PCI on ARM64 will satisfy both. With that case, we need some arch dependent PCI functions to access the config space before the PCI root bridge is created, and pci_acpi_scan_root() to create the PCI root bus. So introduce some stub function here to make ACPI core compile and revisit them later when implemented on ARM64. CC: Liviu Dudau CC: Catalin Marinas CC: Will Deacon Tested-by: Suravee Suthikulpanit Tested-by: Yijing Wang Tested-by: Mark Langsdorf Tested-by: Jon Masters Tested-by: Timur Tabi Tested-by: Robert Richter Acked-by: Robert Richter Reviewed-by: Grant Likely Signed-off-by: Hanjun Guo --- arch/arm64/include/asm/pci.h | 6 ++++++ arch/arm64/kernel/pci.c | 25 +++++++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/arch/arm64/include/asm/pci.h b/arch/arm64/include/asm/pci.h index 872ba93..b008a72 100644 --- a/arch/arm64/include/asm/pci.h +++ b/arch/arm64/include/asm/pci.h @@ -27,6 +27,12 @@ extern int isa_dma_bridge_buggy; #ifdef CONFIG_PCI +static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) +{ + /* no legacy IRQ on arm64 */ + return -ENODEV; +} + static inline int pci_proc_domain(struct pci_bus *bus) { return 1; diff --git a/arch/arm64/kernel/pci.c b/arch/arm64/kernel/pci.c index 6f93c24..4095379 100644 --- a/arch/arm64/kernel/pci.c +++ b/arch/arm64/kernel/pci.c @@ -10,6 +10,7 @@ * */ +#include #include #include #include @@ -46,3 +47,27 @@ int pcibios_add_device(struct pci_dev *dev) return 0; } + +/* + * raw_pci_read/write - Platform-specific PCI config space access. + */ +int 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, + unsigned int devfn, int reg, int len, u32 val) +{ + return -ENXIO; +} + +#ifdef CONFIG_ACPI +/* Root bridge scanning */ +struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root) +{ + /* TODO: Should be revisited when implementing PCI on ACPI */ + return NULL; +} +#endif