From: grant.likely@secretlab.ca (Grant Likely)
To: linux-arm-kernel@lists.infradead.org
Subject: 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@n2100.arm.linux.org.uk>
On Tue, May 17, 2011 at 6:23 PM, Russell King - ARM Linux
<linux@arm.linux.org.uk> 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.
next prev 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
2011-05-17 22:41 ` Russell King - ARM Linux
2011-05-18 0:05 ` Stephen Neuendorffer
2011-05-18 0:23 ` Russell King - ARM Linux
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@secretlab.ca \
--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).