From: mark.langsdorf@calxeda.com (Mark Langsdorf)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/6 v2] arm: use devicetree to get smp_twd clock
Date: Mon, 05 Nov 2012 16:49:09 -0600 [thread overview]
Message-ID: <50984265.9010804@calxeda.com> (raw)
In-Reply-To: <20121105223155.GJ28327@n2100.arm.linux.org.uk>
On 11/05/2012 04:31 PM, Russell King - ARM Linux wrote:
> On Mon, Nov 05, 2012 at 04:28:05PM -0600, Mark Langsdorf wrote:
>> On 11/04/2012 04:08 AM, Russell King - ARM Linux wrote:
>>> On Fri, Nov 02, 2012 at 01:51:44PM -0500, Mark Langsdorf wrote:
>>>> -static struct clk *twd_get_clock(void)
>>>> +static struct clk *twd_get_clock(struct device_node *np)
>>>> {
>>>> - struct clk *clk;
>>>> + struct clk *clk = NULL;
>>>> int err;
>>>>
>>>> - clk = clk_get_sys("smp_twd", NULL);
>>>> + if (np)
>>>> + clk = of_clk_get(np, 0);
>>>> + if (!clk)
>>>
>>> What does a NULL return from of_clk_get() mean? Where is this defined?
>>
>> Well, it's a valid path if (np) is NULL. I'll add an IS_ERR(clk) and
>> resubmit.
>
> Hang on - what logic are you trying to achieve here? Wouldn't:
>
> if (np)
> clk = of_clk_get(np, 0);
> else
> clk = clk_get_sys("smp_twd", NULL);
>
> be sufficient? If we have DT, why would we ever want to fall back to
> "smp_twd" ?
I'm just trying to make sure I have a clock so I can do cpufreq operations.
Your solution works and is sufficient. Thanks.
--Mark Langsdorf
Calxeda, Inc.
next prev parent reply other threads:[~2012-11-05 22:49 UTC|newest]
Thread overview: 94+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1351631056-25938-1-git-send-email-mark.langsdorf@calxeda.com>
2012-10-30 21:04 ` [PATCH 1/6] arm: use devicetree to get smp_twd clock Mark Langsdorf
[not found] ` <1351685025-26698-1-git-send-email-mark.langsdorf@calxeda.com>
2012-10-31 12:03 ` Mark Langsdorf
[not found] ` <1351882309-733-1-git-send-email-mark.langsdorf@calxeda.com>
2012-11-02 18:51 ` [PATCH 1/6 v2] " Mark Langsdorf
2012-11-04 10:08 ` Russell King - ARM Linux
2012-11-05 22:28 ` Mark Langsdorf
2012-11-05 22:31 ` Russell King - ARM Linux
2012-11-05 22:49 ` Mark Langsdorf [this message]
2012-11-27 15:04 ` [PATCH 0/6 v5] cpufreq: add support for Calxeda ECX-1000 (highbank) Mark Langsdorf
2012-11-27 15:04 ` [PATCH 1/6 v5] arm: use devicetree to get smp_twd clock Mark Langsdorf
2012-11-27 15:04 ` [PATCH 2/6 v5] clk, highbank: Prevent glitches in non-bypass reset mode Mark Langsdorf
2012-11-27 18:15 ` Mike Turquette
2012-11-27 15:04 ` [PATCH 3/6 v5] cpufreq: tolerate inexact values when collecting stats Mark Langsdorf
2012-11-27 15:04 ` [PATCH 4/6 v5] arm highbank: add support for pl320 IPC Mark Langsdorf
2012-11-27 16:12 ` Thomas Petazzoni
2012-11-27 19:53 ` Mark Langsdorf
2012-11-27 15:04 ` [PATCH 5/6 v5] power: export opp cpufreq functions Mark Langsdorf
2012-11-27 15:04 ` [PATCH 6/6 v5] cpufreq, highbank: add support for highbank cpufreq Mark Langsdorf
2012-11-27 19:04 ` [PATCH 0/6 v5] cpufreq: add support for Calxeda ECX-1000 (highbank) Rafael J. Wysocki
2012-11-27 20:04 ` [PATCH 0/6 v6] " Mark Langsdorf
2012-11-27 20:04 ` [PATCH 1/6 v6] arm: use devicetree to get smp_twd clock Mark Langsdorf
2012-11-27 20:04 ` [PATCH 2/6 v6] clk, highbank: Prevent glitches in non-bypass reset mode Mark Langsdorf
2012-11-27 20:04 ` [PATCH 3/6 v6] cpufreq: tolerate inexact values when collecting stats Mark Langsdorf
2012-11-27 20:04 ` [PATCH 4/6 v6] arm highbank: add support for pl320 IPC Mark Langsdorf
2012-11-27 20:04 ` [PATCH 5/6 v6] power: export opp cpufreq functions Mark Langsdorf
2012-11-27 20:04 ` [PATCH 6/6 v6] cpufreq, highbank: add support for highbank cpufreq Mark Langsdorf
2012-11-28 2:32 ` Shawn Guo
2012-11-28 13:16 ` Mark Langsdorf
2012-11-28 14:58 ` Shawn Guo
2012-11-28 15:17 ` Shawn Guo
2012-11-28 15:01 ` Mark Langsdorf
2012-11-28 16:01 ` Mike Turquette
2012-11-28 16:18 ` Mark Langsdorf
2012-11-28 21:05 ` Mike Turquette
2012-11-29 0:24 ` Mark Langsdorf
2012-11-29 1:51 ` Shawn Guo
2012-11-29 4:34 ` Mike Turquette
2012-12-04 14:33 ` [PATCH 0/6 v7] cpufreq: add support for Calxeda ECX-1000 (highbank) Mark Langsdorf
2012-12-04 14:33 ` [PATCH 1/6 v7] arm: use devicetree to get smp_twd clock Mark Langsdorf
2012-12-04 14:33 ` [PATCH 2/6 v7] clk, highbank: Prevent glitches in non-bypass reset mode Mark Langsdorf
2012-12-04 14:33 ` [PATCH 3/6 v7] cpufreq: tolerate inexact values when collecting stats Mark Langsdorf
2012-12-04 14:34 ` [PATCH 4/6 v7] arm highbank: add support for pl320 IPC Mark Langsdorf
2012-12-04 14:34 ` [PATCH 5/6 v7] power: export opp cpufreq functions Mark Langsdorf
2012-12-04 14:34 ` [PATCH 6/6 v7] cpufreq, highbank: add support for highbank cpufreq Mark Langsdorf
2012-12-04 16:21 ` Shawn Guo
2012-12-05 16:48 ` [PATCH 0/6 v8] cpufreq: add support for Calxeda ECX-1000 (highbank) Mark Langsdorf
2012-12-05 16:48 ` [PATCH 1/6 v8] arm: use devicetree to get smp_twd clock Mark Langsdorf
2012-12-05 16:48 ` [PATCH 2/6 v8] clk, highbank: Prevent glitches in non-bypass reset mode Mark Langsdorf
2012-12-05 18:02 ` Mike Turquette
2012-12-05 16:48 ` [PATCH 3/6 v8] cpufreq: tolerate inexact values when collecting stats Mark Langsdorf
2012-12-05 16:48 ` [PATCH 4/6 v8] arm highbank: add support for pl320 IPC Mark Langsdorf
2012-12-05 16:48 ` [PATCH 5/6 v8] power: export opp cpufreq functions Mark Langsdorf
2012-12-05 16:48 ` [PATCH 6/6 v8] cpufreq, highbank: add support for highbank cpufreq Mark Langsdorf
2012-12-05 18:49 ` Mike Turquette
2012-12-05 22:09 ` Mark Langsdorf
2012-12-06 9:37 ` Shawn Guo
2012-12-27 13:12 ` [PATCH 0/6 v8] cpufreq: add support for Calxeda ECX-1000 (highbank) Rafael J. Wysocki
2012-12-27 13:28 ` Mark Langsdorf
2012-12-27 14:43 ` Rafael J. Wysocki
2012-12-06 22:42 ` [PATCH 0/6 v9] " Mark Langsdorf
2012-12-06 22:42 ` [PATCH 1/6 v9] arm: use devicetree to get smp_twd clock Mark Langsdorf
2012-12-07 14:55 ` Thiago Farina
2012-12-27 5:11 ` Prashant Gaikwad
2012-12-06 22:42 ` [PATCH 2/6 v9] clk, highbank: Prevent glitches in non-bypass reset mode Mark Langsdorf
2012-12-06 22:42 ` [PATCH 3/6 v9] cpufreq: tolerate inexact values when collecting stats Mark Langsdorf
2012-12-06 22:42 ` [PATCH 4/6 v9] arm highbank: add support for pl320 IPC Mark Langsdorf
2012-12-06 22:42 ` [PATCH 5/6 v9] power: export opp cpufreq functions Mark Langsdorf
2012-12-06 22:42 ` [PATCH 6/6 v9] cpufreq, highbank: add support for highbank cpufreq Mark Langsdorf
2012-12-07 7:04 ` Mike Turquette
2013-01-04 16:35 ` [PATCH 0/4 v10] cpufreq: add support for Calxeda ECX-1000 (highbank) Mark Langsdorf
2013-01-04 16:35 ` [PATCH 1/4 v10] arm: use devicetree to get smp_twd clock Mark Langsdorf
2013-01-10 23:34 ` Russell King - ARM Linux
2013-01-11 14:40 ` Rob Herring
2013-01-04 16:35 ` [PATCH 2/4 v10] clk, highbank: Prevent glitches in non-bypass reset mode Mark Langsdorf
2013-01-04 16:35 ` [PATCH 3/4 v10] arm highbank: add support for pl320 IPC Mark Langsdorf
2013-01-04 16:35 ` [PATCH 4/4 v10] cpufreq, highbank: add support for highbank cpufreq Mark Langsdorf
2013-01-25 19:46 ` [PATCH 0/4 v11] cpufreq: add support for Calxeda ECX-1000 (highbank) Mark Langsdorf
2013-01-25 19:46 ` [PATCH 1/4 v11] arm: use device tree to get smp_twd clock Mark Langsdorf
2013-01-25 21:03 ` Rafael J. Wysocki
2013-01-25 21:40 ` Russell King - ARM Linux
2013-01-25 22:15 ` Rafael J. Wysocki
2013-01-25 19:46 ` [PATCH 2/4 v11] clk, highbank: Prevent glitches in non-bypass reset mode Mark Langsdorf
2013-01-25 19:46 ` [PATCH 3/4 v11] arm highbank: add support for pl320 IPC Mark Langsdorf
2013-01-28 12:49 ` Rafael J. Wysocki
2013-01-28 13:44 ` Mark Langsdorf
2013-01-28 20:48 ` Rafael J. Wysocki
2013-01-25 19:46 ` [PATCH 4/4] cpufreq, highbank: add support for highbank cpufreq Mark Langsdorf
2013-01-26 14:39 ` Shawn Guo
2013-01-26 22:24 ` Rafael J. Wysocki
2013-01-28 8:37 ` Shawn Guo
2013-01-28 16:13 ` [PATCH 0/4 v12] cpufreq: add support for Calxeda ECX-1000 (highbank) Mark Langsdorf
2013-01-28 16:13 ` [PATCH 1/4 v12] arm: use device tree to get smp_twd clock Mark Langsdorf
2013-01-28 16:13 ` [PATCH 2/4 v12] clk, highbank: Prevent glitches in non-bypass reset mode Mark Langsdorf
2013-01-28 16:13 ` [PATCH 3/4 v12] arm highbank: add support for pl320 IPC Mark Langsdorf
2013-01-28 16:13 ` [PATCH 4/4 v12] cpufreq, highbank: add support for highbank cpufreq Mark Langsdorf
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=50984265.9010804@calxeda.com \
--to=mark.langsdorf@calxeda.com \
--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).