From patchwork Mon Feb 2 12:45:34 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 44139 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f69.google.com (mail-wg0-f69.google.com [74.125.82.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 121CC2034D for ; Mon, 2 Feb 2015 12:51:01 +0000 (UTC) Received: by mail-wg0-f69.google.com with SMTP id x12sf16060434wgg.0 for ; Mon, 02 Feb 2015 04:51:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :in-reply-to:references:cc:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version :content-type:content-transfer-encoding:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list; bh=288v+ZOhUrho3dA8t74KcDgIb/8vHxuJpnSOxpHmCy4=; b=a8GEoavYN/uIC/q4jqEAtb3hAlLx9MmEfPDhI1Psdx8az359wNiZtzR7vfILlN1h/3 uK4UWuDKHXJmWEfvYL42C/2Ew1T4tGZ1yiQcd0N6w5dtnBR/6eInVXUTXUOtEMJPy2Kb GORP9ZhmOpmYzoMW1ZdZirvEWIKH3JFssQNKGp3mlKYH9Vb6ADmpM2BuPN+OHc2ROdg+ XS92Aw81ZR54qVxmSg+MXg9seavGzKc56DfkL6vwdYT2XyweTJkYh+5dhleCT45K2V9C Gd74vybqnArjTSFmXnItoNRHNC3QEbsuesiH17K5Oqn46jmMx+22aETg4+vj5Uto+W15 f3XQ== X-Gm-Message-State: ALoCoQmIL3RLREt9g3DJDOxqT02M/1SJJVYs7TQgy23UXlqGJVx3b5wRbhC75N0dtvWrNQg5NyX6 X-Received: by 10.112.213.72 with SMTP id nq8mr2411214lbc.18.1422881460363; Mon, 02 Feb 2015 04:51:00 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.9.229 with SMTP id d5ls104546lab.75.gmail; Mon, 02 Feb 2015 04:51:00 -0800 (PST) X-Received: by 10.112.167.68 with SMTP id zm4mr19246875lbb.93.1422881460208; Mon, 02 Feb 2015 04:51:00 -0800 (PST) Received: from mail-la0-f42.google.com (mail-la0-f42.google.com. [209.85.215.42]) by mx.google.com with ESMTPS id h9si16906818lam.29.2015.02.02.04.50.59 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 02 Feb 2015 04:50:59 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.42 as permitted sender) client-ip=209.85.215.42; Received: by mail-la0-f42.google.com with SMTP id ms9so40352154lab.1 for ; Mon, 02 Feb 2015 04:50:59 -0800 (PST) X-Received: by 10.112.144.164 with SMTP id sn4mr14093677lbb.2.1422881459774; Mon, 02 Feb 2015 04:50:59 -0800 (PST) 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 h5csp1274190lbj; Mon, 2 Feb 2015 04:50:59 -0800 (PST) X-Received: by 10.70.50.165 with SMTP id d5mr19706963pdo.13.1422881456336; Mon, 02 Feb 2015 04:50:56 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id gq5si23515236pac.127.2015.02.02.04.50.55 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Feb 2015 04:50:56 -0800 (PST) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; 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 1YIGRT-0000ND-Si; Mon, 02 Feb 2015 12:49:27 +0000 Received: from mail-pa0-f49.google.com ([209.85.220.49]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YIGRB-00088n-Bf for linux-arm-kernel@lists.infradead.org; Mon, 02 Feb 2015 12:49:10 +0000 Received: by mail-pa0-f49.google.com with SMTP id fa1so82078525pad.8 for ; Mon, 02 Feb 2015 04:48:48 -0800 (PST) X-Received: by 10.66.148.161 with SMTP id tt1mr29242476pab.85.1422881328305; Mon, 02 Feb 2015 04:48:48 -0800 (PST) Received: from localhost ([180.150.157.4]) by mx.google.com with ESMTPSA id a6sm18695533pbu.95.2015.02.02.04.48.47 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 02 Feb 2015 04:48:47 -0800 (PST) From: Hanjun Guo To: Catalin Marinas , "Rafael J. Wysocki" , Olof Johansson , Arnd Bergmann , Mark Rutland , Grant Likely , Will Deacon Subject: [PATCH v8 06/21] ARM64 / ACPI: Introduce PCI stub functions for ACPI Date: Mon, 2 Feb 2015 20:45:34 +0800 Message-Id: <1422881149-8177-7-git-send-email-hanjun.guo@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1422881149-8177-1-git-send-email-hanjun.guo@linaro.org> References: <1422881149-8177-1-git-send-email-hanjun.guo@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150202_044909_439029_E316FD91 X-CRM114-Status: GOOD ( 10.81 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.220.49 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.220.49 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders Cc: Mark Langsdorf , linaro-acpi@lists.linaro.org, Liviu Dudau , wangyijing@huawei.com, Rob Herring , Lorenzo Pieralisi , Timur Tabi , Daniel Lezcano , linux-acpi@vger.kernel.org, Charles.Garcia-Tobin@arm.com, phoenix.liyi@huawei.com, Robert Richter , Jason Cooper , Marc Zyngier , Jon Masters , Mark Brown , Bjorn Helgaas , linux-arm-kernel@lists.infradead.org, Ashwin Chaugule , Graeme Gregory , Randy Dunlap , linux-kernel@vger.kernel.org, Hanjun Guo , suravee.suthikulpanit@amd.com, Sudeep Holla X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.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.215.42 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 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 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..fded096 100644 --- a/arch/arm64/include/asm/pci.h +++ b/arch/arm64/include/asm/pci.h @@ -24,6 +24,12 @@ */ #define PCI_DMA_BUS_IS_PHYS (0) +static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) +{ + /* no legacy IRQ on arm64 */ + return -ENODEV; +} + extern int isa_dma_bridge_buggy; #ifdef CONFIG_PCI diff --git a/arch/arm64/kernel/pci.c b/arch/arm64/kernel/pci.c index ce5836c..c17e7ea 100644 --- a/arch/arm64/kernel/pci.c +++ b/arch/arm64/kernel/pci.c @@ -10,6 +10,7 @@ * */ +#include #include #include #include @@ -68,3 +69,27 @@ void pci_bus_assign_domain_nr(struct pci_bus *bus, struct device *parent) bus->domain_nr = domain; } #endif + +/* + * 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 -EINVAL; +} + +int raw_pci_write(unsigned int domain, unsigned int bus, + unsigned int devfn, int reg, int len, u32 val) +{ + return -EINVAL; +} + +#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