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: 5761291 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 39166BF440 for ; Mon, 2 Feb 2015 12:51:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4FA6B2034E for ; Mon, 2 Feb 2015 12:51:36 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3A78620320 for ; Mon, 2 Feb 2015 12:51:35 +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 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-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Q5zgclTs74Kh16ZZtDa0BwYhfPyfdfIs6zts3BuXIfc=; b=OHkKEejoIlb5JDEMLvT7uLNzSUwWF7kNTwID6rd52Cysj/RiGSWnWa9MbCsExidN4G zxVnKQZ12zA/qtCsefoYUhtumIUTixdPFmKHsA8zKdxWg8MEAMPutV664N4SzgeO8185 ysSjWHwm/LjjsT1kM09AdJunUD2SKcFEnWt1BRif0nqbdCqmFIXrVi2QOuZ8Oqa+uxbu mUAXogNDLdj8rOgTkZOc2Noffhgy30KWXzdtja441wz4u34C1qkSi/+/rT5hW2FBVIcE Is8se8ulqdN26r4oiegafiL1TgFNcprZRNl4gG7G1/1/fLCO6uhtzAji6LMFsmW6n988 W+Yg== X-Gm-Message-State: ALoCoQl9ps+fwTUTw3TLIu9m9XDGBh1lI/1jXyk2nLoNPrkDt+Pn+OFJNOsIgl0ZukYBjiFKtNhr 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 (/) 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+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_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 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