linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: omap_device: query on "fck" clk alias created
Date: Thu, 2 Aug 2012 14:12:50 +0100	[thread overview]
Message-ID: <20120802131250.GO7405@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <79CD15C6BA57404B839C016229A409A83EA7DF5C@DBDE01.ent.ti.com>

On Thu, Aug 02, 2012 at 01:04:37PM +0000, Hiremath, Vaibhav wrote:
> On Wed, Aug 01, 2012 at 19:44:14, Russell King - ARM Linux wrote:
> > On Wed, Aug 01, 2012 at 05:50:16PM +0530, Vaibhav Hiremath wrote:
> > > The clk_get() api will not work, unless we pass both the arguments (dev,
> > > con_id) properly. Now expecting driver to always label con_id with "fck"
> > > is undesirable, as the same driver can be reused on multiple platforms,
> > > which can be non-omap and/or non-ti platforms.
> > 
> > Why not?
> > 
> > The connection ID is defined by the driver, and the platform stuff is
> > expected to provide drivers with what they require.  It's not the other
> > way around (platforms don't tell drivers what they require.)
> > 
> > In other words, if the device has two clocks, one called ick and one called
> > fck, then the device _should_ use clk_get() specifying "ick" for one, and
> > "fck" for the other.
> > 
> > And platforms better provide an "ick" and a "fck" for the device, even if
> > they have no respresentation for one or other of them (in which case you
> > supply a dummy clock.)
> > 
> 
> Russell, I completely agree with you, infact I am on the same page.
> Let me give you a real example, which I am dealing with now,
> 
> On AM335x device we have integrated DCAN, this IP is not from TI.
> IP is from Bosch and doesn't follow any of the TI IP standards, like 
> HighLander spec. The IP is just integrated with interconnect bus and given a 
> required clocksource (in this case its one clock). 
> 
> The driver for this IP is generic, (drivers/net/can/c_can/c_can_platform.c) 
> obviously used across non-ti devices already and driver is implemented with,
>     clk_get(dev, NULL);

So, elsewhere it only has one clock.  Are there any other clocks it needs
on OMAP?

If the answer is no, then the driver is doing the right thing, and OMAP's
clk stuff needs to be adjusted to suit the drivers requirements.

I've said many times over the years that clock connection IDs are defined
by the device or driver and *nothing* else - they're certainly *not* source
names.

That's why, when I modified OMAP drivers to fix them, and they take an
interface and function clock, they end up asking for "ick" and "fck" not
"blah_ick" and "blah_fck".

  reply	other threads:[~2012-08-02 13:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-01 12:20 omap_device: query on "fck" clk alias created Vaibhav Hiremath
2012-08-01 13:42 ` Benoit Cousson
2012-08-02 12:55   ` Hiremath, Vaibhav
2012-08-02 13:09     ` Russell King - ARM Linux
2012-08-01 14:14 ` Russell King - ARM Linux
2012-08-02 13:04   ` Hiremath, Vaibhav
2012-08-02 13:12     ` Russell King - ARM Linux [this message]
2012-08-03  6:26       ` Hiremath, Vaibhav

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=20120802131250.GO7405@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=linux-arm-kernel@lists.infradead.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).