From patchwork Tue Jul 7 05:09:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anson Huang X-Patchwork-Id: 11647627 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 3D054739 for ; Tue, 7 Jul 2020 05:14:42 +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 1531820738 for ; Tue, 7 Jul 2020 05:14:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="bISgrFy0" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1531820738 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=8vNcnNuWln5Zm2kGLnPVcXoT6pv01PCPvPMfcqE87Cc=; b=bISgrFy0HDCIP3+kqvJEO8ebU6 3K/awlcgjIB4TIp5YAsBuMqLEjzHnGZOGtGqp57Kql7+Insi4jzYpEdkCZWH5ylaphiuVJwf93rvO pvIdG5kbuSmw4wdyxAJkbBx55AUsttjz7n53ijwYJE9oHwkuA4hWNWi3RX/k+EtO6ZSP6Gkravlrx jSlWScbaoFb/OggYMsv/ADaYQBozgQXk/uYk3/JgmS2Ji7zyR4bwkxFkRBzNptRHNnp1ZtZLVrr+X Fkdt3hFX38H5fKvS+wwWHtTXs4sXv75l1bCiurmbcIqRBWmf3JHyCyYWKw+d3hz5G79tMo2fWr70f lQHElNtg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jsful-0003y9-It; Tue, 07 Jul 2020 05:13:07 +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 1jsfuj-0003xQ-E6 for linux-arm-kernel@lists.infradead.org; Tue, 07 Jul 2020 05:13:06 +0000 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id D6D47200848; Tue, 7 Jul 2020 07:13:01 +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 677CC200842; Tue, 7 Jul 2020 07:12:52 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id A3133402A8; Tue, 7 Jul 2020 13:12:40 +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, aisheng.dong@nxp.com, abel.vesa@nxp.com, peng.fan@nxp.com, sfr@canb.auug.org.au, j.remmet@phytec.de, georg.waibel@wiedemann-group.de, Georg.Waibel@wiedemann-group.com, laurent.pinchart@ideasonboard.com, chen.fang@nxp.com, fugang.duan@nxp.com, daniel.baluta@nxp.com, yuehaibing@huawei.com, andrew.smirnov@gmail.com, horia.geanta@nxp.com, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH V6 0/6] Support building i.MX ARMv8 platforms clock driver as module Date: Tue, 7 Jul 2020 13:09:33 +0800 Message-Id: <1594098579-25050-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-20200707_011305_578960_16F1FEEC X-CRM114-Status: GOOD ( 10.75 ) 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.MX ARMv8 SoCs clock drivers as modules, The CLK_IMXxxx is introduced for i.MX ARMv7 platforms in order to make the build options aligned, the reason why i.MX ARMv7 platforms clock driver do NOT support module build and COMPILE_TEST is because, some drivers like i.MX GPT timer driver depends on clock driver to be ready before it, GPT driver uses TIMER_OF_DECLARE(), while i.MX6/7 clock drivers use CLK_OF_DECLARE(), and GPT driver is critical for i.MX6/7 platforms kernel boot up, so GPT driver needs to be changed to support loadable clock driver first, then the i.MX6/7 clock drivers can support loadable module, this will be done later. Changes since V5: - make i.MX ARMv7 platforms clock driver to bool and NOT support COMPILT_TEST, since they depends on ARCH_MXC or SOC config, which makes the COMPILT_TEST NOT make enough sense, so just skip the COMPILT_TEST support for i.MX ARMv7 platform clock drivers, leave them same as original implementation. - add a patch to fix build warning reported by kernel robot test on i.MX6SL clock driver. Anson Huang (6): clk: composite: Export clk_hw_register_composite() clk: imx: Support building i.MX common clock driver as module clk: imx: Add clock configuration for ARMv7 platforms clk: imx8m: Support module build clk: imx8qxp: Support building i.MX8QXP clock driver as module clk: imx6sl: Fix build warning reported by kernel test robot drivers/clk/clk-composite.c | 1 + drivers/clk/imx/Kconfig | 94 ++++++++++++++++++++++++++++++++------ 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-imx6sl.c | 15 +++--- 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 | 4 ++ drivers/clk/imx/clk-imx8qxp.c | 4 ++ drivers/clk/imx/clk-pll14xx.c | 5 ++ drivers/clk/imx/clk-sscg-pll.c | 2 + drivers/clk/imx/clk.c | 17 +++++-- drivers/clk/imx/clk.h | 6 +++ 18 files changed, 186 insertions(+), 65 deletions(-)