All of lore.kernel.org
 help / color / mirror / Atom feed
From: Haylen Chu <heylenay@4d2.org>
To: Yixun Lan <dlan@gentoo.org>, Inochi Amaoto <inochiama@gmail.com>
Cc: Alex Elder <elder@riscstar.com>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Haylen Chu <heylenay@outlook.com>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Alexandre Ghiti <alex@ghiti.fr>,
	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 <inochiama@outlook.com>,
	Chen Wang <unicornxdotw@foxmail.com>,
	Jisheng Zhang <jszhang@kernel.org>,
	Meng Zhang <zhangmeng.kevin@linux.spacemit.com>
Subject: Re: [PATCH v6 3/6] clk: spacemit: Add clock support for SpacemiT K1 SoC
Date: Thu, 10 Apr 2025 04:07:35 +0000	[thread overview]
Message-ID: <Z_dEB4tfWO9KiErA@ketchup> (raw)
In-Reply-To: <20250410015549-GYA19471@gentoo>

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

WARNING: multiple messages have this Message-ID (diff)
From: Haylen Chu <heylenay@4d2.org>
To: Yixun Lan <dlan@gentoo.org>, Inochi Amaoto <inochiama@gmail.com>
Cc: Alex Elder <elder@riscstar.com>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Haylen Chu <heylenay@outlook.com>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Alexandre Ghiti <alex@ghiti.fr>,
	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 <inochiama@outlook.com>,
	Chen Wang <unicornxdotw@foxmail.com>,
	Jisheng Zhang <jszhang@kernel.org>,
	Meng Zhang <zhangmeng.kevin@linux.spacemit.com>
Subject: Re: [PATCH v6 3/6] clk: spacemit: Add clock support for SpacemiT K1 SoC
Date: Thu, 10 Apr 2025 04:07:35 +0000	[thread overview]
Message-ID: <Z_dEB4tfWO9KiErA@ketchup> (raw)
In-Reply-To: <20250410015549-GYA19471@gentoo>

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

  parent reply	other threads:[~2025-04-10  4:07 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-01 17:24 [PATCH v6 0/6] Add clock controller support for SpacemiT K1 Haylen Chu
2025-04-01 17:24 ` Haylen Chu
2025-04-01 17:24 ` [PATCH v6 1/6] dt-bindings: soc: spacemit: Add spacemit,k1-syscon Haylen Chu
2025-04-01 17:24   ` Haylen Chu
2025-04-08 19:37   ` Alex Elder
2025-04-08 19:37     ` Alex Elder
2025-04-01 17:24 ` [PATCH v6 2/6] dt-bindings: clock: spacemit: Add spacemit,k1-pll Haylen Chu
2025-04-01 17:24   ` Haylen Chu
2025-04-08 19:37   ` Alex Elder
2025-04-08 19:37     ` Alex Elder
2025-04-01 17:24 ` [PATCH v6 3/6] clk: spacemit: Add clock support for SpacemiT K1 SoC Haylen Chu
2025-04-01 17:24   ` Haylen Chu
2025-04-08 19:37   ` Alex Elder
2025-04-08 19:37     ` Alex Elder
2025-04-10  0:37     ` Yixun Lan
2025-04-10  0:37       ` Yixun Lan
2025-04-10  0:54       ` Inochi Amaoto
2025-04-10  0:54         ` Inochi Amaoto
2025-04-10  0:57         ` Inochi Amaoto
2025-04-10  0:57           ` Inochi Amaoto
2025-04-10  1:10           ` Alex Elder
2025-04-10  1:10             ` Alex Elder
2025-04-10  1:20             ` Inochi Amaoto
2025-04-10  1:20               ` Inochi Amaoto
2025-04-10  1:55               ` Yixun Lan
2025-04-10  1:55                 ` Yixun Lan
2025-04-10  3:47                 ` Inochi Amaoto
2025-04-10  3:47                   ` Inochi Amaoto
2025-04-10 12:30                   ` Alex Elder
2025-04-10 12:30                     ` Alex Elder
2025-04-10 12:32                     ` Alex Elder
2025-04-10 12:32                       ` Alex Elder
2025-04-10  4:07                 ` Haylen Chu [this message]
2025-04-10  4:07                   ` Haylen Chu
2025-04-11 17:14                 ` Goko Son
2025-04-11 17:14                   ` Goko Son
2025-04-10  1:16           ` Yixun Lan
2025-04-10  1:16             ` Yixun Lan
2025-04-10  1:35             ` Inochi Amaoto
2025-04-10  1:35               ` Inochi Amaoto
2025-04-10  6:54     ` Haylen Chu
2025-04-10  6:54       ` Haylen Chu
2025-04-10  0:55   ` Yixun Lan
2025-04-10  0:55     ` Yixun Lan
2025-04-10  3:55     ` Haylen Chu
2025-04-10  3:55       ` Haylen Chu
2025-04-01 17:24 ` [PATCH v6 4/6] clk: spacemit: k1: Add TWSI8 bus and function clocks Haylen Chu
2025-04-01 17:24   ` Haylen Chu
2025-04-08 19:37   ` Alex Elder
2025-04-08 19:37     ` Alex Elder
2025-04-10  4:09     ` Haylen Chu
2025-04-10  4:09       ` Haylen Chu
2025-04-01 17:24 ` [PATCH v6 5/6] riscv: dts: spacemit: Add clock tree for SpacemiT K1 Haylen Chu
2025-04-01 17:24   ` Haylen Chu
2025-04-08 19:37   ` Alex Elder
2025-04-08 19:37     ` Alex Elder
2025-04-01 17:24 ` [PATCH v6 6/6] riscv: defconfig: enable clock controller unit support " Haylen Chu
2025-04-01 17:24   ` Haylen Chu
2025-04-08 19:37   ` Alex Elder
2025-04-08 19:37     ` Alex Elder
2025-04-10  4:12     ` Haylen Chu
2025-04-10  4:12       ` Haylen Chu
2025-04-08 19:37 ` [PATCH v6 0/6] Add clock controller " Alex Elder
2025-04-08 19:37   ` Alex Elder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z_dEB4tfWO9KiErA@ketchup \
    --to=heylenay@4d2.org \
    --cc=alex@ghiti.fr \
    --cc=aou@eecs.berkeley.edu \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlan@gentoo.org \
    --cc=elder@riscstar.com \
    --cc=heylenay@outlook.com \
    --cc=inochiama@gmail.com \
    --cc=inochiama@outlook.com \
    --cc=jszhang@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=mturquette@baylibre.com \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=robh@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=spacemit@lists.linux.dev \
    --cc=unicornxdotw@foxmail.com \
    --cc=zhangmeng.kevin@linux.spacemit.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.