From patchwork Thu Jul 2 02:14:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anson Huang X-Patchwork-Id: 11637735 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 C6C9B13B4 for ; Thu, 2 Jul 2020 02:19:22 +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 9FED22070C for ; Thu, 2 Jul 2020 02:19:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="QHbZ2s7c" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9FED22070C 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=wFCdij1SHMRDk48xr3P0k3crDiy7GIZUQWnYJ4Wm4GM=; b=QHbZ2s7cs/PWrx9CQF0F9basKK OTrEtyWqYO+iH12+HNvkpVoGNUpHG8bBw8n/pI1TKTEuy0cq13/Fmal8Qjmk6vVTSL/KFE13a519u 1mMDL0ETSJRqOvy2au88y5tckE1DZu1BBPHhdYWAZ9Hqx7V+iVzaM2hGwbR/dMZqw+HsexsNK8u+k tjeAeiNL1K6btbNUAnt29xH0VaIUk8xbRihJBXvlR9VyHPrvjZoUuNsKooqT7J0mTcNMbZkzixj/S qL6ht9jBh9QvkMe6PaL1E+zHEQeELaiAuuNzvOGQ+vE1MmLWK0fkHOPmCpoC265s9ZAJx1vK0v2Q1 5s9SLQNw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jqonW-0006nx-4V; Thu, 02 Jul 2020 02:17:58 +0000 Received: from inva020.nxp.com ([92.121.34.13]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jqonQ-0006l3-Vx for linux-arm-kernel@lists.infradead.org; Thu, 02 Jul 2020 02:17:54 +0000 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 1615C1A0928; Thu, 2 Jul 2020 04:17:49 +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 E62EF1A0914; Thu, 2 Jul 2020 04:17:41 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 07EB4402DD; Thu, 2 Jul 2020 10:17:32 +0800 (SGT) From: Anson Huang To: mturquette@baylibre.com, sboyd@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, peng.fan@nxp.com, arnd@arndb.de, abel.vesa@nxp.com, aisheng.dong@nxp.com, fugang.duan@nxp.com, daniel.baluta@nxp.com, yuehaibing@huawei.com, sfr@canb.auug.org.au, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH V4 0/5] Support building i.MX8 SoCs clock driver as module Date: Thu, 2 Jul 2020 10:14:29 +0800 Message-Id: <1593656074-10092-1-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 X-Virus-Scanned: ClamAV using ClamSMTP X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200701_221753_190535_D7763243 X-CRM114-Status: UNSURE ( 7.08 ) X-CRM114-Notice: Please train this message. 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.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 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, i.MX8QXP has linked the common scu/lpcg clock driver into its clock drivers. Since i.MX common clk driver will support module build and no longer selected by default, so for i.MX ARMv7 platforms, add clock configuration for each SoC and they are selected by default if the corresponding SoC config is selected. Changes since V3: - merge all i.MX8M SoCs patches together; - add module author/description; - drop __setup_param() change, it is ONLY needed for built-in version, so just add #if check for module build; - link common scu and lpcg clock into i.MX8QXP clock driver, then export is no needed for common scu/lpcg clock driver. Anson Huang (5): clk: composite: Export clk_hw_register_composite() clk: imx: Add clock configuration for ARMv7 platforms clk: imx: Support building i.MX common clock driver as module clk: imx8m: Support module build clk: imx8qxp: Support building i.MX8QXP clock driver as module drivers/clk/clk-composite.c | 1 + drivers/clk/imx/Kconfig | 112 ++++++++++++++++++++++++++++++++++--- drivers/clk/imx/Makefile | 79 +++++++++++++------------- 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 | 4 ++ drivers/clk/imx/clk-imx8mn.c | 4 ++ drivers/clk/imx/clk-imx8mp.c | 4 ++ drivers/clk/imx/clk-imx8mq.c | 4 ++ drivers/clk/imx/clk-imx8qxp-lpcg.c | 10 +++- drivers/clk/imx/clk-imx8qxp.c | 11 +++- drivers/clk/imx/clk-pll14xx.c | 5 ++ drivers/clk/imx/clk-sscg-pll.c | 2 + drivers/clk/imx/clk.c | 22 ++++++-- 16 files changed, 209 insertions(+), 57 deletions(-)