From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DC61EC433E0 for ; Wed, 24 Jun 2020 00:59:55 +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 A7B9E20C09 for ; Wed, 24 Jun 2020 00:59:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="YA2GLcZq"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="Ex/rw0Q2" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A7B9E20C09 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.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:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-ID:Date:To:From:Subject:References: In-Reply-To:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=fedCLFM8THAcXWuZjzJEPheQ3tl4rw1faTp/GNdvbvk=; b=YA2GLcZqi+C2N1Q4lzzv5lbM6 idjcxLKl6xMlJN9jHo61Iqe3x0WdXtODuRiWzR5LimCypp6SHN4FuLWalh2XaK/G4pX2oi5mG9Dhl 69uI+8YIIselZCIHchy41eyj8y07UUGy8h5BZGPRdr/JrBZz6giseqdnPb3sut1Vw+s0vIkrzO7Ti i8T3rkpA4tO2Ot+DPZnjMl16/6PPwjovjURb/6Ri5WLqXjEW2OJhYQx4y0CXJoP8ZhzlgM3wt5iuS EZCW0oTXE0lwpn1ZYgj++/8Sllelh+jAb9fnQHsOh63i4JgLwGhQI5NXDmtYt2+HQvpcIlje9Hr5E QyE/QHCjQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jntjf-0001x8-He; Wed, 24 Jun 2020 00:57:55 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jntjd-0001wC-0Q for linux-arm-kernel@lists.infradead.org; Wed, 24 Jun 2020 00:57:53 +0000 Received: from kernel.org (unknown [104.132.0.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 02FFD20C09; Wed, 24 Jun 2020 00:57:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592960272; bh=AIcBjg5EduAc2hzc+ZZu4+NrFWBrKK0dKtZ4TiZI8hk=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=Ex/rw0Q2yGMJJ5Y1Mb0WjrwmRbTpPIUqWA18wpXyjDd1XLi9vRJJ1RXY662WE/6se VajoedT+VunLFcfmjeGvY5QuUCQiV9JcIeXOpfOhXeM4ha4A8ZedfIoP8Hf/vp2ZWI 96rwsceBn9b6QQuXvSTxtwM5blaJD4NO4J6mEQUA= MIME-Version: 1.0 In-Reply-To: References: <1591687933-19495-1-git-send-email-Anson.Huang@nxp.com> <1591687933-19495-4-git-send-email-Anson.Huang@nxp.com> <159262367025.62212.11651547971712516448@swboyd.mtv.corp.google.com> <159290125202.62212.13172213909023205615@swboyd.mtv.corp.google.com> Subject: RE: [PATCH V2 3/9] clk: imx: Support building SCU clock driver as module From: Stephen Boyd To: Abel Vesa , Aisheng Dong , Andy Duan , Anson Huang , Daniel Baluta , Leonard Crestez , Peng Fan , Stefan Agner , allison@lohutok.net, arnd@arndb.de, festevam@gmail.com, gregkh@linuxfoundation.org, info@metux.net, kernel@pengutronix.de, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux@armlinux.org.uk, mturquette@baylibre.com, oleksandr.suvorov@toradex.com, s.hauer@pengutronix.de, sfr@canb.auug.org.au, shawnguo@kernel.org, tglx@linutronix.de, yuehaibing@huawei.com Date: Tue, 23 Jun 2020 17:57:51 -0700 Message-ID: <159296027133.62212.18074403520585879907@swboyd.mtv.corp.google.com> User-Agent: alot/0.9 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: dl-linux-imx Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Quoting Aisheng Dong (2020-06-23 02:00:47) > > From: Stephen Boyd > > Sent: Tuesday, June 23, 2020 4:34 PM > > Subject: RE: [PATCH V2 3/9] clk: imx: Support building SCU clock driver as > > module > > > > Quoting Aisheng Dong (2020-06-22 20:42:19) > > > > From: Stephen Boyd > > > > Sent: Saturday, June 20, 2020 11:28 AM > > > > Subject: RE: [PATCH V2 3/9] clk: imx: Support building SCU clock > > > > driver as module > > > > > > > > Quoting Aisheng Dong (2020-06-17 18:58:51) > > > > > > From: Anson Huang > > > > > > > > +obj-$(CONFIG_MXC_CLK_SCU) += mxc-clk-scu.o > > > > > > > > > > > > > > Like i.MX pinctrl, I'm not sure if it's really necessary to > > > > > > > build core libraries as modules. Probably the simplest way is > > > > > > > only building platform drivers part as module. And leave those > > > > > > > core libraries > > > > built in kernel. > > > > > > > This may make the code a bit cleaner. > > > > > > > > > > > > > > > > > > > Will discuss this with Linaro guys about it, previous > > > > > > requirement I received is all SoC specific modules need to be built as > > module. > > > > > > > > > > > > > > > > Okay. AFAIK it's not conflict. > > > > > You still make drivers into modules. > > > > > Only difference is for those common libraries part, we don't > > > > > convert them into module Which is less meaningless. > > > > > > > > > > > > > What is the benefit of making the core part of the SoC driver not a module? > > > > > > Usually we could try to build it as module if it's not hard. > > > > > > One question is sometimes those core part are shared with some platforms > > which can't built as module. > > > For i.MX case, it's mainly patch 4: > > > [V2,4/9] clk: imx: Support building i.MX common clock driver as module > > > > > > > > > Those libraries are also used by i.MX6&7 which can't build as module. > > > So we need an extra workaround patch to forcely 'select' it under > > > arch/arm/mach-imx/Kconfig [V2,2/9] ARM: imx: Select MXC_CLK for > > > ARCH_MXC > > > Then the users can't configure it as module in order to not break build. > > > > > > If build-in those common libraries, the implementation could be a bit easier > > and cleaner. > > > So I'm not sure if we still have to build them as module. > > > How would you suggest for such case? > > > > Stop using 'select MXC_CLK' when requiring the core library code? > > Instead, make it a 'depends' and then that will make depending modules (i.e. the > > SoC files) that want to be builtin force the core module to be builtin too. Other > > modular configs that depend on the core will still be modular. > > > > It seems not work. > Patch 4 already changes it to depend on ARCH_MXC which can only be 'Y'. > [V2,4/9] clk: imx: Support building i.MX common clock driver as module > diff --git a/drivers/clk/imx/Kconfig b/drivers/clk/imx/Kconfig > index ded0643..678113b 100644 > --- a/drivers/clk/imx/Kconfig > +++ b/drivers/clk/imx/Kconfig > @@ -1,8 +1,8 @@ > # SPDX-License-Identifier: GPL-2.0 > # common clock support for NXP i.MX SoC family. > config MXC_CLK > - bool > - def_bool ARCH_MXC > + tristate "IMX clock" > + depends on ARCH_MXC > > But user can still set MXC_CLK to be m, either via make menuconfig or defconfig. Isn't that what we want? Why does ARCH_MXC being enabled mandate that it is builtin? Is some architecture level code calling into the clk driver? _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel