From patchwork Mon Jun 29 05:53:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anson Huang X-Patchwork-Id: 11630445 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 D4152618 for ; Mon, 29 Jun 2020 06:07:51 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 AC1C223128 for ; Mon, 29 Jun 2020 06:07:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Co8zFNjq" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AC1C223128 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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id: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:In-Reply-To:References:List-Owner; bh=m+fjP+Cv6F9+t1dXcGZPXNYQPWSww5kzryGpV8rOlwg=; b=Co8zFNjqnhuQZb6m26XNCQVjzX aUrLWG81LRvRWysYPVZwpQSFjsHBUy/Mv5lym2jOyQspesSIOkd8WiEqvbR8/Bq6GSW09+RgwyqO0 pa5+0EWiJHn4mgmDgbzyRLJuR/X0Nf9BjCVRIhRAT9flfANcWqL3G+r/XGuckTC8QdTz3J/f3NsIN q8vMgWn36L3O6uh0Vu+DbZVtM9VwXgBBMWfJifK5tGwzrYnWg8wq2JbERtBLxqZPQ1cp/8llJmfWP CzkgkWVRyzps7hs3go9dquwGVyn08UDA1YuecBxxPIdgNOFOX5OmmRRQQaYpUy/lL/a13/q4viNcH 47UTDepA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jpmve-0003Jq-Es; Mon, 29 Jun 2020 06:06:06 +0000 Received: from inva021.nxp.com ([92.121.34.21]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jpmvZ-0003IJ-E6 for linux-arm-kernel@lists.infradead.org; Mon, 29 Jun 2020 06:06:04 +0000 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id D4EFF200F30; Mon, 29 Jun 2020 08:05:57 +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 13A74200FB7; Mon, 29 Jun 2020 08:05:47 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 630294032B; Mon, 29 Jun 2020 14:05:34 +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 Subject: [PATCH V3 00/10] Support building i.MX8 SoCs clock driver as module Date: Mon, 29 Jun 2020 13:53:52 +0800 Message-Id: <1593410042-10598-1-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.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.21 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an 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 Nowdays, there are more and more requirements of building SoC specific drivers as modules, such as Android GKI (generic kernel image), this patch set supports building i.MX8 SoCs clock drivers as modules, including i.MX8MQ/MM/MN/MP/QXP, the common clock modules are: mxc-clk.ko for i.MX8MQ/MM/MN/MP, mxc-clk-scu.ko for i.MX8QXP and later SoCs with SCU inside, normally, each platform can ONLY insmod 1 common i.MX clock driver and its own SoC clock driver. Since i.MX common clk driver will support module build and no longer selected by default, so for i.MX ARMv7 platforms, need to manually select it to make build pass. Changes since V2: - fix __setup_param() instead of handling module build inside clk driver; - improve makefile format to include each file in separated line; - add linux/export.h where necessary. Anson Huang (10): clk: composite: Export clk_hw_register_composite() init.h: Fix the __setup_param() macro for module build ARM: imx: Select MXC_CLK for each SoC clk: imx: Support building SCU clock driver as module clk: imx: Support building i.MX common clock driver as module clk: imx8mm: Support module build clk: imx8mn: Support module build clk: imx8mp: Support module build clk: imx8mq: Support module build clk: imx8qxp: Support module build arch/arm/mach-imx/Kconfig | 11 +++++++++ drivers/clk/clk-composite.c | 1 + drivers/clk/imx/Kconfig | 22 ++++++++++-------- drivers/clk/imx/Makefile | 46 +++++++++++++++++++------------------- drivers/clk/imx/clk-composite-8m.c | 2 ++ drivers/clk/imx/clk-cpu.c | 2 ++ drivers/clk/imx/clk-frac-pll.c | 2 ++ drivers/clk/imx/clk-gate2.c | 2 ++ drivers/clk/imx/clk-imx8mm.c | 1 + drivers/clk/imx/clk-imx8mn.c | 1 + drivers/clk/imx/clk-imx8mp.c | 1 + drivers/clk/imx/clk-imx8mq.c | 1 + drivers/clk/imx/clk-imx8qxp-lpcg.c | 1 + drivers/clk/imx/clk-imx8qxp.c | 1 + drivers/clk/imx/clk-lpcg-scu.c | 2 ++ drivers/clk/imx/clk-pll14xx.c | 5 +++++ drivers/clk/imx/clk-scu.c | 5 +++++ drivers/clk/imx/clk-sscg-pll.c | 2 ++ drivers/clk/imx/clk.c | 20 ++++++++++++----- include/linux/init.h | 2 +- 20 files changed, 91 insertions(+), 39 deletions(-)