All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maxime Ripard <maxime@cerno.tech>
To: Samuel Holland <samuel@sholland.org>
Cc: Chen-Yu Tsai <wens@csie.org>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>,
	linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org,
	linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 7/8] clk: sunxi-ng: Convert early providers to platform drivers
Date: Fri, 3 Sep 2021 11:19:09 +0200	[thread overview]
Message-ID: <20210903091909.dbibqmw5dx3l5xzu@gilmour> (raw)
In-Reply-To: <20210901050526.45673-8-samuel@sholland.org>

[-- Attachment #1: Type: text/plain, Size: 1351 bytes --]

Hi,

On Wed, Sep 01, 2021 at 12:05:25AM -0500, Samuel Holland wrote:
> The PRCM CCU drivers depend on clocks provided by other CCU drivers. For
> example, the sun8i-r-ccu driver uses the "pll-periph" clock provided by
> the SoC's main CCU.
> 
> However, sun8i-r-ccu is an early OF clock provider, and many of the
> main CCUs (e.g. sun50i-a64-ccu) use platform drivers. This means that
> the consumer clocks will be orphaned until the supplier driver is bound.
> This can be avoided by converting the remaining CCUs to use platform
> drivers. Then fw_devlink will ensure the drivers are bound in the
> optimal order.
> 
> The sun5i CCU is the only one which actually needs to be an early clock
> provider, because it provides the clock for the system timer. That one
> is left alone.
> 
> Signed-off-by: Samuel Holland <samuel@sholland.org>

The patch looks great to me, thanks for doing this work

I'm surprised you were able to convert the A10 and F1C100S as well,
since they don't have the arch timer.

It seems we only use the fixed 24MHz clock on the A10 for the timer and
the interrupt controller doesn't have a parent clock, so it works. The
A10 timer can be fed with one PLL though and would require that
dependency, but I guess no one ever cared. It's easy enough to revert if
someone complains anyway.

Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Maxime Ripard <maxime@cerno.tech>
To: Samuel Holland <samuel@sholland.org>
Cc: Chen-Yu Tsai <wens@csie.org>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>,
	linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org,
	linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 7/8] clk: sunxi-ng: Convert early providers to platform drivers
Date: Fri, 3 Sep 2021 11:19:09 +0200	[thread overview]
Message-ID: <20210903091909.dbibqmw5dx3l5xzu@gilmour> (raw)
In-Reply-To: <20210901050526.45673-8-samuel@sholland.org>


[-- Attachment #1.1: Type: text/plain, Size: 1351 bytes --]

Hi,

On Wed, Sep 01, 2021 at 12:05:25AM -0500, Samuel Holland wrote:
> The PRCM CCU drivers depend on clocks provided by other CCU drivers. For
> example, the sun8i-r-ccu driver uses the "pll-periph" clock provided by
> the SoC's main CCU.
> 
> However, sun8i-r-ccu is an early OF clock provider, and many of the
> main CCUs (e.g. sun50i-a64-ccu) use platform drivers. This means that
> the consumer clocks will be orphaned until the supplier driver is bound.
> This can be avoided by converting the remaining CCUs to use platform
> drivers. Then fw_devlink will ensure the drivers are bound in the
> optimal order.
> 
> The sun5i CCU is the only one which actually needs to be an early clock
> provider, because it provides the clock for the system timer. That one
> is left alone.
> 
> Signed-off-by: Samuel Holland <samuel@sholland.org>

The patch looks great to me, thanks for doing this work

I'm surprised you were able to convert the A10 and F1C100S as well,
since they don't have the arch timer.

It seems we only use the fixed 24MHz clock on the A10 for the timer and
the interrupt controller doesn't have a parent clock, so it works. The
A10 timer can be fed with one PLL though and would require that
dependency, but I guess no one ever cared. It's easy enough to revert if
someone complains anyway.

Maxime

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2021-09-03  9:19 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-01  5:05 [PATCH 0/8] clk: sunxi-ng: Lifetime fixes and module support Samuel Holland
2021-09-01  5:05 ` Samuel Holland
2021-09-01  5:05 ` [PATCH 1/8] clk: sunxi-ng: Unregister clocks/resets when unbinding Samuel Holland
2021-09-01  5:05   ` Samuel Holland
2021-09-01  5:05 ` [PATCH 2/8] clk: sunxi-ng: Prevent unbinding CCUs via sysfs Samuel Holland
2021-09-01  5:05   ` Samuel Holland
2021-09-01  5:05 ` [PATCH 3/8] clk: sunxi-ng: Use a separate lock for each CCU instance Samuel Holland
2021-09-01  5:05   ` Samuel Holland
2021-09-03  9:09   ` Maxime Ripard
2021-09-03  9:09     ` Maxime Ripard
2021-09-01  5:05 ` [PATCH 4/8] clk: sunxi-ng: Rename files to match Kconfig and drivers Samuel Holland
2021-09-01  5:05   ` Samuel Holland
2021-09-03  9:10   ` Maxime Ripard
2021-09-03  9:10     ` Maxime Ripard
2021-09-03 20:57     ` Samuel Holland
2021-09-03 20:57       ` Samuel Holland
2021-09-05 20:51       ` Stephen Boyd
2021-09-05 20:51         ` Stephen Boyd
2021-09-07 17:43       ` Maxime Ripard
2021-09-07 17:43         ` Maxime Ripard
2021-09-01  5:05 ` [PATCH 5/8] clk: sunxi-ng: Export symbols used by CCU drivers Samuel Holland
2021-09-01  5:05   ` Samuel Holland
2021-09-01 13:54   ` Chen-Yu Tsai
2021-09-01 13:54     ` Chen-Yu Tsai
2021-09-01 13:54     ` Chen-Yu Tsai
2021-09-01  5:05 ` [PATCH 6/8] clk: sunxi-ng: Allow drivers to be built as modules Samuel Holland
2021-09-01  5:05   ` Samuel Holland
2021-09-01  5:05 ` [PATCH 7/8] clk: sunxi-ng: Convert early providers to platform drivers Samuel Holland
2021-09-01  5:05   ` Samuel Holland
2021-09-03  9:19   ` Maxime Ripard [this message]
2021-09-03  9:19     ` Maxime Ripard
2021-09-01  5:05 ` [PATCH 8/8] clk: sunxi-ng: Allow the CCU core to be built as a module Samuel Holland
2021-09-01  5:05   ` Samuel Holland

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=20210903091909.dbibqmw5dx3l5xzu@gilmour \
    --to=maxime@cerno.tech \
    --cc=jernej.skrabec@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=mturquette@baylibre.com \
    --cc=samuel@sholland.org \
    --cc=sboyd@kernel.org \
    --cc=wens@csie.org \
    /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.