linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Maxime Ripard <maxime@cerno.tech>
To: Priit Laes <plaes@plaes.org>
Cc: Chen-Yu Tsai <wens@csie.org>, Rob Herring <robh+dt@kernel.org>,
	linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	linux-sunxi@googlegroups.com
Subject: Re: [PATCH 1/4] clk: sunxi-ng: a10/a20: rewrite init code to a platform driver
Date: Thu, 30 Apr 2020 17:05:34 +0200	[thread overview]
Message-ID: <20200430150534.kbzfb7utpc7kswlv@gilmour.lan> (raw)
In-Reply-To: <20200430062137.GA32281@plaes.org>

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

On Thu, Apr 30, 2020 at 06:21:37AM +0000, Priit Laes wrote:
> On Wed, Apr 29, 2020 at 04:35:10PM +0200, Maxime Ripard wrote:
> > On Mon, Apr 20, 2020 at 08:32:28PM +0000, Priit Laes wrote:
> > > On Mon, Apr 20, 2020 at 02:49:35PM +0200, Maxime Ripard wrote:
> > > > On Sat, Apr 18, 2020 at 01:17:27AM +0300, Priit Laes wrote:
> > > > > In order to register regmap for sun7i CCU, there needs to be
> > > > > a device structure already bound to the CCU device node.
> > > > > 
> > > > > Convert the sun4i/sun7i CCU setup to platform driver to use
> > > > > it later as platform device.
> > > > > 
> > > > > Signed-off-by: Priit Laes <plaes@plaes.org>
> > > > 
> > > > You can't relly do that though. We have timers that need those clocks before the
> > > > device model is initialized.
> > > 
> > > Ok, I'm somewhat lost now... are these the affected timers on sun7i following:
> > > - allwinner,sun4i-a10-timer (timer@1c20c00)
> > > - allwinner,sun7i-a20-hstimer (hstimer@1c60000)
> > 
> > Yep
> > 
> > > Any ideas on what approach I could actually use?
> > 
> > I guess you could keep the CLK_OF_DECLARE registration, and then have a
> > platform_driver probe and register the regmap?
> > 
> 
> Thanks this did the trick.
> 
> > > Also, similar timer dependency would affect then sun6i-a31 and sun9i-a80
> > > platforms too...
> 
> I didn't check this before, but sun9i-a80 CCU is initialized currently via
> platform device. Should it be converted first to clock driver (CLK_OF_DECLARE)?

I guess we could just remove the timer node on the A80. It has never been tested
and never worked if the clock driver is probed through a platform device.

Maxime

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

  reply	other threads:[~2020-04-30 15:05 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-17 22:17 [PATCH 0/4] ARM: sun7i: Convert A20 GMAC driver to CCU Priit Laes
2020-04-17 22:17 ` [PATCH 1/4] clk: sunxi-ng: a10/a20: rewrite init code to a platform driver Priit Laes
2020-04-20 12:49   ` Maxime Ripard
2020-04-20 20:32     ` Priit Laes
2020-04-29 14:35       ` Maxime Ripard
2020-04-30  6:21         ` Priit Laes
2020-04-30 15:05           ` Maxime Ripard [this message]
2020-04-17 22:17 ` [PATCH 2/4] clk: sunxi-ng: a20: export a regmap to access the GMAC register Priit Laes
2020-04-20 12:50   ` Maxime Ripard
2020-04-17 22:17 ` [PATCH 3/4] net: stmmac: dwmac-sunxi: Implement syscon-based clock handling Priit Laes
2020-04-20 12:58   ` Maxime Ripard
2020-04-17 22:17 ` [PATCH 4/4] ARM: dts: sun7i: Use syscon-based implementation for gmac Priit Laes
2020-04-20 12:59   ` Maxime Ripard
2020-04-20 13:23     ` Priit Laes
2020-04-20 12:32 ` [PATCH 0/4] ARM: sun7i: Convert A20 GMAC driver to CCU Priit Laes

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=20200430150534.kbzfb7utpc7kswlv@gilmour.lan \
    --to=maxime@cerno.tech \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sunxi@googlegroups.com \
    --cc=plaes@plaes.org \
    --cc=robh+dt@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).