Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp4377552ybg; Mon, 8 Jun 2020 06:28:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxdNiha5zyPj/jcXAXYcn7BDv+ZX8ibLlbJJ/gRkctswCTFiomoaGhQCNmbNR8diuK7x9zD X-Received: by 2002:a17:906:2e83:: with SMTP id o3mr20242789eji.312.1591622929038; Mon, 08 Jun 2020 06:28:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591622929; cv=none; d=google.com; s=arc-20160816; b=W1fr/Rbc1Oq4zzb+s6GP+loOel2CojqEwtSZAXiJ9z1jNrSW4UKUP5niP0j+H4f/8/ nf677qs0D4znypfORXmoGfoJKp/Gh3nChdZbBNz4tlsjJv2748Av91rG8T8pY41akx2T liHxr/CJDShtiO+XIrvZU8O0uwL/kdPi4lx1AeOgax3wdkgz+awUekN/JwZVyjp5zL8K dgEkoKOdSZBJ05zMClRwIVrXhG86ZXQ/y4bLvT6AzKdO1LWpyUFmUNEVBp2gI6Cc3P/D 8kUpcWlUFUgr/6JN1pAQXg5pQ8hawDPqADdvhhFQE8Y0lFMcYLF2kBLCht+aFt52y1zd s4jA== 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=R2+cSmHPwR8ZF/k3U0JLI1XF1xtZQxQSe0yC4h2lCAs=; b=UKFX44DHM2qpWIK/N7A6criF8zPtktUN6bjCtUffEXQaV3b1q+yxSxFsBWwGJoKL6b EI3JXQVtV8DDf8aP4jaI1wlFuy9WB5sKrr1y3RkAzX1SwRnGxCzlJooFcOZQ7fj1x7kA 8edggxEFHg42hTtXbd9Asis5S0EmU+xljtuP++24gzq7jrlkgjyaI8Unnd9Uyd9P6MzA xnqElGwjd14r6RsV1nSBVWe3c1kRqCyy2gj5ywqZTRNw/IxeutxVd521+LC9KcGApHmP aMkM2ipx44vqqrtLO2ImRgH9pb/K8q+Ku29lZa6zEk+dc3MuH+fXtzZbPPEawP2V0TAX w5KQ== 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 a21si1432259ejf.332.2020.06.08.06.28.26; Mon, 08 Jun 2020 06:28:49 -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 S1729784AbgFHNXZ (ORCPT + 99 others); Mon, 8 Jun 2020 09:23:25 -0400 Received: from inva020.nxp.com ([92.121.34.13]:41646 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729762AbgFHNXU (ORCPT ); Mon, 8 Jun 2020 09:23:20 -0400 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 Cc: Linux-imx@nxp.com 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 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 --- 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"); -- 2.7.4