Skip to contentSkip to conversation

ARM: shmobile: R-Car Gen2: CONFIG_COMMON_CLK is always set

PATCH New Geert Uytterhoeven 4 participants 4 messages Jan 26, 2015 – Jan 27, 2015

Subsystems (4)
lore
Share & tools
lore

Geert Uytterhoeven

author maintainer
#0 lore raw

PATCH 1/1 ARM: shmobile: R-Car Gen2: CONFIG_COMMON_CLK is always set

Since commit e042681894b62d60 ("ARM: shmobile: r8a7790: Remove legacy code"), all R-Car Gen2 SoCs are supported by multiplatform kernels only. As CONFIG_COMMON_CLK is always set for multiplatform kernels, we can remove related #ifdefs in code specific to R-Car Gen2 SoCs.

---
Depends on renesas-lager-board-removal-for-v3.20

---
 arch/arm/mach-shmobile/setup-rcar-gen2.c | 4 ----
 1 file changed, 4 deletions(-)
arch/arm/mach-shmobile/setup-rcar-gen2.c +0 -4
index e2b9bb46393d898d..aa3339258d9c0232 100644
@@ -51,9 +51,7 @@ u32 rcar_gen2_read_mode_pins(void)
 
 void __init rcar_gen2_timer_init(void)
 {
-#if defined(CONFIG_ARM_ARCH_TIMER) || defined(CONFIG_COMMON_CLK)
 	u32 mode = rcar_gen2_read_mode_pins();
-#endif
 #ifdef CONFIG_ARM_ARCH_TIMER
 	void __iomem *base;
 	int extal_mhz = 0;
@@ -129,9 +127,7 @@ void __init rcar_gen2_timer_init(void)
 	iounmap(base);
 #endif /* CONFIG_ARM_ARCH_TIMER */
 
-#ifdef CONFIG_COMMON_CLK
 	rcar_gen2_clocks_init(mode);
-#endif
 	clocksource_of_init();
 }
 
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 ARM: shmobile: R-Car Gen2: CONFIG_COMMON_CLK is always set

Hello.

Quoted 17 lines · Geert Uytterhoeven

Since commit e042681894b62d60 ("ARM: shmobile: r8a7790: Remove legacy code"), all R-Car Gen2 SoCs are supported by multiplatform kernels only. As CONFIG_COMMON_CLK is always set for multiplatform kernels, we can remove related #ifdefs in code specific to R-Car Gen2 SoCs.

---
Depends on renesas-lager-board-removal-for-v3.20

---
  arch/arm/mach-shmobile/setup-rcar-gen2.c | 4 ----
  1 file changed, 4 deletions(-)
arch/arm/mach-shmobile/setup-rcar-gen2.c +0 -0
index e2b9bb46393d898d..aa3339258d9c0232 100644

arch/arm/mach-shmobile/setup-rcar-gen2.c u32 rcar_gen2_read_mode_pins(void) · line 54

Quoted 4 lines
arch/arm/mach-shmobile/setup-rcar-gen2.c +0 -1
@@ -51,9 +51,7 @@ u32 rcar_gen2_read_mode_pins(void)
 
  void __init rcar_gen2_timer_init(void)
  {
-#if defined(CONFIG_ARM_ARCH_TIMER) || defined(CONFIG_COMMON_CLK)

Is CONFIG_ARM_ARCH_TIMER always defined too? I guess not...

arch/arm/mach-shmobile/setup-rcar-gen2.c u32 rcar_gen2_read_mode_pins(void) · line 55

Quoted 3 lines
arch/arm/mach-shmobile/setup-rcar-gen2.c +0 -1
  	u32 mode = rcar_gen2_read_mode_pins();
-#endif
  #ifdef CONFIG_ARM_ARCH_TIMER

... or you would have removed this as well?

arch/arm/mach-shmobile/setup-rcar-gen2.c u32 rcar_gen2_read_mode_pins(void) · line 57

Quoted 2 lines
arch/arm/mach-shmobile/setup-rcar-gen2.c +0 -0
  	void __iomem *base;
  	int extal_mhz = 0;

[...]

WBR, Sergei

#2 lore raw

PATCH 1/1 ARM: shmobile: R-Car Gen2: CONFIG_COMMON_CLK is always set

Quoted 7 lines · Sergei Shtylyov
Quoted 7 lines
arch/arm/mach-shmobile/setup-rcar-gen2.c +0 -0
index e2b9bb46393d898d..aa3339258d9c0232 100644
@@ -51,9 +51,7 @@ u32 rcar_gen2_read_mode_pins(void)
 
Quoted 6 lines

arch/arm/mach-shmobile/setup-rcar-gen2.c u32 rcar_gen2_read_mode_pins(void) · line 54

Quoted 3 lines
arch/arm/mach-shmobile/setup-rcar-gen2.c +0 -1
  void __init rcar_gen2_timer_init(void)
  {
-#if defined(CONFIG_ARM_ARCH_TIMER) || defined(CONFIG_COMMON_CLK)

Is CONFIG_ARM_ARCH_TIMER always defined too? I guess not...

Nope...

("x || true" == "true")

Quoted 6 lines

arch/arm/mach-shmobile/setup-rcar-gen2.c u32 rcar_gen2_read_mode_pins(void) · line 55

Quoted 3 lines
arch/arm/mach-shmobile/setup-rcar-gen2.c +0 -1
        u32 mode = rcar_gen2_read_mode_pins();
-#endif
  #ifdef CONFIG_ARM_ARCH_TIMER

... or you would have removed this as well?

... and if it would, that could have been a separate change ;-)

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#3 lore raw

PATCH 1/1 ARM: shmobile: R-Car Gen2: CONFIG_COMMON_CLK is always set

In reply to Geert Uytterhoeven
Quoted 8 lines · Geert Uytterhoeven

Since commit e042681894b62d60 ("ARM: shmobile: r8a7790: Remove legacy code"), all R-Car Gen2 SoCs are supported by multiplatform kernels only. As CONFIG_COMMON_CLK is always set for multiplatform kernels, we can remove related #ifdefs in code specific to R-Car Gen2 SoCs.

---
Depends on renesas-lager-board-removal-for-v3.20

Thanks, I have queued this up in the soc-for-v3.21 branch.

Quoted 31 lines
---
 arch/arm/mach-shmobile/setup-rcar-gen2.c | 4 ----
 1 file changed, 4 deletions(-)
arch/arm/mach-shmobile/setup-rcar-gen2.c +0 -4
index e2b9bb46393d898d..aa3339258d9c0232 100644
@@ -51,9 +51,7 @@ u32 rcar_gen2_read_mode_pins(void)
 
 void __init rcar_gen2_timer_init(void)
 {
-#if defined(CONFIG_ARM_ARCH_TIMER) || defined(CONFIG_COMMON_CLK)
 	u32 mode = rcar_gen2_read_mode_pins();
-#endif
 #ifdef CONFIG_ARM_ARCH_TIMER
 	void __iomem *base;
 	int extal_mhz = 0;
@@ -129,9 +127,7 @@ void __init rcar_gen2_timer_init(void)
 	iounmap(base);
 #endif /* CONFIG_ARM_ARCH_TIMER */
 
-#ifdef CONFIG_COMMON_CLK
 	rcar_gen2_clocks_init(mode);
-#endif
 	clocksource_of_init();
 }
 
Signature · 1 line
1.9.1