From: swarren@wwwdotorg.org (Stephen Warren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/7] ARM: bcm2835: Add a Raspberry Pi-specific clock driver.
Date: Thu, 04 Jun 2015 20:56:30 -0600 [thread overview]
Message-ID: <55710FDE.90609@wwwdotorg.org> (raw)
In-Reply-To: <87h9qvcd1i.fsf@eliezer.anholt.net>
On 05/29/2015 03:02 PM, Eric Anholt wrote:
> Stephen Warren <swarren@wwwdotorg.org> writes:
>
>> On 05/18/2015 01:43 PM, Eric Anholt wrote:
>>> +static struct clk *rpi_firmware_delayed_get_clk(struct
>>> of_phandle_args *clkspec, + void *_data)
>>
>>> + rpi_clk = &rpi_clocks[clkspec->args[0]]; + + firmware_node =
>>> of_parse_phandle(of_node, "firmware", 0); + if (!firmware_node)
>>> { + dev_err(dev, "%s: Missing firmware node\n",
>>> rpi_clk->name); + return ERR_PTR(-ENODEV); + } + + /* Try a
>>> no-op transaction to see if the driver is loaded yet. */ + ret
>>> = rpi_firmware_property_list(firmware_node, NULL, 0); + if
>>> (ret) + return ERR_PTR(ret);
>>
>> I would move all that into this driver's probe().
>
> We can't move all this into the driver's probe, because this is
> where we're returning -EPROBE_DEFER. We could potentially do just
> the phandle parse up front and allocate some memory to pass it and
> our own device node to this function through the _data arg, but I
> don't see much point.
Well, once the clock core correctly supports deferred probe, that can
be moved.
Aside from that, I think all your other replies to my replies in this
thread/series make sense.
WARNING: multiple messages have this Message-ID (diff)
From: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
To: Eric Anholt <eric-WhKQ6XTQaPysTnJN9+BGXg@public.gmane.org>
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Lee Jones <lee-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Mike Turquette
<mturquette-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Stephen Boyd <sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
Subject: Re: [PATCH 2/7] ARM: bcm2835: Add a Raspberry Pi-specific clock driver.
Date: Thu, 04 Jun 2015 20:56:30 -0600 [thread overview]
Message-ID: <55710FDE.90609@wwwdotorg.org> (raw)
In-Reply-To: <87h9qvcd1i.fsf-omZaPlIz5HhaEpDpdNBo/KxOck334EZe@public.gmane.org>
On 05/29/2015 03:02 PM, Eric Anholt wrote:
> Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org> writes:
>
>> On 05/18/2015 01:43 PM, Eric Anholt wrote:
>>> +static struct clk *rpi_firmware_delayed_get_clk(struct
>>> of_phandle_args *clkspec, + void *_data)
>>
>>> + rpi_clk = &rpi_clocks[clkspec->args[0]]; + + firmware_node =
>>> of_parse_phandle(of_node, "firmware", 0); + if (!firmware_node)
>>> { + dev_err(dev, "%s: Missing firmware node\n",
>>> rpi_clk->name); + return ERR_PTR(-ENODEV); + } + + /* Try a
>>> no-op transaction to see if the driver is loaded yet. */ + ret
>>> = rpi_firmware_property_list(firmware_node, NULL, 0); + if
>>> (ret) + return ERR_PTR(ret);
>>
>> I would move all that into this driver's probe().
>
> We can't move all this into the driver's probe, because this is
> where we're returning -EPROBE_DEFER. We could potentially do just
> the phandle parse up front and allocate some memory to pass it and
> our own device node to this function through the _data arg, but I
> don't see much point.
Well, once the clock core correctly supports deferred probe, that can
be moved.
Aside from that, I think all your other replies to my replies in this
thread/series make sense.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: Stephen Warren <swarren@wwwdotorg.org>
To: Eric Anholt <eric@anholt.net>
Cc: linux-arm-kernel@lists.infradead.org,
linux-rpi-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Lee Jones <lee@kernel.org>,
devicetree@vger.kernel.org,
Mike Turquette <mturquette@linaro.org>,
Stephen Boyd <sboyd@codeaurora.org>
Subject: Re: [PATCH 2/7] ARM: bcm2835: Add a Raspberry Pi-specific clock driver.
Date: Thu, 04 Jun 2015 20:56:30 -0600 [thread overview]
Message-ID: <55710FDE.90609@wwwdotorg.org> (raw)
In-Reply-To: <87h9qvcd1i.fsf@eliezer.anholt.net>
On 05/29/2015 03:02 PM, Eric Anholt wrote:
> Stephen Warren <swarren@wwwdotorg.org> writes:
>
>> On 05/18/2015 01:43 PM, Eric Anholt wrote:
>>> +static struct clk *rpi_firmware_delayed_get_clk(struct
>>> of_phandle_args *clkspec, + void *_data)
>>
>>> + rpi_clk = &rpi_clocks[clkspec->args[0]]; + + firmware_node =
>>> of_parse_phandle(of_node, "firmware", 0); + if (!firmware_node)
>>> { + dev_err(dev, "%s: Missing firmware node\n",
>>> rpi_clk->name); + return ERR_PTR(-ENODEV); + } + + /* Try a
>>> no-op transaction to see if the driver is loaded yet. */ + ret
>>> = rpi_firmware_property_list(firmware_node, NULL, 0); + if
>>> (ret) + return ERR_PTR(ret);
>>
>> I would move all that into this driver's probe().
>
> We can't move all this into the driver's probe, because this is
> where we're returning -EPROBE_DEFER. We could potentially do just
> the phandle parse up front and allocate some memory to pass it and
> our own device node to this function through the _data arg, but I
> don't see much point.
Well, once the clock core correctly supports deferred probe, that can
be moved.
Aside from that, I think all your other replies to my replies in this
thread/series make sense.
next prev parent reply other threads:[~2015-06-05 2:56 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-18 19:43 Raspberry Pi DT clocks series Eric Anholt
2015-05-18 19:43 ` Eric Anholt
2015-05-18 19:43 ` Eric Anholt
2015-05-18 19:43 ` [PATCH 1/7] dt/bindings: Add binding for the Raspberry Pi clock provider Eric Anholt
2015-05-18 19:43 ` Eric Anholt
2015-05-28 21:46 ` Stephen Warren
2015-05-28 21:46 ` Stephen Warren
2015-05-18 19:43 ` [PATCH 2/7] ARM: bcm2835: Add a Raspberry Pi-specific clock driver Eric Anholt
2015-05-18 19:43 ` Eric Anholt
2015-05-19 3:05 ` Baruch Siach
2015-05-19 3:05 ` Baruch Siach
2015-05-28 19:02 ` [PATCH 2/7 v2] " Eric Anholt
2015-05-28 19:02 ` Eric Anholt
2015-05-28 19:02 ` Eric Anholt
2015-05-28 22:02 ` [PATCH 2/7] " Stephen Warren
2015-05-28 22:02 ` Stephen Warren
2015-05-28 22:48 ` Stephen Boyd
2015-05-28 22:48 ` Stephen Boyd
2015-05-28 22:48 ` Stephen Boyd
2015-05-29 19:30 ` Eric Anholt
2015-05-29 19:30 ` Eric Anholt
2015-05-29 19:30 ` Eric Anholt
2015-05-29 19:09 ` Eric Anholt
2015-05-29 19:09 ` Eric Anholt
2015-05-29 21:02 ` Eric Anholt
2015-05-29 21:02 ` Eric Anholt
2015-05-29 21:02 ` Eric Anholt
2015-06-05 2:56 ` Stephen Warren [this message]
2015-06-05 2:56 ` Stephen Warren
2015-06-05 2:56 ` Stephen Warren
2015-05-18 19:43 ` [PATCH 3/7] ARM: bcm2835: Add DT for the firmware clocks driver Eric Anholt
2015-05-18 19:43 ` Eric Anholt
2015-05-18 19:43 ` Eric Anholt
2015-05-18 19:43 ` [PATCH 4/7] ARM: bcm2835: Drop never-used clock-frequency property of uart0 Eric Anholt
2015-05-18 19:43 ` Eric Anholt
2015-05-18 19:43 ` [PATCH 5/7] ARM: bcm2835: Drop the fixed sys_pclk Eric Anholt
2015-05-18 19:43 ` Eric Anholt
2015-05-18 19:43 ` Eric Anholt
2015-05-28 22:05 ` Stephen Warren
2015-05-28 22:05 ` Stephen Warren
2015-05-28 22:05 ` Stephen Warren
2015-05-29 17:44 ` Eric Anholt
2015-05-29 17:44 ` Eric Anholt
2015-05-29 17:44 ` Eric Anholt
2015-05-18 19:43 ` [PATCH 6/7] ARM: bcm2835: Use the RPi firmware clocks for uart Eric Anholt
2015-05-18 19:43 ` Eric Anholt
2015-05-18 19:43 ` Eric Anholt
2015-05-18 19:43 ` [PATCH 7/7] ARM: bcm2835: Tie SPI clock to the core clock rate Eric Anholt
2015-05-18 19:43 ` Eric Anholt
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=55710FDE.90609@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.