clocksource/drivers/pistachio: Add the COMPILE_TEST option
Subsystems (7)
PATCH 1/22 clocksource/drivers/pistachio: Add the COMPILE_TEST option
Increase the compilation test coverage by adding the COMPILE_TEST option.
--- drivers/clocksource/Kconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/clocksource/Kconfig +3 -1
@@ -112,8 +112,10 @@ config CLKSRC_LPC32XX select CLKSRC_OF config CLKSRC_PISTACHIO - bool + bool "Clocksource for Pistachio SoC" if COMPILE_TEST select CLKSRC_OF + help + Enables the clocksource for the Pistachio SoC. config CLKSRC_STM32 bool "Clocksource for STM32 SoCs" if !ARCH_STM32
Signature · 1 line
1.9.1
PATCH 2/22 clocksource/drivers/mediatek: Add the COMPILE_TEST option
Increase the compilation test coverage by adding the COMPILE_TEST option.
--- drivers/clocksource/Kconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/clocksource/Kconfig +3 -1
@@ -210,9 +210,11 @@ config SYS_SUPPORTS_SH_CMT bool config MTK_TIMER + bool "Mediatek timer driver" if COMPILE_TEST select CLKSRC_OF select CLKSRC_MMIO - bool + help + Support for Mediatek timer driver. config SYS_SUPPORTS_SH_MTU2 bool
Signature · 1 line
1.9.1
PATCH 3/22 clocksource/drivers/rockchip: Make the driver more compatible
In reply to Daniel LezcanoFrom: Caesar Wang <[email protected]>
Build the arm64 SoCs (e.g.: RK3368) on Rockchip platform, There are some failure with build up on timer driver for rockchip.
Says:/tmp/ccdAnNy5.s:47: Error: missing immediate expression at operand 1 -- dsb
...
The problem was different semantics of dsb on btw arm32 and arm64, Here we can convert the dsb with insteading of dsb(sy).The "sy" param is the default which you are allow to omit, so on arm32 dsb()and dsb(sy) are the same.
--- drivers/clocksource/rockchip_timer.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/clocksource/rockchip_timer.c +4 -4
@@ -49,14 +49,14 @@ static inline void __iomem *rk_base(struct clock_event_device *ce)static inline void rk_timer_disable (struct clock_event_device *ce) {writel_relaxed (TIMER_DISABLE ,rk_base (ce) +TIMER_CONTROL_REG ); -dsb (); +dsb (sy); }static inline void rk_timer_enable (struct clock_event_device *ce,u32 flags) {writel_relaxed (TIMER_ENABLE |TIMER_INT_UNMASK | flags,rk_base (ce) +TIMER_CONTROL_REG ); -dsb (); +dsb (sy); } static void rk_timer_update_counter(unsigned long cycles,
@@ -64,13 +64,13 @@ static void rk_timer_update_counter(unsigned long cycles, {writel_relaxed (cycles,rk_base (ce) +TIMER_LOAD_COUNT0 );writel_relaxed (0 ,rk_base (ce) +TIMER_LOAD_COUNT1 ); -dsb (); +dsb (sy); }static void rk_timer_interrupt_clear (struct clock_event_device *ce) {writel_relaxed (1 ,rk_base (ce) +TIMER_INT_STATUS ); -dsb (); +dsb (sy); } static inline int rk_timer_set_next_event(unsigned long cycles,
Signature · 1 line
1.9.1
Re: [PATCH 03/22] clocksource/drivers/rockchip: Make the driver more compatible
Quoted 6 lines · On Monday 02 November 2015 13:56:31 Daniel Lezcano wrote:
static inline void
rk_timer_disable(struct clock_event_device *ce){ writel_relaxed(TIMER_DISABLE, rk_base(ce) + TIMER_CONTROL_REG);drivers/clocksource/rockchip_timer.c +0
-1-dsb ();
drivers/clocksource/rockchip_timer.c static inline void __iomem *rk_base(struct clock_event_device *ce) · line 60
Quoted 10 lines
drivers/clocksource/rockchip_timer.c +2
-1+dsb (sy); }static inline void rk_timer_enable (struct clock_event_device *ce,u32 flags) {writel_relaxed (TIMER_ENABLE |TIMER_INT_UNMASK | flags,rk_base (ce) +TIMER_CONTROL_REG ); -dsb (); +dsb (sy); }
This will fail the compile test, because dsb() is not available on non-ARM architectures. Would it be enough to just use the normal writel() accessor here?
Arnd
Re: [PATCH 03/22] clocksource/drivers/rockchip: Make the driver more compatible
Quoted 18 lines · Arnd Bergmann
Quoted 6 lines · On Monday 02 November 2015 13:56:31 Daniel Lezcano wrote:
static inline void rk_timer_disable(struct clock_event_device *ce) { writel_relaxed(TIMER_DISABLE, rk_base(ce) + TIMER_CONTROL_REG);drivers/clocksource/rockchip_timer.c +0
-1-dsb ();drivers/clocksource/rockchip_timer.c static inline void __iomem *rk_base(struct clock_event_device *ce) · line 60
Quoted 10 lines
drivers/clocksource/rockchip_timer.c +2
-1+dsb (sy); }static inline void rk_timer_enable (struct clock_event_device *ce,u32 flags) {writel_relaxed (TIMER_ENABLE |TIMER_INT_UNMASK | flags,rk_base (ce) +TIMER_CONTROL_REG ); -dsb (); +dsb (sy); }
Quoted 3 lines
This will fail the compile test, because
dsb()is not available on non-ARM architectures. Would it be enough to just use the normalwritel()accessor here?
That's a good question and I believe we can remove it but I have to setup a rockchip board before doing the changes in order to test.
I the meantime added the COMPILE_TEST option but restricted it to ARM and ARM64.
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
Re: [PATCH 03/22] clocksource/drivers/rockchip: Make the driver more compatible
Quoted 23 lines · On Monday 02 November 2015 17:32:22 Daniel Lezcano wrote:
Quoted 18 lines · Arnd Bergmann
Quoted 6 lines · On Monday 02 November 2015 13:56:31 Daniel Lezcano wrote:
static inline void rk_timer_disable(struct clock_event_device *ce) { writel_relaxed(TIMER_DISABLE, rk_base(ce) + TIMER_CONTROL_REG);drivers/clocksource/rockchip_timer.c +0
-1-dsb ();drivers/clocksource/rockchip_timer.c static inline void __iomem *rk_base(struct clock_event_device *ce) · line 60
Quoted 10 lines
drivers/clocksource/rockchip_timer.c +2
-1+dsb (sy); }static inline void rk_timer_enable (struct clock_event_device *ce,u32 flags) {writel_relaxed (TIMER_ENABLE |TIMER_INT_UNMASK | flags,rk_base (ce) +TIMER_CONTROL_REG ); -dsb (); +dsb (sy); }Quoted 3 lines
This will fail the compile test, because
dsb()is not available on non-ARM architectures. Would it be enough to just use the normalwritel()accessor here?
Quoted 6 lines
That's a good question and I believe we can remove it but I have to setup a rockchip board before doing the changes in order to test.
I the meantime added the
COMPILE_TESToption but restricted it to ARM and ARM64.
Ok. I saw that addition after commenting here, it looks correct this way, I was just slightly confused by seeing patch 2 first and thought it was for the same driver.
In general, it would of course be best to allow all drivers to be built on x86, but your series is already a huge improvement as it is.
Arnd
PATCH 4/22 clocksource/drivers/rockchip: Add COMPILE_TEST option
In reply to Daniel LezcanoIncrease the compilation test coverage by adding the COMPILE_TEST option.
Due to the dsb() usage in the driver, this driver is only compilable on ARM and ARM64.
--- drivers/clocksource/Kconfig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/clocksource/Kconfig +4 -1
@@ -30,8 +30,11 @@ config DW_APB_TIMER_OF select CLKSRC_OF config ROCKCHIP_TIMER - bool + bool "Rockchip timer driver" if COMPILE_TEST + depends on ARM || ARM64 select CLKSRC_OF + help + Enables the support for the rockchip timer driver. config ARMADA_370_XP_TIMER bool
Signature · 1 line
1.9.1
PATCH 5/22 clocksource/drivers/armada-370-xp: Add the COMPILE_TEST option
In reply to Daniel LezcanoIncrease the compilation test coverage by adding the COMPILE_TEST option.
Due to the non portable 'delay' code, the compilation is restricted to the ARM architecture only.
--- drivers/clocksource/Kconfig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/clocksource/Kconfig +4 -1
@@ -37,8 +37,11 @@ config ROCKCHIP_TIMER Enables the support for the rockchip timer driver. config ARMADA_370_XP_TIMER - bool + bool "Armada 370 and XP timer driver" if COMPILE_TEST + depends on ARM select CLKSRC_OF + help + Enables the support for the Armada 370 and XP timer driver. config MESON6_TIMER bool
Signature · 1 line
1.9.1
PATCH 6/22 clocksource/drivers/meson6: Add the COMPILE_TEST option
In reply to Daniel LezcanoIncrease the compilation test coverage by adding the COMPILE_TEST option.
--- drivers/clocksource/Kconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/clocksource/Kconfig +3 -1
@@ -44,8 +44,10 @@ config ARMADA_370_XP_TIMER Enables the support for the Armada 370 and XP timer driver. config MESON6_TIMER - bool + bool "Meson6 timer driver" if COMPILE_TEST select CLKSRC_MMIO + help + Enables the support for the Meson6 timer driver. config ORION_TIMER select CLKSRC_OF
Signature · 1 line
1.9.1
PATCH 7/22 clocksource/drivers/orion: Add the COMPILE_TEST option
In reply to Daniel LezcanoIncrease the compilation test coverage by adding the COMPILE_TEST option.
The driver is using the atomic_io API which is not portable, so the compilation is restricted to ARM only.
--- drivers/clocksource/Kconfig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/clocksource/Kconfig +4 -1
@@ -50,9 +50,12 @@ config MESON6_TIMER Enables the support for the Meson6 timer driver. config ORION_TIMER + bool "Orion timer driver" if COMPILE_TEST + depends on ARM select CLKSRC_OF select CLKSRC_MMIO - bool + help + Enables the support for the Orion timer driver config SUN4I_TIMER select CLKSRC_MMIO
Signature · 1 line
1.9.1
PATCH 8/22 clocksource/drivers/digicolor: Add the COMPILE_TEST option
In reply to Daniel LezcanoIncrease the compilation test coverage by adding the COMPILE_TEST option.
--- drivers/clocksource/Kconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/clocksource/Kconfig +3 -1
@@ -19,7 +19,9 @@ config CLKSRC_MMIO bool config DIGICOLOR_TIMER - bool + bool "Digicolor timer driver" if COMPILE_TEST + help + Enables the support for the digicolor timer driver. config DW_APB_TIMER bool
Signature · 1 line
1.9.1
PATCH 9/22 clocksource/drivers/dw_apb: Add the COMPILE_TEST option
In reply to Daniel LezcanoIncrease the compilation test coverage by adding the COMPILE_TEST option.
--- drivers/clocksource/Kconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/clocksource/Kconfig +3 -1
@@ -24,7 +24,9 @@ config DIGICOLOR_TIMER Enables the support for the digicolor timer driver. config DW_APB_TIMER - bool + bool "DW APB timer driver" if COMPILE_TEST + help + Enables the support for the dw_apb timer. config DW_APB_TIMER_OF bool
Signature · 1 line
1.9.1
PATCH 10/22 clocksource/drivers/sun4i: Add the COMPILE_TEST option
In reply to Daniel LezcanoIncrease the compilation test coverage by adding the COMPILE_TEST option.
--- drivers/clocksource/Kconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/clocksource/Kconfig +3 -1
@@ -62,8 +62,10 @@ config ORION_TIMER Enables the support for the Orion timer driver config SUN4I_TIMER + bool "Sun4i timer driver" if COMPILE_TEST select CLKSRC_MMIO - bool + help + Enables support for the Sun4i timer. config SUN5I_HSTIMER select CLKSRC_MMIO
Signature · 1 line
1.9.1
PATCH 11/22 clocksource/drivers/sun5i: Add the COMPILE_TEST option
In reply to Daniel LezcanoIncrease the compilation test coverage by adding the COMPILE_TEST option.
The driver depends on the common clock framework, thus the dependency added on COMMON_CLK.
--- drivers/clocksource/Kconfig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/clocksource/Kconfig +4 -1
@@ -68,8 +68,11 @@ config SUN4I_TIMER Enables support for the Sun4i timer. config SUN5I_HSTIMER + bool "Sun5i timer driver" if COMPILE_TEST select CLKSRC_MMIO - bool + depends on COMMON_CLK + help + Enables support the Sun5i timer. config TEGRA_TIMER bool
Signature · 1 line
1.9.1
PATCH 12/22 clocksource/drivers/tegra2: Add the COMPILE_TEST option
In reply to Daniel LezcanoIncrease the compilation test coverage by adding the COMPILE_TEST option.
Due to the non portable code for the delay timer, this option is only available for the ARM architecture.
--- drivers/clocksource/Kconfig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/clocksource/Kconfig +4 -1
@@ -75,7 +75,10 @@ config SUN5I_HSTIMER Enables support the Sun5i timer. config TEGRA_TIMER - bool + bool "Tegra timer driver" if COMPILE_TEST + depends on ARM + help + Enables support for the Tegra driver. config VT8500_TIMER bool
Signature · 1 line
1.9.1
PATCH 13/22 clocksource/drivers/vt8500: Remove unneeded header
In reply to Daniel LezcanoRemove the <asm/time.h> header inclusion which is pointless.
--- drivers/clocksource/vt8500_timer.c | 1 - 1 file changed, 1 deletion(-)
drivers/clocksource/vt8500_timer.c +0 -1
@@ -30,7 +30,6 @@#include <linux/clocksource.h> #include <linux/clockchips.h> #include <linux/delay.h> -#include <asm/mach/time.h> #include <linux/of.h> #include <linux/of_address.h>
Signature · 1 line
1.9.1
PATCH 14/22 clocksource/drivers/vt8500: Add the COMPILE_TEST option
In reply to Daniel LezcanoIncrease the compilation test coverage by adding the COMPILE_TEST option.
--- drivers/clocksource/Kconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/clocksource/Kconfig +3 -1
@@ -81,7 +81,9 @@ config TEGRA_TIMER Enables support for the Tegra driver. config VT8500_TIMER - bool + bool "VT8500 timer driver" if COMPILE_TEST + help + Enables support for the VT8500 driver. config CADENCE_TTC_TIMER bool
Signature · 1 line
1.9.1
PATCH 15/22 clocksource/drivers/cadence_ttc: Add the COMPILE_TEST option
In reply to Daniel LezcanoIncrease the compilation test coverage by adding the COMPILE_TEST option.
The driver depends on the common clock framework, thus the dependency added on COMMON_CLK.
--- drivers/clocksource/Kconfig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/clocksource/Kconfig +4 -1
@@ -86,7 +86,10 @@ config VT8500_TIMER Enables support for the VT8500 driver. config CADENCE_TTC_TIMER - bool + bool "Cadence TTC timer driver" if COMPILE_TEST + depends on COMMON_CLK + help + Enables support for the cadence ttc driver. config ASM9260_TIMER bool
Signature · 1 line
1.9.1
PATCH 16/22 clocksource/drivers/asm9260: Add the COMPILE_TEST option
In reply to Daniel LezcanoIncrease the compilation test coverage by adding the COMPILE_TEST option.
--- drivers/clocksource/Kconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/clocksource/Kconfig +3 -1
@@ -92,9 +92,11 @@ config CADENCE_TTC_TIMER Enables support for the cadence ttc driver. config ASM9260_TIMER - bool + bool "ASM9260 timer driver" if COMPILE_TEST select CLKSRC_MMIO select CLKSRC_OF + help + Enables support for the ASM9260 timer. config CLKSRC_NOMADIK_MTU bool
Signature · 1 line
1.9.1
PATCH 17/22 clocksource/drivers/lpc32xx: Add the COMPILE_TEST option
In reply to Daniel LezcanoIncrease the compilation test coverage by adding the COMPILE_TEST option.
--- drivers/clocksource/Kconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/clocksource/Kconfig +3 -1
@@ -137,9 +137,11 @@ config CLKSRC_EFM32 event device. config CLKSRC_LPC32XX - bool + bool "Clocksource for LPC32XX" if COMPILE_TEST select CLKSRC_MMIO select CLKSRC_OF + help + Support for the LPC32XX clocksource. config CLKSRC_PISTACHIO bool "Clocksource for Pistachio SoC" if COMPILE_TEST
Signature · 1 line
1.9.1
PATCH 18/22 clocksource/drivers/nomadik_mtu: Add the COMPILE_TEST option
In reply to Daniel LezcanoIncrease the compilation test coverage by adding the COMPILE_TEST option.
Due to the non portable code for the delay timer, this option is only available for the ARM architecture.
--- drivers/clocksource/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/clocksource/Kconfig +2 -2
@@ -99,8 +99,8 @@ config ASM9260_TIMER Enables support for the ASM9260 timer. config CLKSRC_NOMADIK_MTU - bool - depends on (ARCH_NOMADIK || ARCH_U8500) + bool "Nomakdik clocksource driver" if COMPILE_TEST + depends on ARM select CLKSRC_MMIO help Support for Multi Timer Unit. MTU provides access
Signature · 1 line
1.9.1
PATCH 19/22 clocksource/drivers/prcmu: Fix Kconfig and add COMPILE_TEST option
In reply to Daniel LezcanoLet the platform's Kconfig to select the clock instead of having a reverse dependency from the driver to the platform options.
Add the COMPILE_TEST option for the compilation test coverage.
This change is debatable as the option itself in the Kconfig allows to select the driver for the platform or not. This change will make the prcmu timer always selected.
--- arch/arm/mach-ux500/Kconfig | 1 + drivers/clocksource/Kconfig | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-)
arch/arm/mach-ux500/Kconfig +1 -0
@@ -32,6 +32,7 @@ config UX500_SOC_DB8500 select PINCTRL_AB8540 select REGULATOR select REGULATOR_DB8500_PRCMU + select CLKSRC_DBX500_PRCMU select PM_GENERIC_DOMAINS if PM config MACH_MOP500
drivers/clocksource/Kconfig +1 -3
@@ -114,9 +114,7 @@ config CLKSRC_NOMADIK_MTU_SCHED_CLOCK Use the Multi Timer Unit as the sched_clock. config CLKSRC_DBX500_PRCMU - bool "Clocksource PRCMU Timer" - depends on UX500_SOC_DB8500 - default y + bool "Clocksource PRCMU Timer" if COMPILE_TEST help Use the always on PRCMU Timer as clocksource
Signature · 1 line
1.9.1
Re: [PATCH 19/22] clocksource/drivers/prcmu: Fix Kconfig and add COMPILE_TEST option
Quoted 10 lines · Daniel Lezcano
Let the platform's
Kconfigto select the clock instead of having a reverse dependency from the driver to the platform options.Add the
COMPILE_TESToption for the compilation test coverage.This change is debatable as the option itself in the
Kconfigallows to select the driver for the platform or not. This change will make the prcmu timer always selected.Signed-off-by Daniel Lezcano <[email protected]>
Please merge this into the clksrc tree.
Yours,
Linus Walleij
Re: [PATCH 19/22] clocksource/drivers/prcmu: Fix Kconfig and add COMPILE_TEST option
Quoted 12 lines · Linus Walleij
Quoted 9 lines · Daniel Lezcano
Let the platform's
Kconfigto select the clock instead of having a reverse dependency from the driver to the platform options.Add the
COMPILE_TESToption for the compilation test coverage.This change is debatable as the option itself in the
Kconfigallows to select the driver for the platform or not. This change will make the prcmu timer always selected.
Quoted 5 lines
Quoted 1 line
Signed-off-by Daniel Lezcano <[email protected]>Acked-by Linus Walleij <[email protected]>Please merge this into the clksrc tree.
Thanks for the review.
-- Daniel
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
PATCH 20/22 clocksource/drivers/exynos_mct: Fix Kconfig and add COMPILE_TEST option
In reply to Daniel LezcanoLet the platform's Kconfig to select the clock instead of having a reverse dependency from the driver to the platform options.
Add the COMPILE_TEST option for the compilation test coverage. Due to the non portable 'delay' code, this driver is only compilable on ARM.
--- arch/arm/mach-exynos/Kconfig | 1 + drivers/clocksource/Kconfig | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-)
arch/arm/mach-exynos/Kconfig +1 -0
@@ -27,6 +27,7 @@ menuconfig ARCH_EXYNOS select SRAM select THERMAL select MFD_SYSCON + select CLKSRC_EXYNOS_MCT help Support for SAMSUNG EXYNOS SoCs (EXYNOS4/5)
drivers/clocksource/Kconfig +2 -2
@@ -213,8 +213,8 @@ config CLKSRC_METAG_GENERIC This option enables support for the Meta per-thread timers. config CLKSRC_EXYNOS_MCT - def_bool y if ARCH_EXYNOS - depends on !ARM64 + bool "Exynos multi core timer driver" if COMPILE_TEST + depends on ARM help Support for Multi Core Timer controller on Exynos SoCs.
Signature · 1 line
1.9.1
Re: [PATCH 20/22] clocksource/drivers/exynos_mct: Fix Kconfig and add COMPILE_TEST option
Quoted 2 lines · Daniel Lezcano
Let the platform's
Kconfigto select the clock instead of having a reverse dependency from the driver to the platform options.
Selecting user-visible symbols is rather discouraged so why not something like this:
- def_bool y if ARCH_EXYNOS - depends on !ARM64 + bool "Exynos multi core timer driver" + depends on ARCH_EXYNOS || (COMPILE_TEST && ARM)
Best regards,
Krzysztof
Quoted 38 lines
Add the
COMPILE_TESToption for the compilation test coverage. Due to the non portable 'delay' code, this driver is only compilable on ARM.Signed-off-by Daniel Lezcano <[email protected]>--- arch/arm/mach-exynos/Kconfig | 1 + drivers/clocksource/Kconfig | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-)arch/arm/mach-exynos/Kconfig +1
-0@@ -27,6 +27,7 @@ menuconfig ARCH_EXYNOS select SRAM select THERMAL select MFD_SYSCON + select CLKSRC_EXYNOS_MCT help Support for SAMSUNG EXYNOS SoCs (EXYNOS4/5)drivers/clocksource/Kconfig +2
-2@@ -213,8 +213,8 @@ config CLKSRC_METAG_GENERIC This option enables support for the Meta per-thread timers. config CLKSRC_EXYNOS_MCT - def_bool y if ARCH_EXYNOS - depends on !ARM64 + bool "Exynos multi core timer driver" if COMPILE_TEST + depends on ARM help Support for Multi Core Timer controller on Exynos SoCs.
Re: [PATCH 20/22] clocksource/drivers/exynos_mct: Fix Kconfig and add COMPILE_TEST option
drivers/clocksource/Kconfig config CLKSRC_METAG_GENERIC
Quoted 11 lines · Krzysztof Kozlowski
Quoted 2 lines · Daniel Lezcano
Let the platform's
Kconfigto select the clock instead of having a reverse dependency from the driver to the platform options.Selecting user-visible symbols is rather discouraged so why not something like this:
drivers/clocksource/Kconfig +2
-2- def_bool y if ARCH_EXYNOS - depends on !ARM64 + bool "Exynos multi core timer driver" + depends on ARCH_EXYNOS || (COMPILE_TEST && ARM)
Nope, that was wrong as we loose auto-select on Exynos. Instead:
- def_bool y if ARCH_EXYNOS - depends on !ARM64 + bool "Exynos multi core timer driver" if ARM + depends on ARCH_EXYNOS || COMPILE_TEST + default y if ARCH_EXYNOS
This way we avoid select (which is a reverse dependency for the driver), have it auto-selectable and compile tested on arm.
Best regards,
Krzysztof
Quoted 41 lines
Quoted 39 lines
Add the
COMPILE_TESToption for the compilation test coverage. Due to the non portable 'delay' code, this driver is only compilable on ARM.Signed-off-by Daniel Lezcano <[email protected]>--- arch/arm/mach-exynos/Kconfig | 1 + drivers/clocksource/Kconfig | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-)arch/arm/mach-exynos/Kconfig +1
-0@@ -27,6 +27,7 @@ menuconfig ARCH_EXYNOS select SRAM select THERMAL select MFD_SYSCON + select CLKSRC_EXYNOS_MCT help Support for SAMSUNG EXYNOS SoCs (EXYNOS4/5)drivers/clocksource/Kconfig +2
-2@@ -213,8 +213,8 @@ config CLKSRC_METAG_GENERIC This option enables support for the Meta per-thread timers. config CLKSRC_EXYNOS_MCT - def_bool y if ARCH_EXYNOS - depends on !ARM64 + bool "Exynos multi core timer driver" if COMPILE_TEST + depends on ARM help Support for Multi Core Timer controller on Exynos SoCs.
Re: [PATCH 20/22] clocksource/drivers/exynos_mct: Fix Kconfig and add COMPILE_TEST option
Quoted 20 lines · Krzysztof Kozlowski
drivers/clocksource/Kconfig config CLKSRC_METAG_GENERIC
Quoted 11 lines · Krzysztof Kozlowski
Quoted 2 lines · Daniel Lezcano
Let the platform's
Kconfigto select the clock instead of having a reverse dependency from the driver to the platform options.Selecting user-visible symbols is rather discouraged so why not something like this:
drivers/clocksource/Kconfig +2
-2- def_bool y if ARCH_EXYNOS - depends on !ARM64 + bool "Exynos multi core timer driver" + depends on ARCH_EXYNOS || (COMPILE_TEST && ARM)Nope, that was wrong as we loose auto-select on Exynos. Instead:
(quoted diff) +3
-2- def_bool y if ARCH_EXYNOS - depends on !ARM64 + bool "Exynos multi core timer driver" if ARM + depends on ARCH_EXYNOS || COMPILE_TEST + default y if ARCH_EXYNOS
Quoted 2 lines
This way we avoid select (which is a reverse dependency for the driver), have it auto-selectable and compile tested on arm.
I think you misunderstood the patch I sent.
It does two things:
1. Follow the thumb of rule of the current Kconfig format
- The timer driver is selected by the platform (exynos in this case)
- User can't select the driver in the menuconfig
- There is no dependency on the platform except for compilation test
2. Add the COMPILE_TEST
- User can select the driver for compilation testing. This is for
allyesconfig when doing compilation test coverage (exynos timer could be compiled on other platform). As the delay code is not portable, we have to restrict the compilation on the ARM platform, this is why there is the dependency on ARM.
I am currently looking at splitting the delay code in order to prevent this restriction on this driver and some others drivers.
Quoted 40 lines
Quoted 39 lines
Quoted 37 lines
Add the
COMPILE_TESToption for the compilation test coverage. Due to the non portable 'delay' code, this driver is only compilable on ARM.Signed-off-by Daniel Lezcano <[email protected]>--- arch/arm/mach-exynos/Kconfig | 1 + drivers/clocksource/Kconfig | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-)arch/arm/mach-exynos/Kconfig +1
-0@@ -27,6 +27,7 @@ menuconfig ARCH_EXYNOS select SRAM select THERMAL select MFD_SYSCON + select CLKSRC_EXYNOS_MCT help Support for SAMSUNG EXYNOS SoCs (EXYNOS4/5)drivers/clocksource/Kconfig +2
-2@@ -213,8 +213,8 @@ config CLKSRC_METAG_GENERIC This option enables support for the Meta per-thread timers. config CLKSRC_EXYNOS_MCT - def_bool y if ARCH_EXYNOS - depends on !ARM64 + bool "Exynos multi core timer driver" if COMPILE_TEST + depends on ARM help Support for Multi Core Timer controller on Exynos SoCs.
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
Re: [PATCH 20/22] clocksource/drivers/exynos_mct: Fix Kconfig and add COMPILE_TEST option
Quoted 36 lines · On Tuesday 03 November 2015 09:40:02 Daniel Lezcano wrote:
Quoted 20 lines · Krzysztof Kozlowski
drivers/clocksource/Kconfig config CLKSRC_METAG_GENERIC
Quoted 11 lines · Krzysztof Kozlowski
Quoted 2 lines · Daniel Lezcano
Let the platform's
Kconfigto select the clock instead of having a reverse dependency from the driver to the platform options.Selecting user-visible symbols is rather discouraged so why not something like this:
drivers/clocksource/Kconfig +2
-2- def_bool y if ARCH_EXYNOS - depends on !ARM64 + bool "Exynos multi core timer driver" + depends on ARCH_EXYNOS || (COMPILE_TEST && ARM)Nope, that was wrong as we loose auto-select on Exynos. Instead:
(quoted diff) +3
-2- def_bool y if ARCH_EXYNOS - depends on !ARM64 + bool "Exynos multi core timer driver" if ARM + depends on ARCH_EXYNOS || COMPILE_TEST + default y if ARCH_EXYNOSQuoted 2 lines
This way we avoid select (which is a reverse dependency for the driver), have it auto-selectable and compile tested on arm.
I think you misunderstood the patch I sent.
It does two things:
1. Follow the thumb of rule of the current
Kconfigformat- The timer driver is selected by the platform (exynos in this case)
- User can't select the driver in the menuconfig
- There is no dependency on the platform except for compilation test2. Add the
COMPILE_TEST
Quoted 8 lines
- User can select the driver for compilation testing. This is for
allyesconfig when doing compilation test coverage (exynos timer could be compiled on other platform). As the delay code is not portable, we have to restrict the compilation on the ARM platform, this is why there is the dependency on ARM.I am currently looking at splitting the delay code in order to prevent this restriction on this driver and some others drivers.
I suspect this will come up again in the future. The problem is really that drivers/clocksource has different rules from almost everything else, by requiring the platform to 'select' the driver.
The second version that Krzysztof posted is how we handle this in other driver subsystems, and I would generally prefer it to do this consistently for everything, but John Stultz has in the past argued strongly for using 'select' in all clocksource drivers. The reason is that for each platform we know in advance which driver we want, and there is never a need for the user to have to select the right one.
Arnd
Re: [PATCH 20/22] clocksource/drivers/exynos_mct: Fix Kconfig and add COMPILE_TEST option
Quoted 50 lines · Arnd Bergmann
Quoted 36 lines · On Tuesday 03 November 2015 09:40:02 Daniel Lezcano wrote:
Quoted 20 lines · Krzysztof Kozlowski
drivers/clocksource/Kconfig config CLKSRC_METAG_GENERIC
Quoted 11 lines · Krzysztof Kozlowski
Quoted 2 lines · Daniel Lezcano
Let the platform's
Kconfigto select the clock instead of having a reverse dependency from the driver to the platform options.Selecting user-visible symbols is rather discouraged so why not something like this:
drivers/clocksource/Kconfig +2
-2- def_bool y if ARCH_EXYNOS - depends on !ARM64 + bool "Exynos multi core timer driver" + depends on ARCH_EXYNOS || (COMPILE_TEST && ARM)Nope, that was wrong as we loose auto-select on Exynos. Instead:
(quoted diff) +3
-2- def_bool y if ARCH_EXYNOS - depends on !ARM64 + bool "Exynos multi core timer driver" if ARM + depends on ARCH_EXYNOS || COMPILE_TEST + default y if ARCH_EXYNOSQuoted 2 lines
This way we avoid select (which is a reverse dependency for the driver), have it auto-selectable and compile tested on arm.
I think you misunderstood the patch I sent.
It does two things:
1. Follow the thumb of rule of the current
Kconfigformat- The timer driver is selected by the platform (exynos in this case)
- User can't select the driver in the menuconfig
- There is no dependency on the platform except for compilation test2. Add the
COMPILE_TESTQuoted 8 lines
- User can select the driver for compilation testing. This is for
allyesconfig when doing compilation test coverage (exynos timer could be compiled on other platform). As the delay code is not portable, we have to restrict the compilation on the ARM platform, this is why there is the dependency on ARM.I am currently looking at splitting the delay code in order to prevent this restriction on this driver and some others drivers.
I suspect this will come up again in the future. The problem is really that
drivers/clocksourcehas different rules from almost everything else, by requiring the platform to 'select' the driver.
Quoted 7 lines
The second version that Krzysztof posted is how we handle this in other driver subsystems, and I would generally prefer it to do this consistently for everything, but John Stultz has in the past argued strongly for using 'select' in all clocksource drivers. The reason is that for each platform we know in advance which driver we want, and there is never a need for the user to have to select the right one.
Yes, and I second John in this.
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
Re: [PATCH 20/22] clocksource/drivers/exynos_mct: Fix Kconfig and add COMPILE_TEST option
In reply to Arnd BergmannW dniu 03.11.2015 o 19:02, Arnd Bergmann pisze:
Quoted 50 lines · On Tuesday 03 November 2015 09:40:02 Daniel Lezcano wrote:
Quoted 36 lines · Krzysztof Kozlowski
Quoted 20 lines · Krzysztof Kozlowski
drivers/clocksource/Kconfig config CLKSRC_METAG_GENERIC
Quoted 11 lines · Daniel Lezcano
Quoted 2 lines
Let the platform's
Kconfigto select the clock instead of having a reverse dependency from the driver to the platform options.Selecting user-visible symbols is rather discouraged so why not something like this:
drivers/clocksource/Kconfig +2
-2- def_bool y if ARCH_EXYNOS - depends on !ARM64 + bool "Exynos multi core timer driver" + depends on ARCH_EXYNOS || (COMPILE_TEST && ARM)Nope, that was wrong as we loose auto-select on Exynos. Instead:
(quoted diff) +3
-2- def_bool y if ARCH_EXYNOS - depends on !ARM64 + bool "Exynos multi core timer driver" if ARM + depends on ARCH_EXYNOS || COMPILE_TEST + default y if ARCH_EXYNOSQuoted 2 lines
This way we avoid select (which is a reverse dependency for the driver), have it auto-selectable and compile tested on arm.
I think you misunderstood the patch I sent.
It does two things:
1. Follow the thumb of rule of the current
Kconfigformat- The timer driver is selected by the platform (exynos in this case)
- User can't select the driver in the menuconfig
- There is no dependency on the platform except for compilation test2. Add the
COMPILE_TESTQuoted 8 lines
- User can select the driver for compilation testing. This is for
allyesconfig when doing compilation test coverage (exynos timer could be compiled on other platform). As the delay code is not portable, we have to restrict the compilation on the ARM platform, this is why there is the dependency on ARM.I am currently looking at splitting the delay code in order to prevent this restriction on this driver and some others drivers.
I suspect this will come up again in the future. The problem is really that
drivers/clocksourcehas different rules from almost everything else, by requiring the platform to 'select' the driver.
Quoted 7 lines
The second version that Krzysztof posted is how we handle this in other driver subsystems, and I would generally prefer it to do this consistently for everything, but John Stultz has in the past argued strongly for using 'select' in all clocksource drivers. The reason is that for each platform we know in advance which driver we want, and there is never a need for the user to have to select the right one.
Arnd, Daniel,
Sure, makes sense to me, thanks for explanation. Actually this makes me thinking that drivers/soc/* should probably follow the same convention... but not all of them do that.
Anyway the patch worked fine and with explanation I can only confirm:
Best regards,
Krzysztof
Re: [PATCH 20/22] clocksource/drivers/exynos_mct: Fix Kconfig and add COMPILE_TEST option
Quoted 1 line · Krzysztof Kozlowski
Anyway the patch worked fine and with explanation I can only confirm:
Great ! Thanks Krzysztof for testing.
-- Daniel
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
Re: [PATCH 20/22] clocksource/drivers/exynos_mct: Fix Kconfig and add COMPILE_TEST option
In reply to Arnd BergmannQuoted 11 lines · Arnd Bergmann
I suspect this will come up again in the future. The problem is really that
drivers/clocksourcehas different rules from almost everything else, by requiring the platform to 'select' the driver.The second version that Krzysztof posted is how we handle this in other driver subsystems, and I would generally prefer it to do this consistently for everything, but John Stultz has in the past argued strongly for using 'select' in all clocksource drivers. The reason is that for each platform we know in advance which driver we want, and there is never a need for the user to have to select the right one.
And just to clarify, I don't necessarily think "select" is the right method, as creating an option that defaults to Y if the right architecture/platform support is present is fine too.
I just don't want users to have to search deeply through menuconfig to find a clocksource driver checkbox when they have already selected a platform and provided enough information for us to know which clocksource driver is needed. So my argument its really all about avoiding user-prompts in kconfig for clocksources. It is conceptually easier to do this w/ select, but you can also do it via default y and proper dependencies.
thanks
-john
Re: [PATCH 20/22] clocksource/drivers/exynos_mct: Fix Kconfig and add COMPILE_TEST option
In reply to Daniel LezcanoHi,
Quoted 30 lines · Daniel Lezcano
Let the platform's
Kconfigto select the clock instead of having a reverse dependency from the driver to the platform options.Add the
COMPILE_TESToption for the compilation test coverage. Due to the non portable 'delay' code, this driver is only compilable on ARM.Signed-off-by Daniel Lezcano <[email protected]>--- arch/arm/mach-exynos/Kconfig | 1 + drivers/clocksource/Kconfig | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-)arch/arm/mach-exynos/Kconfig +1
-0@@ -27,6 +27,7 @@ menuconfig ARCH_EXYNOS select SRAM select THERMAL select MFD_SYSCON + select CLKSRC_EXYNOS_MCT help Support for SAMSUNG EXYNOS SoCs (EXYNOS4/5)drivers/clocksource/Kconfig +0
-0
drivers/clocksource/Kconfig config CLKSRC_METAG_GENERIC · line 220
Quoted 10 lines
drivers/clocksource/Kconfig +2
-2@@ -213,8 +213,8 @@ config CLKSRC_METAG_GENERIC This option enables support for the Meta per-thread timers. config CLKSRC_EXYNOS_MCT - def_bool y if ARCH_EXYNOS - depends on !ARM64 + bool "Exynos multi core timer driver" if COMPILE_TEST + depends on ARM help Support for Multi Core Timer controller on Exynos SoCs.
Looks good to me. As you commented, delay_timer is only used on ARM 32bit. I'm glad to use the 'depends on ARM' instead of reverse dependency.
Thanks,
Chanwoo Choi
PATCH 21/22 clocksource/drivers/samsung-pwm: Add the COMPILE_TEST option
In reply to Daniel LezcanoIncrease the compilation test coverage by adding the COMPILE_TEST option.
--- drivers/clocksource/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clocksource/Kconfig +1 -1
@@ -219,7 +219,7 @@ config CLKSRC_EXYNOS_MCT Support for Multi Core Timer controller on Exynos SoCs. config CLKSRC_SAMSUNG_PWM - bool + bool "PWM timer drvier for Samsung S3C, S5P" if COMPILE_TEST help This is a new clocksource driver for the PWM timer found in Samsung S3C, S5P and Exynos SoCs, replacing an earlier driver
Signature · 1 line
1.9.1
PATCH 22/22 clocksource/drivers/fsl-ftm: Add the COMPILE_TEST option
In reply to Daniel LezcanoIncrease the compilation test coverage by adding the COMPILE_TEST option.
--- drivers/clocksource/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clocksource/Kconfig +1 -1
@@ -227,7 +227,7 @@ config CLKSRC_SAMSUNG_PWM needed only on systems that do not have the Exynos MCT available. config FSL_FTM_TIMER - bool + bool "Freescale FlexTimer Module driver" if COMPILE_TEST help Support for Freescale FlexTimer Module (FTM) timer.
Signature · 1 line
1.9.1