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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F3069C369A2 for ; Thu, 10 Apr 2025 04:07:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=5m13KUmvZ+lQJ4nk/IfrFn8Phse1Z6pDPnQaTdpwTcc=; b=o8oKKQIp9M2ebD kndcCTJE8J+bU/KJKBECBDtyg0gwu49G3xqQr0+Jiat5w5yCza8Bb7c0ubwhBgfAJMudr6llK3KBD 8y8HEh+hPZWqDtfO5txr+U389boD/cH6A52n2BDrXanj3OG05mjSFDZ+3p7tF5+/pcaycR4jwirOL asaeMPVpttCkIVRsHytisjRqV6QNfEwGosWsTyhGkDV3eaFnG/QP9MlD4UA22iAmeTWfEm2OmsQBd T8jMWJgee/ljzmLNdZmfQGvOgpaI/Pliq0xR6YRYjcjRVUX5hjFqstST+7onLDzwm6ITtaT6lqWph oSzvx+yQyEF3KSQKMi/w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1u2jCf-00000009Atg-3AB6; Thu, 10 Apr 2025 04:07:49 +0000 Received: from bayard.4d2.org ([155.254.16.17]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1u2jCc-00000009AtD-2wzP for linux-riscv@lists.infradead.org; Thu, 10 Apr 2025 04:07:48 +0000 Received: from bayard.4d2.org (bayard.4d2.org [127.0.0.1]) by bayard.4d2.org (Postfix) with ESMTP id 99EB112FB451; Wed, 09 Apr 2025 21:07:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=4d2.org; s=mail; t=1744258065; bh=6X8CIRzu/7C0i9tpkQQDyN8gtCt7xELDMOU+oJyN9yA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ODE8xmaZpaM2vx6KXzglfkYZGQRpncMebes4iBfHIZ1+NKkbesT1cbYtSEgfSc0mb IAS7beaF22YkL1GlWX1DgEil7138L1fhsZe/2nJC1+p1KCrMp5/5ArIbo0UhZbsdOX 8M6BNtRJ8uE1djCeQLJF5KPngnoMHABCzl2UzR9XrlxKnilPbdVOEHcfD2L6yHb1h9 2NCXGgi4TH9ABBPURtS+vBvJPLBYlEHJ8kZUb8wHwdGIMfdmCQGXfCNfGqGAcNj/GA YzSiR3r1TZrOGCxvsNCEDkvDgMsuQyUOhF+LN3iVxh4ZFQCgzOtCy4e0tVEsIyQOIW PXmqqg9GbhutQ== X-Virus-Scanned: amavisd-new at 4d2.org Received: from bayard.4d2.org ([127.0.0.1]) by bayard.4d2.org (bayard.4d2.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jfdSQCvaCpS6; Wed, 9 Apr 2025 21:07:43 -0700 (PDT) Received: from ketchup (unknown [183.217.80.181]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) (Authenticated sender: heylenay@4d2.org) by bayard.4d2.org (Postfix) with ESMTPSA id 7D41112FB430; Wed, 09 Apr 2025 21:07:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=4d2.org; s=mail; t=1744258063; bh=6X8CIRzu/7C0i9tpkQQDyN8gtCt7xELDMOU+oJyN9yA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=IT1yWtxBWJHexa920HMgFACR6jjj/Rfv9SnqyVrWjx4HCeEg9SeC0plLOjUmWrxXs 1CgJRdqM7Icyj+s5A/Wd+rYX/6NPrRyqRHY96aez2BrpUZfOCshuYR0sUSWUs1srXg yKgUw148SUaNi/IPnangfzT4ml21TYXWA1a1oJTcLCmacP6xIlriRECZN9oI6dyZaM heSSOm1Cfr3N2usxnrFFZuIfaOn6iq69QdvCVbD8e2CnPdtIwcqgPo2DarmiA14FUx 8qzhtlc48s+xNxLC5Yx4q8tBYziW53OnEN9IBXCtidId+N6YeZDIelp1I5SCNImWlB sS06RCtmkI7og== Date: Thu, 10 Apr 2025 04:07:35 +0000 From: Haylen Chu To: Yixun Lan , Inochi Amaoto Cc: Alex Elder , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Haylen Chu , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , linux-riscv@lists.infradead.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, spacemit@lists.linux.dev, Inochi Amaoto , Chen Wang , Jisheng Zhang , Meng Zhang Subject: Re: [PATCH v6 3/6] clk: spacemit: Add clock support for SpacemiT K1 SoC Message-ID: References: <20250401172434.6774-1-heylenay@4d2.org> <20250401172434.6774-4-heylenay@4d2.org> <8fe0aaaa-b8e9-45dd-b792-c32be49cca1a@riscstar.com> <20250410003756-GYA19359@gentoo> <20250410015549-GYA19471@gentoo> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20250410015549-GYA19471@gentoo> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250409_210746_801545_D4D0CA4C X-CRM114-Status: GOOD ( 37.29 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On Thu, Apr 10, 2025 at 01:55:49AM +0000, Yixun Lan wrote: > Hi Inochi, > > On 09:20 Thu 10 Apr , Inochi Amaoto wrote: > > On Wed, Apr 09, 2025 at 08:10:53PM -0500, Alex Elder wrote: > > > On 4/9/25 7:57 PM, Inochi Amaoto wrote: > > > > > > > > diff --git a/drivers/clk/spacemit/Kconfig b/drivers/clk/spacemit/Kconfig > > > > > > > > new file mode 100644 > > > > > > > > index 000000000000..4c4df845b3cb > > > > > > > > --- /dev/null > > > > > > > > +++ b/drivers/clk/spacemit/Kconfig > > > > > > > > @@ -0,0 +1,18 @@ > > > > > > > > +# SPDX-License-Identifier: GPL-2.0-only > > > > > > > > + > > > > > > > > +config SPACEMIT_CCU > > > > > > > > + tristate "Clock support for SpacemiT SoCs" > > > > > > > I don't know the answer to this, but... Should this be a Boolean > > > > > > > rather than tristate? Can a SpacemiT K1 SoC function without the > > > > > > > clock driver built in to the kernel? > > > > > > > > > > > > > I agree to make it a Boolean, we've already made pinctrl driver Boolean > > > > > > and pinctrl depend on clk, besides, the SoC is unlikely functional > > > > > > without clock built in as it's such critical.. > > > > > > > > > > > I disagree. The kernel is only for spacemit only, and the pinctrl > > > > Sorry for a mistake, this first "only" should be "not". > > > > > > This is a general problem. You can't make a bootable > > > SpacemiT kernel unless you define this as built-in (at > > > least, that's what Yixun is saying). > > > > Why not putting the module in the initramfs? I have tested > > this in quite a lot of boards (Allwinner, rockchip, sophgo, > > starfive and etc.), all of them work well. This is also my original consideration. > it works, but not optimal, why delay clk initialzation at modules load stage? > IMO, it brings more overhead for using initramfs.. For distribution maintainers and users, keeping stuff buildable as modules shrinks the sizeof kernel image, which I'd like to see. Thus I won't make the entry boolean. > but there is always tradeoff and bikeshedding.. > > > > But we'd really rather *only* build it in to the kernel > > > for SpacemiT builds. You clearly want to minimize what > > > must be built in, but what if this is indeed required? > > > What goes in defconfig? > > > > > > > As defconfig is more like for a minimum example system. It > > is OK to put a y in the defconfig. But for a custom system, > > you do give a choice for the builder to remove your module > > in non spacemit system. > > I get your meaning here to remove/disable at run time stage, while > we do provide compile time option, if don't want spacemit system > just disable CONFIG_ARCH_SPACEMIT I mentioned, clk/pinctrl will be gone > > anyway, I'm open for this, make it tristate do provide more choices, > and it's probably better leave users to decide.. > > Ok, I'm fine with leave clk as tristate with proper default deconfig, > but if people want to pursue more to make more driver(pinctrl) modulized > feel free to test and send patches, I just won't put efforts myself. > > thanks > > -- > Yixun Lan (dlan) > Gentoo Linux Developer > GPG Key ID AABEFD55 Thanks, Haylen Chu _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv