Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2983131ybt; Mon, 29 Jun 2020 12:05:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyKaWiiCg3Z4C2Yc1hTZ8xuqcT6UjAsqxx2Xrc7+XPi2Q4NH2kU4I7WC8LLT0e6HvDSyidm X-Received: by 2002:a50:d753:: with SMTP id i19mr19832144edj.9.1593457558971; Mon, 29 Jun 2020 12:05:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593457558; cv=none; d=google.com; s=arc-20160816; b=nYAkyUzeNUR9URtZDi96nfexJygn4w9YFfbHeRUwhyyoiwrwD4/uS/JM8nw24QBqbI 61ILJIIYjuOzMnkdMixpwb2eOPZWfUCMTq7BQ4ruX+pyjvUC29qbouowHAlOispS5ITG cgJHmLa9QhI3hxXkzlgkF9BCP5xyYtTuyNDmYuota9yx8UoK/KGeTindSS9hZRdQcaCD SWq7xTXvFZLpQ1wh3USeZuA+5Ke7zxpuXe6efUJIAOTfuvPRI5960Ci+1U3zLOi87WMF o4U5zfje7McIMsT/M60DobZDIg4VAaKH8goCEY86qjr0foUz+1ik2D4x67YllpHzEHJ7 oR2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=SIQ7v7iMCcr6iwfByhwmSJSo/lnvYcOuAjwmIUru1EA=; b=nwXZubWbKqgHkQqxqN+UMZPJ9QxCA17QMZhrNyVEz/wve3epPhob/49nIiJ/7dTmaJ llip7IPjUFenD2W+DvUhncXGaRRnBVSNCQUuKryxWgSqlQijD37Cc1cgU8Ynvf+d2PFg YFrFzIYw++q5nsYJiM8UmKHu++nKzWcUhg/TwL3UTtr66eGFxW6zzjmAWABsvYXD/6Lb JN7v50YKL+NYgSmgit4nMb/z5F8Y4sqguJleJTqpSv0yhmQiv9vhScjXPtnXMdA9RriB DBwJcKnBQ5QMUPUD6V3GpJU1QXpObPaOZUJ1WhWgqezd7um3/C8Z7bWHo9nSEvIXL55t Mzhw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cw21si192340edb.600.2020.06.29.12.05.35; Mon, 29 Jun 2020 12:05:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730551AbgF2TF1 (ORCPT + 99 others); Mon, 29 Jun 2020 15:05:27 -0400 Received: from inva021.nxp.com ([92.121.34.21]:41034 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730534AbgF2TEq (ORCPT ); Mon, 29 Jun 2020 15:04:46 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id E5D78200FE3; Mon, 29 Jun 2020 08:06:05 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 1278F200EF8; Mon, 29 Jun 2020 08:05:55 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 4F852402E0; Mon, 29 Jun 2020 14:05:42 +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, peng.fan@nxp.com, abel.vesa@nxp.com, aisheng.dong@nxp.com, fugang.duan@nxp.com, daniel.baluta@nxp.com, yuehaibing@huawei.com, sfr@canb.auug.org.au, viro@zeniv.linux.org.uk, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org Cc: Linux-imx@nxp.com Subject: [PATCH V3 04/10] clk: imx: Support building SCU clock driver as module Date: Mon, 29 Jun 2020 13:53:56 +0800 Message-Id: <1593410042-10598-5-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1593410042-10598-1-git-send-email-Anson.Huang@nxp.com> References: <1593410042-10598-1-git-send-email-Anson.Huang@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 --- Changes since V2: - use separated line for each file which is included for build; - include linux/export.h where necessary. --- drivers/clk/imx/Kconfig | 4 ++-- drivers/clk/imx/Makefile | 6 +++--- drivers/clk/imx/clk-lpcg-scu.c | 2 ++ drivers/clk/imx/clk-scu.c | 5 +++++ 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/drivers/clk/imx/Kconfig b/drivers/clk/imx/Kconfig index db0253f..ded0643 100644 --- a/drivers/clk/imx/Kconfig +++ b/drivers/clk/imx/Kconfig @@ -5,8 +5,8 @@ config MXC_CLK def_bool ARCH_MXC config MXC_CLK_SCU - bool - depends on IMX_SCU + tristate "IMX SCU clock" + depends on ARCH_MXC && IMX_SCU config CLK_IMX8MM bool "IMX8MM CCM Clock Driver" diff --git a/drivers/clk/imx/Makefile b/drivers/clk/imx/Makefile index 928f874..c6574a3 100644 --- a/drivers/clk/imx/Makefile +++ b/drivers/clk/imx/Makefile @@ -21,9 +21,9 @@ 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-lpcg-scu.o +mxc-clk-scu-objs += clk-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-lpcg-scu.c b/drivers/clk/imx/clk-lpcg-scu.c index a73a799..d4e78ca 100644 --- a/drivers/clk/imx/clk-lpcg-scu.c +++ b/drivers/clk/imx/clk-lpcg-scu.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include @@ -114,3 +115,4 @@ struct clk_hw *imx_clk_lpcg_scu(const char *name, const char *parent_name, return hw; } +EXPORT_SYMBOL_GPL(imx_clk_lpcg_scu); 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"); -- 2.7.4