Devicetree
 help / color / mirror / Atom feed
From: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
To: Russell King - ARM Linux <linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: device_tree binding for "amba bus"
Date: Tue, 17 May 2011 21:13:33 -0600	[thread overview]
Message-ID: <BANLkTim9fWLyQgSubcQt9dqZxhfKxK9sHw@mail.gmail.com> (raw)
In-Reply-To: <20110518002317.GE5913-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>

On Tue, May 17, 2011 at 6:23 PM, Russell King - ARM Linux
<linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org> wrote:
> On Tue, May 17, 2011 at 05:05:12PM -0700, Stephen Neuendorffer wrote:
>> In drivers/amba/bus.c:
>>
>> static int amba_get_enable_pclk(struct amba_device *pcdev)
>> {
>>       struct clk *pclk = clk_get(&pcdev->dev, "apb_pclk");
>>
>> static int amba_get_enable_vcore(struct amba_device *pcdev)
>> {
>>       struct regulator *vcore = regulator_get(&pcdev->dev, "vcore");
>>
>> So users of this bus have to have a clock and a regulator with those
>> exact names.
>> Is it your expectation that the clock/regulator names are standardized
>> across arch/arm?
>
> Let's fix one thing here.
>
> The second argument to clk_get is *not* a unique clock name.  It is a
> _connection_ name for the device, to distinguish between different
> clocks on the same device.  It does not identify _any_ particular
> clock on its own.

The draft device tree clock matching code reflects this too.  If an
"apb_pclk-clock" property (which is a phandle to a clock provider) is
provided by the device tree, then the dt clock decode logic will use
it to determine which clock source to use.  The current code is a bit
of an ugly hack, and the exact mechanics may change, but in principle
the device tree support code will continue to follow this model.
apb_pclk is the generic name, but it could be wired to any clock in
the system.

g.

  parent reply	other threads:[~2011-05-18  3:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-17 20:28 device_tree binding for "amba bus" Stephen Neuendorffer
     [not found] ` <f9ae780a-2747-427f-826a-e0b510ca8afb-+Ck8Kgl/v09ZbvUCbuG1mrjjLBE8jN/0@public.gmane.org>
2011-05-17 22:41   ` Russell King - ARM Linux
     [not found]     ` <20110517224134.GC2266-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2011-05-18  0:05       ` Stephen Neuendorffer
     [not found]         ` <64ff6672-0ce3-475b-b1c7-dc18bf2c2658-+Ck8Kgl/v09Eus+KprP3J7jjLBE8jN/0@public.gmane.org>
2011-05-18  0:23           ` Russell King - ARM Linux
     [not found]             ` <20110518002317.GE5913-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2011-05-18  3:13               ` Grant Likely [this message]
2011-05-18  0:24           ` Mark Brown

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=BANLkTim9fWLyQgSubcQt9dqZxhfKxK9sHw@mail.gmail.com \
    --to=grant.likely-s3s/wqlpoipyb63q8fvjnq@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.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