public inbox for linux-clk@vger.kernel.org
 help / color / mirror / Atom feed
From: Andreas Kemnade <andreas@kemnade.info>
To: "Russell King (Oracle)" <linux@armlinux.org.uk>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
	linux-omap@vger.kernel.org, linux-clk@vger.kernel.org,
	Paul Walmsley <paul@pwsan.com>, Tony Lindgren <tony@atomide.com>
Subject: Re: clk mess on omap4460 with mpu clock
Date: Wed, 25 Sep 2024 10:06:03 +0200	[thread overview]
Message-ID: <20240925100603.4cba9176@akair> (raw)
In-Reply-To: <ZvLufU15ZJ4CKuuv@shell.armlinux.org.uk>

Am Tue, 24 Sep 2024 17:53:17 +0100
schrieb "Russell King (Oracle)" <linux@armlinux.org.uk>:

> On Mon, Sep 23, 2024 at 02:04:47PM +0200, Andreas Kemnade wrote:
> > So the way forward is to check whether that registration is really
> > needed at:
> > https://elixir.bootlin.com/linux/v6.11/source/drivers/bus/ti-sysc.c#L2380
> > If yes, then
> > a) increade the size of the name in the clk subsystem or
> > b) workaround like
> > https://elixir.bootlin.com/linux/v6.11/source/drivers/bus/ti-sysc.c#L353
> >  
> 
> I'll also mention that if one is using DT, then the clkdev tables
> should not be relevant - the lookups of clocks should be done by
> parsing the clocks property in the description of the device.
> 
I played around to ensure I know really what I am doing and what I am
messing around with:
we have in i2c-omap.c:
      
fclk = clk_get(omap->dev, "fck");
just for getting the module clock rate to configure i2c accordingly
That only works if
https://elixir.bootlin.com/linux/v6.11/source/drivers/bus/ti-sysc.c#L2380

is working. Here some clk_get(omap->dev->parent, ...) would also just
work without said line in ti-sysc.c because then dt lookup kicks in.

In the omap3 case, there are several devices using the older hwmod
mechanism and are not converted to ti-sysc yet. Then the clock gets
registered here:
https://elixir.bootlin.com/linux/v6.11/source/arch/arm/mach-omap2/omap_device.c#L116

In the case, a clk_get(omap->dev->parent, ...) in e.g. i2c-omap.c would
fail. No dt lookup can kick in.

The background of this is to ensure to keep soc-specific pm out of the
drivers and do it in a common place.

Regards,
Andreas

      reply	other threads:[~2024-09-25  8:06 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-03 21:41 clk mess on omap4460 with mpu clock Andreas Kemnade
2024-09-02 13:53 ` Geert Uytterhoeven
2024-09-03 12:33   ` Andreas Kemnade
2024-09-03 12:36     ` Geert Uytterhoeven
2024-09-03 13:09       ` H. Nikolaus Schaller
2024-09-03 14:00         ` [Letux-kernel] " H. Nikolaus Schaller
2024-09-04  7:23           ` H. Nikolaus Schaller
2024-09-03 17:22       ` Andreas Kemnade
2024-09-03 18:10         ` Russell King (Oracle)
2024-09-23 12:04           ` Andreas Kemnade
2024-09-24 16:52             ` Russell King (Oracle)
2024-09-25  8:57               ` Andreas Kemnade
2024-09-24 16:53             ` Russell King (Oracle)
2024-09-25  8:06               ` Andreas Kemnade [this message]

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=20240925100603.4cba9176@akair \
    --to=andreas@kemnade.info \
    --cc=geert@linux-m68k.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=paul@pwsan.com \
    --cc=tony@atomide.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox