diff mbox

[01/22] clocksource/drivers/pistachio: Add the COMPILE_TEST option

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

Commit Message

Daniel Lezcano Nov. 2, 2015, 12:56 p.m. UTC
Increase the compilation test coverage by adding the COMPILE_TEST option.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>

---
 drivers/clocksource/Kconfig | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Comments

Daniel Lezcano Nov. 2, 2015, 4:32 p.m. UTC | #1
On 11/02/2015 04:33 PM, Arnd Bergmann wrote:
> 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);

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

>>   }

>>

>>

>

> 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?


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.



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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
John Stultz Nov. 3, 2015, 3:18 p.m. UTC | #2
On Tue, Nov 3, 2015 at 2:02 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> 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.


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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
diff mbox

Patch

diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
index 26f659e..a1c9312 100644
--- a/drivers/clocksource/Kconfig
+++ b/drivers/clocksource/Kconfig
@@ -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