Skip to contentSkip to conversation

trivial fixes relating to !CONFIG_OF

PATCH Superseded Jonathan Austin 2 participants 5 messages Jul 24, 2013 – Jul 30, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover trivial fixes relating to !CONFIG_OF

This series contains 3 trivial fixes picked up along the path of building kernels without CONFIG_OF enabled. They're things likely to break randconfig builds, etc, if not fixed up.

Jonathan Austin (3):
PSCI: add missing dependency on CONFIG_OF for PSCI.
clocksource: Add missing dependency on CONFIG_OF for ARM_ARCH_TIMER
ARM: arch_timer: Add missing include for of_* functions

 arch/arm/Kconfig                     |    1 +
 drivers/clocksource/Kconfig          |    3 ++-
 drivers/clocksource/arm_arch_timer.c |    1 +
 3 files changed, 4 insertions(+), 1 deletion(-)
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/3 PSCI: add missing dependency on CONFIG_OF for PSCI.

The PSCI initialisation depends on data found in the DT. Without this the including PSCI support makes little sense, and furthermore the of_* stub functions aren't broad enough to ensure that this builds without CONFIG_OF.

As there is little enthusiasm for extending these stubs without useful use-cases (of which this is *not* an example) this patch prevents building of PSCI without CONFIG_OF.

---
 arch/arm/Kconfig |    1 +
 1 file changed, 1 insertion(+)
arch/arm/Kconfig +1 -0
index ba412e0..972ec25 100644
@@ -1577,6 +1577,7 @@ config HOTPLUG_CPU
 config ARM_PSCI
 	bool "Support for the ARM Power State Coordination Interface (PSCI)"
 	depends on CPU_V7
+	depends on CONFIG_OF
 	help
 	  Say Y here if you want Linux to communicate with system firmware
 	  implementing the PSCI specification for CPU-centric power
Signature · 1 line
1.7.9.5
#2 lore raw

PATCH 2/3 clocksource: Add missing dependency on CONFIG_OF for ARM_ARCH_TIMER

In reply to Jonathan Austin

Initialisation of the ARM Arch timer requires data from the DT. There is no fallback initialisation method and hence selecting ARM_ARCH_TIMER without OF makes little sense.

Furthermore, doing so causes a build error because the of_* stubs for !CONFIG_OF do not extend to all of the functions being used by this driver, and will not be extended unless there are valid use-cases for them to be (this is not a valid case).

---
 drivers/clocksource/Kconfig |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/clocksource/Kconfig +2 -1
index b7b9b04..4348902 100644
@@ -72,7 +72,8 @@ config CLKSRC_DBX500_PRCMU_SCHED_CLOCK
 
 config ARM_ARCH_TIMER
 	bool
-	select CLKSRC_OF if OF
+	depends on OF
+	select CLKSRC_OF
 
 config ARM_GLOBAL_TIMER
 	bool
Signature · 1 line
1.7.9.5
#3 lore raw

PATCH 2/3 clocksource: Add missing dependency on CONFIG_OF for ARM_ARCH_TIMER

Quoted 11 lines · Jonathan Austin

Initialisation of the ARM Arch timer requires data from the DT. There is no fallback initialisation method and hence selecting ARM_ARCH_TIMER without OF makes little sense.

Furthermore, doing so causes a build error because the of_* stubs for !CONFIG_OF do not extend to all of the functions being used by this driver, and will not be extended unless there are valid use-cases for them to be (this is not a valid case).

---

This falls under the drivers/clocksource umbrella.

Please resend to the maintainers.

Thanks
-- Daniel

Quoted 18 lines
 drivers/clocksource/Kconfig |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/clocksource/Kconfig +2 -1
index b7b9b04..4348902 100644
@@ -72,7 +72,8 @@ config CLKSRC_DBX500_PRCMU_SCHED_CLOCK
 
 config ARM_ARCH_TIMER
 	bool
-	select CLKSRC_OF if OF
+	depends on OF
+	select CLKSRC_OF
 
 config ARM_GLOBAL_TIMER
 	bool
Signature · 5 lines
 <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
#4 lore raw

PATCH 3/3 ARM: arch_timer: Add missing include for of_* functions

In reply to Jonathan Austin

The arch timer code uses a bunch of of_* functions that are defined in linux/of.h. Currently this header is not included but the functions are available elsewise.

---
 drivers/clocksource/arm_arch_timer.c |    1 +
 1 file changed, 1 insertion(+)
drivers/clocksource/arm_arch_timer.c +1 -0
index ffadd83..857a196 100644
@@ -15,6 +15,7 @@
 #include <linux/cpu.h>
 #include <linux/clockchips.h>
 #include <linux/interrupt.h>
+#include <linux/of.h>
 #include <linux/of_irq.h>
 #include <linux/io.h>
 
Signature · 1 line
1.7.9.5