diff mbox

[1/3] ARM: also support TWD clock, instantiated from platform data

Message ID 1365005636-17526-2-git-send-email-g.liakhovetski@gmx.de (mailing list archive)
State Changes Requested
Headers show

Commit Message

Guennadi Liakhovetski April 3, 2013, 4:13 p.m. UTC
While gradually switching clock initialisation to DT some architectures
can have TWD device in DT, but supplying clock initialised from platform
data. This patch adds support for such configurations to ARM.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
Cc: Russell King <linux@arm.linux.org.uk>
---
 arch/arm/kernel/smp_twd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Simon Horman April 5, 2013, 2:23 a.m. UTC | #1
On Wed, Apr 03, 2013 at 06:13:54PM +0200, Guennadi Liakhovetski wrote:
> While gradually switching clock initialisation to DT some architectures
> can have TWD device in DT, but supplying clock initialised from platform
> data. This patch adds support for such configurations to ARM.
> 
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
> Cc: Russell King <linux@arm.linux.org.uk>

Acked-by: Simon Horman <horms+renesas@verge.net.au>

> ---
>  arch/arm/kernel/smp_twd.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/arm/kernel/smp_twd.c b/arch/arm/kernel/smp_twd.c
> index 3f25650..8f12aa3 100644
> --- a/arch/arm/kernel/smp_twd.c
> +++ b/arch/arm/kernel/smp_twd.c
> @@ -244,7 +244,7 @@ static void twd_get_clock(struct device_node *np)
>  
>  	if (np)
>  		twd_clk = of_clk_get(np, 0);
> -	else
> +	if (IS_ERR(twd_clk))
>  		twd_clk = clk_get_sys("smp_twd", NULL);
>  
>  	if (IS_ERR(twd_clk)) {
> -- 
> 1.7.2.5
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Russell King - ARM Linux April 18, 2013, 2:19 p.m. UTC | #2
On Wed, Apr 03, 2013 at 06:13:54PM +0200, Guennadi Liakhovetski wrote:
> While gradually switching clock initialisation to DT some architectures
> can have TWD device in DT, but supplying clock initialised from platform
> data. This patch adds support for such configurations to ARM.

Why can't you fix the clock problem at the same time - or sort out the
clock problem first and then add a DT description for TWD?
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/arm/kernel/smp_twd.c b/arch/arm/kernel/smp_twd.c
index 3f25650..8f12aa3 100644
--- a/arch/arm/kernel/smp_twd.c
+++ b/arch/arm/kernel/smp_twd.c
@@ -244,7 +244,7 @@  static void twd_get_clock(struct device_node *np)
 
 	if (np)
 		twd_clk = of_clk_get(np, 0);
-	else
+	if (IS_ERR(twd_clk))
 		twd_clk = clk_get_sys("smp_twd", NULL);
 
 	if (IS_ERR(twd_clk)) {