linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] ARM: shmobile: Fix is_e2 warning
@ 2014-12-03 11:48 Magnus Damm
  2014-12-04  7:13 ` Simon Horman
  0 siblings, 1 reply; 2+ messages in thread
From: Magnus Damm @ 2014-12-03 11:48 UTC (permalink / raw)
  To: linux-sh

From: Magnus Damm <damm+renesas@opensource.se>

Fix "is_e2" warning introduced by:

9ce3fa6 ARM: shmobile: rcar-gen2: Add CA7 arch_timer initialization for r8a7794

Only triggers on kernel configurations that have ARCH_ARM_TIMER=n.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
---

 Changes since V1:
 - Use of_machine_is_compatible()

 arch/arm/mach-shmobile/setup-rcar-gen2.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

--- 0001/arch/arm/mach-shmobile/setup-rcar-gen2.c
+++ work/arch/arm/mach-shmobile/setup-rcar-gen2.c	2014-11-28 12:55:44.000000000 +0900
@@ -52,15 +52,13 @@ void __init rcar_gen2_timer_init(void)
 {
 #if defined(CONFIG_ARM_ARCH_TIMER) || defined(CONFIG_COMMON_CLK)
 	u32 mode = rcar_gen2_read_mode_pins();
-	bool is_e2 = (bool)of_find_compatible_node(NULL, NULL,
-		"renesas,r8a7794");
 #endif
 #ifdef CONFIG_ARM_ARCH_TIMER
 	void __iomem *base;
 	int extal_mhz = 0;
 	u32 freq;
 
-	if (is_e2) {
+	if (of_machine_is_compatible("renesas,r8a7794")) {
 		freq = 260000000 / 8;	/* ZS / 8 */
 		/* CNTVOFF has to be initialized either from non-secure
 		 * Hypervisor mode or secure Monitor mode with SCR.NS=1.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] ARM: shmobile: Fix is_e2 warning
  2014-12-03 11:48 [PATCH v2] ARM: shmobile: Fix is_e2 warning Magnus Damm
@ 2014-12-04  7:13 ` Simon Horman
  0 siblings, 0 replies; 2+ messages in thread
From: Simon Horman @ 2014-12-04  7:13 UTC (permalink / raw)
  To: linux-sh

On Wed, Dec 03, 2014 at 08:48:04PM +0900, Magnus Damm wrote:
> From: Magnus Damm <damm+renesas@opensource.se>
> 
> Fix "is_e2" warning introduced by:
> 
> 9ce3fa6 ARM: shmobile: rcar-gen2: Add CA7 arch_timer initialization for r8a7794
> 
> Only triggers on kernel configurations that have ARCH_ARM_TIMER=n.
> 
> Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
> ---

Thanks Magnus,

I have queued this up.

>  Changes since V1:
>  - Use of_machine_is_compatible()
> 
>  arch/arm/mach-shmobile/setup-rcar-gen2.c |    4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> --- 0001/arch/arm/mach-shmobile/setup-rcar-gen2.c
> +++ work/arch/arm/mach-shmobile/setup-rcar-gen2.c	2014-11-28 12:55:44.000000000 +0900
> @@ -52,15 +52,13 @@ void __init rcar_gen2_timer_init(void)
>  {
>  #if defined(CONFIG_ARM_ARCH_TIMER) || defined(CONFIG_COMMON_CLK)
>  	u32 mode = rcar_gen2_read_mode_pins();
> -	bool is_e2 = (bool)of_find_compatible_node(NULL, NULL,
> -		"renesas,r8a7794");

One less cast in the world, awesome!!!

>  #endif
>  #ifdef CONFIG_ARM_ARCH_TIMER
>  	void __iomem *base;
>  	int extal_mhz = 0;
>  	u32 freq;
>  
> -	if (is_e2) {
> +	if (of_machine_is_compatible("renesas,r8a7794")) {
>  		freq = 260000000 / 8;	/* ZS / 8 */
>  		/* CNTVOFF has to be initialized either from non-secure
>  		 * Hypervisor mode or secure Monitor mode with SCR.NS=1.
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-12-04  7:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-03 11:48 [PATCH v2] ARM: shmobile: Fix is_e2 warning Magnus Damm
2014-12-04  7:13 ` Simon Horman

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).