From patchwork Fri Mar 10 02:46:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Norris X-Patchwork-Id: 9614545 X-Patchwork-Delegate: bhelgaas@google.com 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 0EEDA60417 for ; Fri, 10 Mar 2017 02:48:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 048CE286E7 for ; Fri, 10 Mar 2017 02:48:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ED7EC286FC; Fri, 10 Mar 2017 02:48:24 +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=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_HI,RCVD_IN_SORBS_SPAM autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A3E72286E7 for ; Fri, 10 Mar 2017 02:48:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754411AbdCJCrd (ORCPT ); Thu, 9 Mar 2017 21:47:33 -0500 Received: from mail-pg0-f50.google.com ([74.125.83.50]:35666 "EHLO mail-pg0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753675AbdCJCrR (ORCPT ); Thu, 9 Mar 2017 21:47:17 -0500 Received: by mail-pg0-f50.google.com with SMTP id b129so33417356pgc.2 for ; Thu, 09 Mar 2017 18:46:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=dZx7YekA1D+/jgfbE4SMuj3V1ibfyEjE2erAPBmrgeo=; b=N6Z8NF7DLUJ/37VsEE/yaNbyBcbOAF2hqwhrAXFmDZy+zl/4cNra1CtARy9BFDZLvH XwHUgpZ+9jxCXgrhr1lIAcUlZ8Iyr2ruwWEdxyeJ822B8HFx8NRlnvvNip2CnjqjI9lj FSXmakD9C9++oLygCN/786eTfVr91xgqzieTk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=dZx7YekA1D+/jgfbE4SMuj3V1ibfyEjE2erAPBmrgeo=; b=SKjaPc3XhsKP4rU9KgRToCl1+YYdQi1UfhXaPcq7/y6zQH2RFGbplxCZWw1pao1tEf 7xThWFWGy3t2JS3jDaa1xzgo8/otSf8k/BJLyr1mrI1Ke+bLEcJdPoyzfApKMrv9LmAX xeEeGNWMX6w9Jx8IgehhsejaqiAZfGLg8FIKptGntPsJrkGC/1EJIPXImAO3cEPt/G0x rH3eM+JX6uob+K/7c7UWJpZhTCaNyUXdh+67QJFiDBlOClhkvS728r9WFkiM76u6rpuQ NNjRM2JaLUBWXmIJ9v0w6EUiJ0NnVUlKLIvStlIxe/b2sfy/fgkrVLIgtE0SBfe06s9h YAvA== X-Gm-Message-State: AMke39kcIWtR0Yf/YGNI0ojEtOA1QD9HSa6zSWE3DQ3ppg1CPDvOsQE56jckxZQUmclb5M6n X-Received: by 10.99.94.198 with SMTP id s189mr17742027pgb.211.1489113992206; Thu, 09 Mar 2017 18:46:32 -0800 (PST) Received: from ban.mtv.corp.google.com ([172.22.64.120]) by smtp.gmail.com with ESMTPSA id w29sm14830573pfi.131.2017.03.09.18.46.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 09 Mar 2017 18:46:31 -0800 (PST) From: Brian Norris To: Bjorn Helgaas Cc: , Shawn Lin , Jeffy Chen , Wenrui Li , linux-pci@vger.kernel.org, linux-rockchip@lists.infradead.org, Brian Norris Subject: [PATCH v2 5/5] PCI: rockchip: modularize Date: Thu, 9 Mar 2017 18:46:17 -0800 Message-Id: <20170310024617.67303-5-briannorris@chromium.org> X-Mailer: git-send-email 2.12.0.246.ga2ecc84866-goog In-Reply-To: <20170310024617.67303-1-briannorris@chromium.org> References: <20170310024617.67303-1-briannorris@chromium.org> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Now that we've exported pci_remap_iospace() and added proper remove() support, there's no reason this can't be a loadable module. Signed-off-by: Brian Norris --- new in v2 --- drivers/pci/host/Kconfig | 2 +- drivers/pci/host/pcie-rockchip.c | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/pci/host/Kconfig b/drivers/pci/host/Kconfig index f7c1d4d5c665..d2293ed81cf9 100644 --- a/drivers/pci/host/Kconfig +++ b/drivers/pci/host/Kconfig @@ -164,7 +164,7 @@ config PCI_HOST_THUNDER_ECAM Say Y here if you want ECAM support for CN88XX-Pass-1.x Cavium Thunder SoCs. config PCIE_ROCKCHIP - bool "Rockchip PCIe controller" + tristate "Rockchip PCIe controller" depends on ARCH_ROCKCHIP || COMPILE_TEST depends on OF depends on PCI_MSI_IRQ_DOMAIN diff --git a/drivers/pci/host/pcie-rockchip.c b/drivers/pci/host/pcie-rockchip.c index d2e5078ae331..bd6df7254de4 100644 --- a/drivers/pci/host/pcie-rockchip.c +++ b/drivers/pci/host/pcie-rockchip.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -1462,6 +1463,7 @@ static const struct of_device_id rockchip_pcie_of_match[] = { { .compatible = "rockchip,rk3399-pcie", }, {} }; +MODULE_DEVICE_TABLE(of, rockchip_pcie_of_match); static struct platform_driver rockchip_pcie_driver = { .driver = { @@ -1472,4 +1474,8 @@ static struct platform_driver rockchip_pcie_driver = { .probe = rockchip_pcie_probe, .remove = rockchip_pcie_remove, }; -builtin_platform_driver(rockchip_pcie_driver); +module_platform_driver(rockchip_pcie_driver); + +MODULE_AUTHOR("Rockchip Inc"); +MODULE_DESCRIPTION("Rockchip AXI PCIe driver"); +MODULE_LICENSE("GPL v2");