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: 9614523 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 724CD60417 for ; Fri, 10 Mar 2017 02:47:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 66BF62846A for ; Fri, 10 Mar 2017 02:47:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5BA28285A4; Fri, 10 Mar 2017 02:47:02 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 15A952846A for ; Fri, 10 Mar 2017 02:47:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=4LGgX2k0DtCEwk/CLFKljCROgTbWsQKtqXCJbboYT/Y=; b=d364zmYTBa+VFo9dJgNlExX9Rc SE04bzGHDrbVjmGtNM3PG1rkq7mxolkZk3mb6Ay6BwFpUlvHtxoDvq9mG+kMTYURRkayRlmgKFez5 I015mTTRUzWaFfTKxklS4fm1k8O0aUVDQRG/feSU8OqHQNnmErwFIUch/jki2I2oggaaGIAo9Ixr7 OwPnP2RFjCR5U/S2VyKVRHliYgz+SdLFnXphcutCB3i+IEINohcL4nb75bTFf2aJFoV8fAheucF72 Jl/r7F66ik1lbBpp6VY3xwHDPCj9q8i4IhCEUylZU4EBEBktv86ebf6VIYDVc1swBsvx7/zBylw/W VHVG6zIQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cmAa5-0006V0-Od; Fri, 10 Mar 2017 02:47:01 +0000 Received: from mail-pg0-x235.google.com ([2607:f8b0:400e:c05::235]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cmAZx-0006Mu-Js for linux-rockchip@lists.infradead.org; Fri, 10 Mar 2017 02:46:57 +0000 Received: by mail-pg0-x235.google.com with SMTP id b129so33417354pgc.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=jAsx82m7C1BKQRKLOgCfVCEFOaETuEYId6u0yzsE1rzaoHdG8p5GYJRj1uIotsquWM zT09aHVaTYPLLQJXSIPeIDpyF2RP+zd8xs/2s4yqPBVK5NFx4uq0Eba8AYGd3W3JWsH9 LzO9m/z/yLDiv/iiyu33iIOgrVwfe8NIoQkiwg23hbINZ7RjtZ5sjJUGW+Jhpq0qk7Aw pJcx7fMSQsuG9IpUMhU3XO3c/uTFGaLfKMGdHPqxY0O1lD8ir8k1TTUJd6rMDFF+7Ep6 Q68F6TC9tPymnss+uTS2eonq8pg9Vm/Gx6B4rvlJA0SsUX8t4pUGsBXszMKuFIScPcGf hXzQ== X-Gm-Message-State: AMke39kIqxpZ6KKx+WXOT/qO+sdmop6l3yerIuf8fSyYUweah34hRaIib3SA7mLUzLADYxu+ 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170309_184653_683885_80D1E5B0 X-CRM114-Status: UNSURE ( 9.59 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jeffy Chen , linux-pci@vger.kernel.org, Shawn Lin , Wenrui Li , linux-kernel@vger.kernel.org, Brian Norris , linux-rockchip@lists.infradead.org MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.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");