Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp308331ybg; Tue, 9 Jun 2020 00:45:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJymmh7SQiuz/DlH8kQCevJxLfkmvxnyJQFBJQJQLB/WzR3mqrKMTzJdXsJtRl9vy1JFPWG0 X-Received: by 2002:a05:6402:2289:: with SMTP id cw9mr13707111edb.33.1591688743963; Tue, 09 Jun 2020 00:45:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591688743; cv=none; d=google.com; s=arc-20160816; b=rEtFNIajBBK9nmIp9JmVj+4U23eWHxkFZPDLJecjBL0oDQoCheb26JrFB+HQZqCuy3 6l7y+447cI2GR05+FgaylJdJufZeXD943dpiitqpIQAV4q6E1H9UshjKgwjO6fuiDxlw 00mEnGO8s7BdBsjKLzesStRJ8hVAk/rY0SgIT9Ms6hjdA0BR4oRV5v3YUtIZhejyVZ3F f6z+82XbHvS0WFwXFxZ+WIQMM7vSngpf/gEmqTUaZov4SEYJyz1sHlygOi4KzsnlxNlh MtF09TQAbEIjImdkFB0EwolExcTKHsOYVgecPAH2CjnVTQucXdjohJQhmttJ8XbN18Jm 4mlg== 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=imxdVU69h6COOTgLB8xcW0cSIuwVvs23wQv8BNTi3DM=; b=L6yc79xOCvtHqHSFZJe6pf+VI5ILIQLO3Yl2x4Kva0cIhxnCs0DZ1UhyVDlElINY/j BaJ74QVCkBOhmFOPWNAj5aASFvkgwOpFMLDEIn4Zwp8vk9oE9EshhVP0wOy3VWve5orh 2lDker7liiIIHnRUZy6pE3aGCH9lurs4tvZZoTJv7daCOSJ6G3J+fT17qx2MjoMY/sO8 F9tKnDLCS+d4E410mVPTnEqtAwYKlV+jptMqsX5seR/8jf5bWGaDEvC6j4UFWyf3BxXN SOto037LaXY781nA0D7IyYK2jNzls3CqRgm6vPGxH4r13kvHB9MqWBF6hkWC2IFkS3NY 3F9g== 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 f8si806353ejf.570.2020.06.09.00.45.17; Tue, 09 Jun 2020 00:45:43 -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 S1727892AbgFIHn0 (ORCPT + 99 others); Tue, 9 Jun 2020 03:43:26 -0400 Received: from inva020.nxp.com ([92.121.34.13]:47050 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726404AbgFIHnU (ORCPT ); Tue, 9 Jun 2020 03:43:20 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 4D4A91A12A0; Tue, 9 Jun 2020 09:43: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 507691A12A9; Tue, 9 Jun 2020 09:43: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 02D73402FB; Tue, 9 Jun 2020 15:42: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 Cc: Linux-imx@nxp.com Subject: [PATCH V2 3/9] clk: imx: Support building SCU clock driver as module Date: Tue, 9 Jun 2020 15:32:07 +0800 Message-Id: <1591687933-19495-4-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1591687933-19495-1-git-send-email-Anson.Huang@nxp.com> References: <1591687933-19495-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 V1: - add ARCH_MXC to build dependency to avoid build fail on x86 arch; - move clk-lpcg-scu.c change in to this patch. --- drivers/clk/imx/Kconfig | 4 ++-- drivers/clk/imx/Makefile | 5 ++--- drivers/clk/imx/clk-lpcg-scu.c | 1 + drivers/clk/imx/clk-scu.c | 5 +++++ 4 files changed, 10 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..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-lpcg-scu.c b/drivers/clk/imx/clk-lpcg-scu.c index a73a799..8177f0e 100644 --- a/drivers/clk/imx/clk-lpcg-scu.c +++ b/drivers/clk/imx/clk-lpcg-scu.c @@ -114,3 +114,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