From patchwork Mon Jun 8 13:12:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anson Huang X-Patchwork-Id: 11593363 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D860F912 for ; Mon, 8 Jun 2020 13:24:09 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B4B692072F for ; Mon, 8 Jun 2020 13:24:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="BHIviLoT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B4B692072F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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=u8EJXCaYMPRlW4FhUQJBYBnFPBncRAN/F3Ga3q7pugw=; b=BHIviLoTbnyrbUVWGIY3ufXOKD FRM771ETm2ia82OaNtF53X661GClXS5G8V1fyn/drV1+BzUc594hdl34EHbZiXCH6HWXm3ccdcZRx T9wstQkXzFl/Etuc8LCG0OGqZxl8TA3zHUq6zMFkdbud3spr8FQD76XMq3VGkfcX5r9KHXOS2V+P6 VCXRnQqxL9VLFeVqDxNxkpiDEzZNP1QNUumPrvrsq7aE7fmwUmeo1MfRYNXVAEYFip6UC6p6EL8gl WjBVIc08buuwS19oN3CULExgAlWpuQQPUoLCbFeppU3uYm2ZQ7nfjq12+/VJy2i6A5aOsxSQAd0kF BGTRNipg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jiHkx-0001tK-J3; Mon, 08 Jun 2020 13:24:03 +0000 Received: from inva020.nxp.com ([92.121.34.13]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jiHkF-0001A2-R6 for linux-arm-kernel@lists.infradead.org; Mon, 08 Jun 2020 13:23:21 +0000 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 85E6C1A010A; Mon, 8 Jun 2020 15:23:18 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 5AB4A1A0120; Mon, 8 Jun 2020 15:23:08 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id E07AB402FB; Mon, 8 Jun 2020 21:22:55 +0800 (SGT) From: Anson Huang To: linux@armlinux.org.uk, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, mturquette@baylibre.com, sboyd@kernel.org, oleksandr.suvorov@toradex.com, stefan.agner@toradex.com, arnd@arndb.de, abel.vesa@nxp.com, peng.fan@nxp.com, aisheng.dong@nxp.com, tglx@linutronix.de, allison@lohutok.net, gregkh@linuxfoundation.org, info@metux.net, leonard.crestez@nxp.com, fugang.duan@nxp.com, daniel.baluta@nxp.com, yuehaibing@huawei.com, sfr@canb.auug.org.au, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org Subject: [PATCH 3/9] clk: imx: Support building SCU clock driver as module Date: Mon, 8 Jun 2020 21:12:10 +0800 Message-Id: <1591621936-11886-4-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1591621936-11886-1-git-send-email-Anson.Huang@nxp.com> References: <1591621936-11886-1-git-send-email-Anson.Huang@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200608_062320_018434_CF3C58E5 X-CRM114-Status: UNSURE ( 8.60 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [92.121.34.13 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Linux-imx@nxp.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org There are more and more requirements of building SoC specific drivers as modules, add support for building SCU clock driver as module to meet the requirement. Signed-off-by: Anson Huang --- drivers/clk/imx/Kconfig | 2 +- drivers/clk/imx/Makefile | 5 ++--- drivers/clk/imx/clk-scu.c | 5 +++++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/clk/imx/Kconfig b/drivers/clk/imx/Kconfig index db0253f..503d6c8 100644 --- a/drivers/clk/imx/Kconfig +++ b/drivers/clk/imx/Kconfig @@ -5,7 +5,7 @@ config MXC_CLK def_bool ARCH_MXC config MXC_CLK_SCU - bool + tristate "IMX SCU clock" depends on IMX_SCU config CLK_IMX8MM diff --git a/drivers/clk/imx/Makefile b/drivers/clk/imx/Makefile index 928f874..1af8cff 100644 --- a/drivers/clk/imx/Makefile +++ b/drivers/clk/imx/Makefile @@ -21,9 +21,8 @@ obj-$(CONFIG_MXC_CLK) += \ clk-sscg-pll.o \ clk-pll14xx.o -obj-$(CONFIG_MXC_CLK_SCU) += \ - clk-scu.o \ - clk-lpcg-scu.o +mxc-clk-scu-objs += clk-scu.o clk-lpcg-scu.o +obj-$(CONFIG_MXC_CLK_SCU) += mxc-clk-scu.o obj-$(CONFIG_CLK_IMX8MM) += clk-imx8mm.o obj-$(CONFIG_CLK_IMX8MN) += clk-imx8mn.o diff --git a/drivers/clk/imx/clk-scu.c b/drivers/clk/imx/clk-scu.c index b8b2072..9688981 100644 --- a/drivers/clk/imx/clk-scu.c +++ b/drivers/clk/imx/clk-scu.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include "clk-scu.h" @@ -132,6 +133,7 @@ int imx_clk_scu_init(void) { return imx_scu_get_handle(&ccm_ipc_handle); } +EXPORT_SYMBOL_GPL(imx_clk_scu_init); /* * clk_scu_recalc_rate - Get clock rate for a SCU clock @@ -387,3 +389,6 @@ struct clk_hw *__imx_clk_scu(const char *name, const char * const *parents, return hw; } +EXPORT_SYMBOL_GPL(__imx_clk_scu); + +MODULE_LICENSE("GPL v2");