All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@codeaurora.org>
To: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Boris Brezillon <boris.brezillon@free-electrons.com>,
	Maxime Coquelin <maxime.coquelin@st.com>,
	Patrice Chotard <patrice.chotard@st.com>,
	Tero Kristo <t-kristo@ti.com>,
	Mike Turquette <mturquette@linaro.org>,
	Russell King <linux@arm.linux.org.uk>,
	linux-clk@vger.kernel.org, kernel@stlinux.com,
	linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 5/5] [RFC] ARM: timer-sp: Use of_clk_get_parent_count() instead of open coding
Date: Wed, 3 Jun 2015 16:44:27 -0700	[thread overview]
Message-ID: <20150603234426.GB490@codeaurora.org> (raw)
In-Reply-To: <1432891549-23295-6-git-send-email-geert+renesas@glider.be>

On 05/29, Geert Uytterhoeven wrote:
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> This is an RFC, as it depends on "[RFC] clk: Provide dummy
> of_clk_get_parent_count() for !OF/!CCF".
> ---
>  arch/arm/common/timer-sp.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/common/timer-sp.c b/arch/arm/common/timer-sp.c
> index 19211324772f387c..be87a5d480ffb655 100644
> --- a/arch/arm/common/timer-sp.c
> +++ b/arch/arm/common/timer-sp.c
> @@ -21,6 +21,7 @@
>  #include <linux/clk.h>
>  #include <linux/clocksource.h>
>  #include <linux/clockchips.h>
> +#include <linux/clk-provider.h>

This looks weird. This is not a clock provider.

>  #include <linux/err.h>
>  #include <linux/interrupt.h>
>  #include <linux/irq.h>
> @@ -234,7 +235,7 @@ static void __init sp804_of_init(struct device_node *np)
>  		clk1 = NULL;
>  
>  	/* Get the 2nd clock if the timer has 3 timer clocks */
> -	if (of_count_phandle_with_args(np, "clocks", "#clock-cells") == 3) {
> +	if (of_clk_get_parent_count(np) == 3) {

So maybe it means if we want to expose of_clk_get_parent_count()
we should move it to some other header file (of_clk.h?). And then
maybe we should always compile said helpers if OF=y and
HAVE_CLK=y.

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

WARNING: multiple messages have this Message-ID (diff)
From: sboyd@codeaurora.org (Stephen Boyd)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 5/5] [RFC] ARM: timer-sp: Use of_clk_get_parent_count() instead of open coding
Date: Wed, 3 Jun 2015 16:44:27 -0700	[thread overview]
Message-ID: <20150603234426.GB490@codeaurora.org> (raw)
In-Reply-To: <1432891549-23295-6-git-send-email-geert+renesas@glider.be>

On 05/29, Geert Uytterhoeven wrote:
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> This is an RFC, as it depends on "[RFC] clk: Provide dummy
> of_clk_get_parent_count() for !OF/!CCF".
> ---
>  arch/arm/common/timer-sp.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/common/timer-sp.c b/arch/arm/common/timer-sp.c
> index 19211324772f387c..be87a5d480ffb655 100644
> --- a/arch/arm/common/timer-sp.c
> +++ b/arch/arm/common/timer-sp.c
> @@ -21,6 +21,7 @@
>  #include <linux/clk.h>
>  #include <linux/clocksource.h>
>  #include <linux/clockchips.h>
> +#include <linux/clk-provider.h>

This looks weird. This is not a clock provider.

>  #include <linux/err.h>
>  #include <linux/interrupt.h>
>  #include <linux/irq.h>
> @@ -234,7 +235,7 @@ static void __init sp804_of_init(struct device_node *np)
>  		clk1 = NULL;
>  
>  	/* Get the 2nd clock if the timer has 3 timer clocks */
> -	if (of_count_phandle_with_args(np, "clocks", "#clock-cells") == 3) {
> +	if (of_clk_get_parent_count(np) == 3) {

So maybe it means if we want to expose of_clk_get_parent_count()
we should move it to some other header file (of_clk.h?). And then
maybe we should always compile said helpers if OF=y and
HAVE_CLK=y.

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

  reply	other threads:[~2015-06-03 23:44 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-29  9:25 [PATCH 0/5] clk: Use of_clk_get_parent_count() instead of open coding Geert Uytterhoeven
2015-05-29  9:25 ` Geert Uytterhoeven
2015-05-29  9:25 ` [PATCH 1/5] clk: at91: " Geert Uytterhoeven
2015-05-29  9:25   ` Geert Uytterhoeven
2015-05-30  7:43   ` Boris Brezillon
2015-05-30  7:43     ` Boris Brezillon
2015-06-04 20:52   ` Stephen Boyd
2015-06-04 20:52     ` Stephen Boyd
2015-05-29  9:25 ` [PATCH 2/5] clk: st: " Geert Uytterhoeven
2015-05-29  9:25   ` Geert Uytterhoeven
2015-06-04 20:53   ` Stephen Boyd
2015-06-04 20:53     ` Stephen Boyd
2015-05-29  9:25 ` [PATCH 3/5] clk: ti: " Geert Uytterhoeven
2015-05-29  9:25   ` Geert Uytterhoeven
2015-06-04 20:53   ` Stephen Boyd
2015-06-04 20:53     ` Stephen Boyd
2015-05-29  9:25 ` [PATCH 4/5] [RFC] clk: Provide dummy of_clk_get_parent_count() for !OF/!CCF Geert Uytterhoeven
2015-05-29  9:25   ` Geert Uytterhoeven
2015-05-29  9:25 ` [PATCH 5/5] [RFC] ARM: timer-sp: Use of_clk_get_parent_count() instead of open coding Geert Uytterhoeven
2015-05-29  9:25   ` Geert Uytterhoeven
2015-06-03 23:44   ` Stephen Boyd [this message]
2015-06-03 23:44     ` Stephen Boyd
2015-06-04  7:26     ` Geert Uytterhoeven
2015-06-04  7:26       ` Geert Uytterhoeven
2015-06-04 18:14       ` Stephen Boyd
2015-06-04 18:14         ` Stephen Boyd

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=20150603234426.GB490@codeaurora.org \
    --to=sboyd@codeaurora.org \
    --cc=boris.brezillon@free-electrons.com \
    --cc=geert+renesas@glider.be \
    --cc=kernel@stlinux.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=maxime.coquelin@st.com \
    --cc=mturquette@linaro.org \
    --cc=patrice.chotard@st.com \
    --cc=t-kristo@ti.com \
    /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.