From patchwork Mon May 30 15:14:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Nowicki X-Patchwork-Id: 9141665 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2400E60777 for ; Mon, 30 May 2016 15:17:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 152F928222 for ; Mon, 30 May 2016 15:17:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 09DA428224; Mon, 30 May 2016 15:17:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9567C28222 for ; Mon, 30 May 2016 15:17:39 +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 1b7OvT-0002h0-Is; Mon, 30 May 2016 15:16:19 +0000 Received: from mail-lf0-x22f.google.com ([2a00:1450:4010:c07::22f]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1b7Oul-00028L-SD for linux-arm-kernel@lists.infradead.org; Mon, 30 May 2016 15:15:36 +0000 Received: by mail-lf0-x22f.google.com with SMTP id s64so50066965lfe.0 for ; Mon, 30 May 2016 08:15:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=rwYwm3DTeYq93GKrTvLX5CYHMYB7Wjo9kPvAM/Iy/j8=; b=YuKyvyu0catyT6k3d7J8ey8hNo4UyHWfVkkedCOrm0IhuGFdDARsQD1R6RJUdTjbst dfzUIonn38PtMH+ISovFxg6wch5Ck4E8NZ0PCEeXx+il8ugWj4XqxjbHGFsCPU+yaXxd JFdEsCrwSckcjtWlN0Z7qLH41ci2rQRz4TyXFfD0ViI3yW8BJoKRPr9fmrAAW1wy5Bq8 uMxrLdySLXirBjh2ncbPCZU9AcgXek4pHK4GyUtotvAawLE+NrVJbJWb91ufgAC++H2O s8BXoyiFFgSyejALMnu5NumS5FreToCK0QvdGyOhOjXCZ6AwgHL3I//gjSOXwt5kIPcS gICA== 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=rwYwm3DTeYq93GKrTvLX5CYHMYB7Wjo9kPvAM/Iy/j8=; b=leQEbNzENJ5aFGnA25XtcPNi5sb0C0mOuvmOVpiQX5K9H/CwqMxF4LO5gLj/Ldu8Nh J91CnYC2saGwX9BqRkwdgUEMbQzXYmKR2CQkB7oR+6XqWpSfjIWtSK3iy16xSG7/061c 4AncHYCGOCby4jv5aWfRkcgDrZdC5xZVgmYOGqxlCdzp3HCf55Ih+hn69XO1y1/l02Ex +gYznHEdEANOaDzbCJFoxdAZAM2lqYqDPxzdwwlG/sVBVGgE8vZ/8sM005evD7PxpzrK ky308ERKEa9vY3qAqPwuSawkW5UcG4/KECDPj2pNw9BPaFD8L5QIFYclCrt1rXwqa51Q mmaA== X-Gm-Message-State: ALyK8tLDd0fvGf7NBZVedvF1Y7dK01hCYtjEBIWsqUFbytUOWpYx4SBsB9dMLwudsvA+8g== X-Received: by 10.25.90.1 with SMTP id o1mr7668421lfb.193.1464621314306; Mon, 30 May 2016 08:15:14 -0700 (PDT) Received: from tn-HP-4.semihalf.local (31-172-191-173.noc.fibertech.net.pl. [31.172.191.173]) by smtp.gmail.com with ESMTPSA id n13sm1392264lfb.33.2016.05.30.08.15.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 30 May 2016 08:15:13 -0700 (PDT) From: Tomasz Nowicki To: helgaas@kernel.org, arnd@arndb.de, will.deacon@arm.com, catalin.marinas@arm.com, rafael@kernel.org, hanjun.guo@linaro.org, Lorenzo.Pieralisi@arm.com, okaya@codeaurora.org, jchandra@broadcom.com Subject: [PATCH V8 8/9] arm64, pci, acpi: Provide ACPI-specific prerequisites for PCI bus enumeration. Date: Mon, 30 May 2016 17:14:21 +0200 Message-Id: <1464621262-26770-9-git-send-email-tn@semihalf.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1464621262-26770-1-git-send-email-tn@semihalf.com> References: <1464621262-26770-1-git-send-email-tn@semihalf.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160530_081536_157646_36644ABA X-CRM114-Status: UNSURE ( 9.91 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: jcm@redhat.com, linaro-acpi@lists.linaro.org, linux-pci@vger.kernel.org, dhdang@apm.com, Liviu.Dudau@arm.com, ddaney@caviumnetworks.com, jeremy.linton@arm.com, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, robert.richter@caviumnetworks.com, cov@codeaurora.org, Suravee.Suthikulpanit@amd.com, msalter@redhat.com, wangyijing@huawei.com, Tomasz Nowicki , mw@semihalf.com, andrea.gallo@linaro.org, linux-arm-kernel@lists.infradead.org, liudongdong3@huawei.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP ACPI requires to run acpi_pci_{add|remove}_bus while new PCI bus is created. This allows to do some ACPI-specific additional configuration, like PCI hotplug slot enumeration. In order to fulfill these requirements, we implement arch-specific pcibios_{add|remove}_bus calls and call acpi_pci_{add|remove}_bus from there. Signed-off-by: Tomasz Nowicki Reviewed-by: Lorenzo Pieralisi --- arch/arm64/kernel/pci.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/arm64/kernel/pci.c b/arch/arm64/kernel/pci.c index 336deef..3663be1 100644 --- a/arch/arm64/kernel/pci.c +++ b/arch/arm64/kernel/pci.c @@ -17,6 +17,7 @@ #include #include #include +#include #include /* @@ -96,4 +97,15 @@ struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root) /* TODO: Should be revisited when implementing PCI on ACPI */ return NULL; } + +void pcibios_add_bus(struct pci_bus *bus) +{ + acpi_pci_add_bus(bus); +} + +void pcibios_remove_bus(struct pci_bus *bus) +{ + acpi_pci_remove_bus(bus); +} + #endif