diff mbox

clockevents: asm9260: Fix compilation error with sparc/sparc64 allyesconfig

Message ID 1424718051-18946-1-git-send-email-daniel.lezcano@linaro.org
State New
Headers show

Commit Message

Daniel Lezcano Feb. 23, 2015, 7 p.m. UTC
The Kconfig options for the asm9260 timer is wrong as it can be selected by
another platform with allyes config and thus leading to a compilation failure
as some non arch related code is pulled by the compilation.

Fix this by having the platform Kconfig to select the timer as it is done for
the others drivers.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 arch/arm/mach-asm9260/Kconfig |  2 ++
 drivers/clocksource/Kconfig   | 16 +++++-----------
 2 files changed, 7 insertions(+), 11 deletions(-)

Comments

Daniel Lezcano Feb. 23, 2015, 9:21 p.m. UTC | #1
On 02/23/2015 09:46 PM, Oleksij Rempel wrote:
> Am 23.02.2015 um 21:34 schrieb Guenter Roeck:
>> On Mon, Feb 23, 2015 at 09:27:01PM +0100, Oleksij Rempel wrote:
>>> Am 23.02.2015 um 20:10 schrieb Guenter Roeck:
>>>> On Mon, Feb 23, 2015 at 08:00:51PM +0100, Daniel Lezcano wrote:
>>>>> The Kconfig options for the asm9260 timer is wrong as it can be selected by
>>>>> another platform with allyes config and thus leading to a compilation failure
>>>>> as some non arch related code is pulled by the compilation.
>>>>>
>>>>> Fix this by having the platform Kconfig to select the timer as it is done for
>>>>> the others drivers.
>>>>>
>>>>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>>>>
>>>> Acked-by: Guenter Roeck <linux@roeck-us.net>
>>>>
>>>
>>> the thing is, this SoC or this company has no own IP cores. All of them
>>> are from other companies and providers, including this timer. This is
>>> why all modules for this SoC are selectable.
>>>
>> Maybe the modules should be selected by the architectures using the IP cores ?
>
> At the moment of pushing patches to arch/arm, maintainers preferred to
> have minimalistic Kconfig.
>
>> Either case, we'll need _some_ fix upstream, whatever is acceptable for the
>> maintainer.
>
> What is with initial white list patch?

The Kconfig policy for the timers is to let the arch to select the timer 
they need and not enable them from the clocksource/Kconfig file. That is 
the general policy even there are a couple of exceptions.

So if you are ok with the patch I sent I will merge it as a fix.
diff mbox

Patch

diff --git a/arch/arm/mach-asm9260/Kconfig b/arch/arm/mach-asm9260/Kconfig
index 8423be7..5224120 100644
--- a/arch/arm/mach-asm9260/Kconfig
+++ b/arch/arm/mach-asm9260/Kconfig
@@ -2,5 +2,7 @@  config MACH_ASM9260
 	bool "Alphascale ASM9260"
 	depends on ARCH_MULTI_V5
 	select CPU_ARM926T
+	select ASM9260_TIMER
+	select GENERIC_CLOCKEVENTS
 	help
 	  Support for Alphascale ASM9260 based platform.
diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
index 72a3827..f9c1995 100644
--- a/drivers/clocksource/Kconfig
+++ b/drivers/clocksource/Kconfig
@@ -60,6 +60,11 @@  config VT8500_TIMER
 config CADENCE_TTC_TIMER
 	bool
 
+config ASM9260_TIMER
+	bool
+	select CLKSRC_MMIO
+	select CLKSRC_OF
+
 config CLKSRC_NOMADIK_MTU
 	bool
 	depends on (ARCH_NOMADIK || ARCH_U8500)
@@ -235,15 +240,4 @@  config CLKSRC_MIPS_GIC
 	bool
 	depends on MIPS_GIC
 	select CLKSRC_OF
-
-config ASM9260_TIMER
-	bool "Alphascale ASM9260 timer driver"
-	depends on GENERIC_CLOCKEVENTS
-	select CLKSRC_MMIO
-	select CLKSRC_OF
-	default y if MACH_ASM9260
-	help
-	  This enables build of a clocksource and clockevent driver for
-	  the 32-bit System Timer hardware available on a Alphascale ASM9260.
-
 endmenu