linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/7] time: Define dummy functions for the generic sched clock
@ 2015-10-29 22:52 Daniel Lezcano
  2015-10-29 22:52 ` [PATCH 2/7] clocksource/drivers/qcom: Make COMPILE_TEST enabled for ARM architecture Daniel Lezcano
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Daniel Lezcano @ 2015-10-29 22:52 UTC (permalink / raw)
  To: tglx; +Cc: john.stultz, linux-kernel

When we try to compile a clocksource driver with the COMPILE_TEST option, we
can't select the GENERIC_SCHED_CLOCK because the sched_clock() symbol will be
duplicated with the one defined for the x86.

In order to fix that, we don't select the GENERIC_SCHED_CLOCK in the driver
Kconfig's file but we define some empty functions for the different symbols
in order to prevent the unresolved ones.

This patch fixes the COMPILE_TEST option for the compile test coverage for the
clocksource drivers. Without this patch, we can't add the COMPILE_TEST option
for the clocksource drivers using the GENERIC_SCHED_CLOCK.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 include/linux/sched_clock.h | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/include/linux/sched_clock.h b/include/linux/sched_clock.h
index efa931c..b2ec7bb 100644
--- a/include/linux/sched_clock.h
+++ b/include/linux/sched_clock.h
@@ -10,11 +10,17 @@
 
 #ifdef CONFIG_GENERIC_SCHED_CLOCK
 extern void sched_clock_postinit(void);
+
+extern void sched_clock_register(u64 (*read)(void), int bits,
+                                 unsigned long rate);
 #else
 static inline void sched_clock_postinit(void) { }
-#endif
 
-extern void sched_clock_register(u64 (*read)(void), int bits,
-				 unsigned long rate);
+static inline void sched_clock_register(u64 (*read)(void), int bits,
+					 unsigned long rate)
+{
+	;
+}
+#endif
 
 #endif
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/7] clocksource/drivers/qcom: Make COMPILE_TEST enabled for ARM architecture
  2015-10-29 22:52 [PATCH 1/7] time: Define dummy functions for the generic sched clock Daniel Lezcano
@ 2015-10-29 22:52 ` Daniel Lezcano
  2015-10-29 22:52 ` [PATCH 3/7] clocksource/drivers/st_lpc: Fix Kconfig dependency Daniel Lezcano
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Daniel Lezcano @ 2015-10-29 22:52 UTC (permalink / raw)
  To: tglx; +Cc: john.stultz, linux-kernel

In order to be consistent with the rest of the drivers compilation, let's
introduce the COMPILE_TEST option. Unfortunately, the delay.h code is not
portable, so the compilation test coverage will be restricted to the ARM
architecture.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 drivers/clocksource/Kconfig | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
index 50b68bc..d9e263c 100644
--- a/drivers/clocksource/Kconfig
+++ b/drivers/clocksource/Kconfig
@@ -261,7 +261,12 @@ config EM_TIMER_STI
 	  such as EMEV2 from former NEC Electronics.
 
 config CLKSRC_QCOM
-	bool
+	bool "Qualcomm MSM timer" if COMPILE_TEST
+	depends on ARM
+	select CLKSRC_OF
+	help
+	  This enables the clocksource and the per CPU clockevent driver for the
+	  Qualcomm SoCs.
 
 config CLKSRC_VERSATILE
 	bool "ARM Versatile (Express) reference platforms clock source"
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 3/7] clocksource/drivers/st_lpc: Fix Kconfig dependency
  2015-10-29 22:52 [PATCH 1/7] time: Define dummy functions for the generic sched clock Daniel Lezcano
  2015-10-29 22:52 ` [PATCH 2/7] clocksource/drivers/qcom: Make COMPILE_TEST enabled for ARM architecture Daniel Lezcano
@ 2015-10-29 22:52 ` Daniel Lezcano
  2015-10-30  8:51   ` Maxime Coquelin
  2015-10-29 22:52 ` [PATCH 4/7] clocksource/drivers/st_lpc: Add the COMPILE_TEST option Daniel Lezcano
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 9+ messages in thread
From: Daniel Lezcano @ 2015-10-29 22:52 UTC (permalink / raw)
  To: tglx
  Cc: john.stultz, linux-kernel, Srinivas Kandagatla, Maxime Coquelin,
	Patrice Chotard, Russell King,
	moderated list:ARM/STI ARCHITECTURE,
	open list:ARM/STI ARCHITECTURE

Change the Kconfig selection rule by letting the STI arch to select
the timer.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 arch/arm/mach-sti/Kconfig   | 1 +
 drivers/clocksource/Kconfig | 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-sti/Kconfig b/arch/arm/mach-sti/Kconfig
index 125865d..12dd1dc 100644
--- a/arch/arm/mach-sti/Kconfig
+++ b/arch/arm/mach-sti/Kconfig
@@ -3,6 +3,7 @@ menuconfig ARCH_STI
 	select ARM_GIC
 	select ST_IRQCHIP
 	select ARM_GLOBAL_TIMER
+	select CLKSRC_ST_LPC
 	select PINCTRL
 	select PINCTRL_ST
 	select MFD_SYSCON
diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
index d9e263c..233c1f7 100644
--- a/drivers/clocksource/Kconfig
+++ b/drivers/clocksource/Kconfig
@@ -308,7 +308,6 @@ config CLKSRC_IMX_GPT
 
 config CLKSRC_ST_LPC
 	bool
-	depends on ARCH_STI
 	select CLKSRC_OF if OF
 	help
 	  Enable this option to use the Low Power controller timer
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 4/7] clocksource/drivers/st_lpc: Add the COMPILE_TEST option
  2015-10-29 22:52 [PATCH 1/7] time: Define dummy functions for the generic sched clock Daniel Lezcano
  2015-10-29 22:52 ` [PATCH 2/7] clocksource/drivers/qcom: Make COMPILE_TEST enabled for ARM architecture Daniel Lezcano
  2015-10-29 22:52 ` [PATCH 3/7] clocksource/drivers/st_lpc: Fix Kconfig dependency Daniel Lezcano
@ 2015-10-29 22:52 ` Daniel Lezcano
  2015-10-29 22:52 ` [PATCH 5/7] clocksource/drivers/pxa_timer: Move the Kconfig rule Daniel Lezcano
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Daniel Lezcano @ 2015-10-29 22:52 UTC (permalink / raw)
  To: tglx; +Cc: john.stultz, linux-kernel

Increase the compilation test coverage by adding the COMPILE_TEST option.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 drivers/clocksource/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
index 233c1f7..5cd000c 100644
--- a/drivers/clocksource/Kconfig
+++ b/drivers/clocksource/Kconfig
@@ -307,7 +307,7 @@ config CLKSRC_IMX_GPT
 	select CLKSRC_MMIO
 
 config CLKSRC_ST_LPC
-	bool
+	bool "Low power clocksource found in the LPC" if COMPILE_TEST
 	select CLKSRC_OF if OF
 	help
 	  Enable this option to use the Low Power controller timer
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 5/7] clocksource/drivers/pxa_timer: Move the Kconfig rule
  2015-10-29 22:52 [PATCH 1/7] time: Define dummy functions for the generic sched clock Daniel Lezcano
                   ` (2 preceding siblings ...)
  2015-10-29 22:52 ` [PATCH 4/7] clocksource/drivers/st_lpc: Add the COMPILE_TEST option Daniel Lezcano
@ 2015-10-29 22:52 ` Daniel Lezcano
  2015-10-29 22:52 ` [PATCH 6/7] clocksource/drivers/pxa_timer: Add the COMPILE_TEST option Daniel Lezcano
  2015-10-29 22:52 ` [PATCH 7/7] clocksource/drivers/tango: Add " Daniel Lezcano
  5 siblings, 0 replies; 9+ messages in thread
From: Daniel Lezcano @ 2015-10-29 22:52 UTC (permalink / raw)
  To: tglx; +Cc: john.stultz, linux-kernel, Russell King, moderated list:ARM PORT

Instead of having the clocksource's Kconfig depending on the arch, let the
arch to select the timer it needs.

The CLKSRC_OF dependency is removed because already selected by the ARCH_PXA,
and it is added for SA1100.

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

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 72ad724..aa32286 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -609,6 +609,7 @@ config ARCH_PXA
 	select AUTO_ZRELADDR
 	select COMMON_CLK
 	select CLKDEV_LOOKUP
+	select CLKSRC_PXA
 	select CLKSRC_MMIO
 	select CLKSRC_OF
 	select GENERIC_CLOCKEVENTS
@@ -669,6 +670,8 @@ config ARCH_SA1100
 	select ARCH_SPARSEMEM_ENABLE
 	select CLKDEV_LOOKUP
 	select CLKSRC_MMIO
+	select CLKSRC_PXA
+	select CLKSRC_OF if OF
 	select CPU_FREQ
 	select CPU_SA1100
 	select GENERIC_CLOCKEVENTS
diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
index 5cd000c..425abbd 100644
--- a/drivers/clocksource/Kconfig
+++ b/drivers/clocksource/Kconfig
@@ -289,8 +289,7 @@ config CLKSRC_TANGO_XTAL
 	select CLKSRC_OF
 
 config CLKSRC_PXA
-	def_bool y if ARCH_PXA || ARCH_SA1100
-	select CLKSRC_OF if OF
+	bool
 	help
 	  This enables OST0 support available on PXA and SA-11x0
 	  platforms.
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 6/7] clocksource/drivers/pxa_timer: Add the COMPILE_TEST option
  2015-10-29 22:52 [PATCH 1/7] time: Define dummy functions for the generic sched clock Daniel Lezcano
                   ` (3 preceding siblings ...)
  2015-10-29 22:52 ` [PATCH 5/7] clocksource/drivers/pxa_timer: Move the Kconfig rule Daniel Lezcano
@ 2015-10-29 22:52 ` Daniel Lezcano
  2015-10-30  6:12   ` kbuild test robot
  2015-10-29 22:52 ` [PATCH 7/7] clocksource/drivers/tango: Add " Daniel Lezcano
  5 siblings, 1 reply; 9+ messages in thread
From: Daniel Lezcano @ 2015-10-29 22:52 UTC (permalink / raw)
  To: tglx; +Cc: john.stultz, linux-kernel

Increase the compilation test coverage by adding the COMPILE_TEST option.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 drivers/clocksource/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
index 425abbd..b92f39d5 100644
--- a/drivers/clocksource/Kconfig
+++ b/drivers/clocksource/Kconfig
@@ -289,7 +289,8 @@ config CLKSRC_TANGO_XTAL
 	select CLKSRC_OF
 
 config CLKSRC_PXA
-	bool
+	bool "Clocksource for PXA or SA-11x0 platform" if COMPILE_TEST
+	select CLKSRC_MMIO
 	help
 	  This enables OST0 support available on PXA and SA-11x0
 	  platforms.
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 7/7] clocksource/drivers/tango: Add COMPILE_TEST option
  2015-10-29 22:52 [PATCH 1/7] time: Define dummy functions for the generic sched clock Daniel Lezcano
                   ` (4 preceding siblings ...)
  2015-10-29 22:52 ` [PATCH 6/7] clocksource/drivers/pxa_timer: Add the COMPILE_TEST option Daniel Lezcano
@ 2015-10-29 22:52 ` Daniel Lezcano
  5 siblings, 0 replies; 9+ messages in thread
From: Daniel Lezcano @ 2015-10-29 22:52 UTC (permalink / raw)
  To: tglx; +Cc: john.stultz, linux-kernel

Increase the compilation test coverage by adding the COMPILE_TEST option.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 drivers/clocksource/Kconfig | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
index b92f39d5..4ed76e1 100644
--- a/drivers/clocksource/Kconfig
+++ b/drivers/clocksource/Kconfig
@@ -285,8 +285,11 @@ config CLKSRC_MIPS_GIC
 	select CLKSRC_OF
 
 config CLKSRC_TANGO_XTAL
-	bool
+	bool "Clocksource for Tango SoC" if COMPILE_TEST
+	depends on ARM
 	select CLKSRC_OF
+	help
+	  This enables the clocksource for Tango SoC
 
 config CLKSRC_PXA
 	bool "Clocksource for PXA or SA-11x0 platform" if COMPILE_TEST
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 6/7] clocksource/drivers/pxa_timer: Add the COMPILE_TEST option
  2015-10-29 22:52 ` [PATCH 6/7] clocksource/drivers/pxa_timer: Add the COMPILE_TEST option Daniel Lezcano
@ 2015-10-30  6:12   ` kbuild test robot
  0 siblings, 0 replies; 9+ messages in thread
From: kbuild test robot @ 2015-10-30  6:12 UTC (permalink / raw)
  To: Daniel Lezcano; +Cc: kbuild-all, tglx, john.stultz, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 20216 bytes --]

Hi Daniel,

[auto build test ERROR on tip/timers/core -- if it's inappropriate base, please suggest rules for selecting the more suitable base]

url:    https://github.com/0day-ci/linux/commits/Daniel-Lezcano/time-Define-dummy-functions-for-the-generic-sched-clock/20151030-065823
config: parisc-allyesconfig (attached as .config)
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=parisc 

All error/warnings (new ones prefixed by >>):

   drivers/clocksource/pxa_timer.c: In function 'pxa_ost0_interrupt':
>> drivers/clocksource/pxa_timer.c:73:3: error: dereferencing pointer to incomplete type
     c->event_handler(c);
      ^
   drivers/clocksource/pxa_timer.c: At top level:
>> drivers/clocksource/pxa_timer.c:79:54: warning: 'struct clock_event_device' declared inside parameter list
    pxa_osmr0_set_next_event(unsigned long delta, struct clock_event_device *dev)
                                                         ^
>> drivers/clocksource/pxa_timer.c:79:54: warning: its scope is only this definition or declaration, which is probably not what you want
   drivers/clocksource/pxa_timer.c:91:38: warning: 'struct clock_event_device' declared inside parameter list
    static int pxa_osmr0_shutdown(struct clock_event_device *evt)
                                         ^
>> drivers/clocksource/pxa_timer.c:135:15: error: variable 'ckevt_pxa_osmr0' has initializer but incomplete type
    static struct clock_event_device ckevt_pxa_osmr0 = {
                  ^
>> drivers/clocksource/pxa_timer.c:136:2: error: unknown field 'name' specified in initializer
     .name   = "osmr0",
     ^
>> drivers/clocksource/pxa_timer.c:136:2: warning: excess elements in struct initializer
   drivers/clocksource/pxa_timer.c:136:2: warning: (near initialization for 'ckevt_pxa_osmr0')
>> drivers/clocksource/pxa_timer.c:137:2: error: unknown field 'features' specified in initializer
     .features  = CLOCK_EVT_FEAT_ONESHOT,
     ^
>> drivers/clocksource/pxa_timer.c:137:15: error: 'CLOCK_EVT_FEAT_ONESHOT' undeclared here (not in a function)
     .features  = CLOCK_EVT_FEAT_ONESHOT,
                  ^
   drivers/clocksource/pxa_timer.c:137:2: warning: excess elements in struct initializer
     .features  = CLOCK_EVT_FEAT_ONESHOT,
     ^
   drivers/clocksource/pxa_timer.c:137:2: warning: (near initialization for 'ckevt_pxa_osmr0')
>> drivers/clocksource/pxa_timer.c:138:2: error: unknown field 'rating' specified in initializer
     .rating   = 200,
     ^
   drivers/clocksource/pxa_timer.c:138:2: warning: excess elements in struct initializer
   drivers/clocksource/pxa_timer.c:138:2: warning: (near initialization for 'ckevt_pxa_osmr0')
>> drivers/clocksource/pxa_timer.c:139:2: error: unknown field 'set_next_event' specified in initializer
     .set_next_event  = pxa_osmr0_set_next_event,
     ^
   drivers/clocksource/pxa_timer.c:139:2: warning: excess elements in struct initializer
   drivers/clocksource/pxa_timer.c:139:2: warning: (near initialization for 'ckevt_pxa_osmr0')
>> drivers/clocksource/pxa_timer.c:140:2: error: unknown field 'set_state_shutdown' specified in initializer
     .set_state_shutdown = pxa_osmr0_shutdown,
     ^
   drivers/clocksource/pxa_timer.c:140:2: warning: excess elements in struct initializer
   drivers/clocksource/pxa_timer.c:140:2: warning: (near initialization for 'ckevt_pxa_osmr0')
>> drivers/clocksource/pxa_timer.c:141:2: error: unknown field 'set_state_oneshot' specified in initializer
     .set_state_oneshot = pxa_osmr0_shutdown,
     ^
   drivers/clocksource/pxa_timer.c:141:2: warning: excess elements in struct initializer
   drivers/clocksource/pxa_timer.c:141:2: warning: (near initialization for 'ckevt_pxa_osmr0')
>> drivers/clocksource/pxa_timer.c:142:2: error: unknown field 'suspend' specified in initializer
     .suspend  = pxa_timer_suspend,
     ^
   drivers/clocksource/pxa_timer.c:142:2: warning: excess elements in struct initializer
   drivers/clocksource/pxa_timer.c:142:2: warning: (near initialization for 'ckevt_pxa_osmr0')
>> drivers/clocksource/pxa_timer.c:143:2: error: unknown field 'resume' specified in initializer
     .resume   = pxa_timer_resume,
     ^
   drivers/clocksource/pxa_timer.c:143:2: warning: excess elements in struct initializer
   drivers/clocksource/pxa_timer.c:143:2: warning: (near initialization for 'ckevt_pxa_osmr0')
   drivers/clocksource/pxa_timer.c: In function 'pxa_timer_common_init':
>> drivers/clocksource/pxa_timer.c:160:2: error: invalid use of undefined type 'struct clock_event_device'
     ckevt_pxa_osmr0.cpumask = cpumask_of(0);
     ^
>> drivers/clocksource/pxa_timer.c:164:2: error: implicit declaration of function 'clocksource_mmio_init' [-Werror=implicit-function-declaration]
     clocksource_mmio_init(timer_base + OSCR, "oscr0", clock_tick_rate, 200,
     ^
>> drivers/clocksource/pxa_timer.c:165:14: error: 'clocksource_mmio_readl_up' undeclared (first use in this function)
             32, clocksource_mmio_readl_up);
                 ^
   drivers/clocksource/pxa_timer.c:165:14: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/clocksource/pxa_timer.c:166:2: error: implicit declaration of function 'clockevents_config_and_register' [-Werror=implicit-function-declaration]
     clockevents_config_and_register(&ckevt_pxa_osmr0, clock_tick_rate,
     ^
   drivers/clocksource/pxa_timer.c: At top level:
>> drivers/clocksource/pxa_timer.c:196:35: error: expected ')' before string constant
    CLOCKSOURCE_OF_DECLARE(pxa_timer, "marvell,pxa-timer", pxa_timer_dt_init);
                                      ^
   drivers/clocksource/pxa_timer.c:170:20: warning: 'pxa_timer_dt_init' defined but not used [-Wunused-function]
    static void __init pxa_timer_dt_init(struct device_node *np)
                       ^
   cc1: some warnings being treated as errors

vim +73 drivers/clocksource/pxa_timer.c

^1da177e arch/arm/mach-pxa/time.c        Linus Torvalds     2005-04-16   67  {
7bbb18c9 arch/arm/mach-pxa/time.c        Bill Gatliff       2007-07-21   68  	struct clock_event_device *c = dev_id;
7bbb18c9 arch/arm/mach-pxa/time.c        Bill Gatliff       2007-07-21   69  
7bbb18c9 arch/arm/mach-pxa/time.c        Bill Gatliff       2007-07-21   70  	/* Disarm the compare/match, signal the event. */
ab5354c4 drivers/clocksource/pxa_timer.c Robert Jarzmik     2014-07-14   71  	timer_writel(timer_readl(OIER) & ~OIER_E0, OIER);
ab5354c4 drivers/clocksource/pxa_timer.c Robert Jarzmik     2014-07-14   72  	timer_writel(OSSR_M0, OSSR);
7bbb18c9 arch/arm/mach-pxa/time.c        Bill Gatliff       2007-07-21  @73  	c->event_handler(c);
^1da177e arch/arm/mach-pxa/time.c        Linus Torvalds     2005-04-16   74  
^1da177e arch/arm/mach-pxa/time.c        Linus Torvalds     2005-04-16   75  	return IRQ_HANDLED;
^1da177e arch/arm/mach-pxa/time.c        Linus Torvalds     2005-04-16   76  }
^1da177e arch/arm/mach-pxa/time.c        Linus Torvalds     2005-04-16   77  
7bbb18c9 arch/arm/mach-pxa/time.c        Bill Gatliff       2007-07-21   78  static int
7bbb18c9 arch/arm/mach-pxa/time.c        Bill Gatliff       2007-07-21  @79  pxa_osmr0_set_next_event(unsigned long delta, struct clock_event_device *dev)
7bbb18c9 arch/arm/mach-pxa/time.c        Bill Gatliff       2007-07-21   80  {
a602f0f2 arch/arm/mach-pxa/time.c        Uwe Kleine-König   2009-12-17   81  	unsigned long next, oscr;
7bbb18c9 arch/arm/mach-pxa/time.c        Bill Gatliff       2007-07-21   82  
ab5354c4 drivers/clocksource/pxa_timer.c Robert Jarzmik     2014-07-14   83  	timer_writel(timer_readl(OIER) | OIER_E0, OIER);
ab5354c4 drivers/clocksource/pxa_timer.c Robert Jarzmik     2014-07-14   84  	next = timer_readl(OSCR) + delta;
ab5354c4 drivers/clocksource/pxa_timer.c Robert Jarzmik     2014-07-14   85  	timer_writel(next, OSMR0);
ab5354c4 drivers/clocksource/pxa_timer.c Robert Jarzmik     2014-07-14   86  	oscr = timer_readl(OSCR);
91bc51d8 arch/arm/mach-pxa/time.c        Russell King       2007-11-08   87  
91bc51d8 arch/arm/mach-pxa/time.c        Russell King       2007-11-08   88  	return (signed)(next - oscr) <= MIN_OSCR_DELTA ? -ETIME : 0;
7bbb18c9 arch/arm/mach-pxa/time.c        Bill Gatliff       2007-07-21   89  }
7bbb18c9 arch/arm/mach-pxa/time.c        Bill Gatliff       2007-07-21   90  
47d490ea drivers/clocksource/pxa_timer.c Viresh Kumar       2015-06-18  @91  static int pxa_osmr0_shutdown(struct clock_event_device *evt)
7bbb18c9 arch/arm/mach-pxa/time.c        Bill Gatliff       2007-07-21   92  {
7bbb18c9 arch/arm/mach-pxa/time.c        Bill Gatliff       2007-07-21   93  	/* initializing, released, or preparing for suspend */
ab5354c4 drivers/clocksource/pxa_timer.c Robert Jarzmik     2014-07-14   94  	timer_writel(timer_readl(OIER) & ~OIER_E0, OIER);
ab5354c4 drivers/clocksource/pxa_timer.c Robert Jarzmik     2014-07-14   95  	timer_writel(OSSR_M0, OSSR);
47d490ea drivers/clocksource/pxa_timer.c Viresh Kumar       2015-06-18   96  	return 0;
7bbb18c9 arch/arm/mach-pxa/time.c        Bill Gatliff       2007-07-21   97  }
7bbb18c9 arch/arm/mach-pxa/time.c        Bill Gatliff       2007-07-21   98  
5b30d5bf arch/arm/mach-pxa/time.c        Stephen Warren     2012-11-07   99  #ifdef CONFIG_PM
5b30d5bf arch/arm/mach-pxa/time.c        Stephen Warren     2012-11-07  100  static unsigned long osmr[4], oier, oscr;
5b30d5bf arch/arm/mach-pxa/time.c        Stephen Warren     2012-11-07  101  
5b30d5bf arch/arm/mach-pxa/time.c        Stephen Warren     2012-11-07  102  static void pxa_timer_suspend(struct clock_event_device *cedev)
5b30d5bf arch/arm/mach-pxa/time.c        Stephen Warren     2012-11-07  103  {
ab5354c4 drivers/clocksource/pxa_timer.c Robert Jarzmik     2014-07-14  104  	osmr[0] = timer_readl(OSMR0);
ab5354c4 drivers/clocksource/pxa_timer.c Robert Jarzmik     2014-07-14  105  	osmr[1] = timer_readl(OSMR1);
ab5354c4 drivers/clocksource/pxa_timer.c Robert Jarzmik     2014-07-14  106  	osmr[2] = timer_readl(OSMR2);
ab5354c4 drivers/clocksource/pxa_timer.c Robert Jarzmik     2014-07-14  107  	osmr[3] = timer_readl(OSMR3);
ab5354c4 drivers/clocksource/pxa_timer.c Robert Jarzmik     2014-07-14  108  	oier = timer_readl(OIER);
ab5354c4 drivers/clocksource/pxa_timer.c Robert Jarzmik     2014-07-14  109  	oscr = timer_readl(OSCR);
5b30d5bf arch/arm/mach-pxa/time.c        Stephen Warren     2012-11-07  110  }
5b30d5bf arch/arm/mach-pxa/time.c        Stephen Warren     2012-11-07  111  
5b30d5bf arch/arm/mach-pxa/time.c        Stephen Warren     2012-11-07  112  static void pxa_timer_resume(struct clock_event_device *cedev)
5b30d5bf arch/arm/mach-pxa/time.c        Stephen Warren     2012-11-07  113  {
5b30d5bf arch/arm/mach-pxa/time.c        Stephen Warren     2012-11-07  114  	/*
5b30d5bf arch/arm/mach-pxa/time.c        Stephen Warren     2012-11-07  115  	 * Ensure that we have at least MIN_OSCR_DELTA between match
5b30d5bf arch/arm/mach-pxa/time.c        Stephen Warren     2012-11-07  116  	 * register 0 and the OSCR, to guarantee that we will receive
5b30d5bf arch/arm/mach-pxa/time.c        Stephen Warren     2012-11-07  117  	 * the one-shot timer interrupt.  We adjust OSMR0 in preference
5b30d5bf arch/arm/mach-pxa/time.c        Stephen Warren     2012-11-07  118  	 * to OSCR to guarantee that OSCR is monotonically incrementing.
5b30d5bf arch/arm/mach-pxa/time.c        Stephen Warren     2012-11-07  119  	 */
5b30d5bf arch/arm/mach-pxa/time.c        Stephen Warren     2012-11-07  120  	if (osmr[0] - oscr < MIN_OSCR_DELTA)
5b30d5bf arch/arm/mach-pxa/time.c        Stephen Warren     2012-11-07  121  		osmr[0] += MIN_OSCR_DELTA;
5b30d5bf arch/arm/mach-pxa/time.c        Stephen Warren     2012-11-07  122  
ab5354c4 drivers/clocksource/pxa_timer.c Robert Jarzmik     2014-07-14  123  	timer_writel(osmr[0], OSMR0);
ab5354c4 drivers/clocksource/pxa_timer.c Robert Jarzmik     2014-07-14  124  	timer_writel(osmr[1], OSMR1);
ab5354c4 drivers/clocksource/pxa_timer.c Robert Jarzmik     2014-07-14  125  	timer_writel(osmr[2], OSMR2);
ab5354c4 drivers/clocksource/pxa_timer.c Robert Jarzmik     2014-07-14  126  	timer_writel(osmr[3], OSMR3);
ab5354c4 drivers/clocksource/pxa_timer.c Robert Jarzmik     2014-07-14  127  	timer_writel(oier, OIER);
ab5354c4 drivers/clocksource/pxa_timer.c Robert Jarzmik     2014-07-14  128  	timer_writel(oscr, OSCR);
5b30d5bf arch/arm/mach-pxa/time.c        Stephen Warren     2012-11-07  129  }
5b30d5bf arch/arm/mach-pxa/time.c        Stephen Warren     2012-11-07  130  #else
5b30d5bf arch/arm/mach-pxa/time.c        Stephen Warren     2012-11-07  131  #define pxa_timer_suspend NULL
5b30d5bf arch/arm/mach-pxa/time.c        Stephen Warren     2012-11-07  132  #define pxa_timer_resume NULL
5b30d5bf arch/arm/mach-pxa/time.c        Stephen Warren     2012-11-07  133  #endif
5b30d5bf arch/arm/mach-pxa/time.c        Stephen Warren     2012-11-07  134  
7bbb18c9 arch/arm/mach-pxa/time.c        Bill Gatliff       2007-07-21 @135  static struct clock_event_device ckevt_pxa_osmr0 = {
7bbb18c9 arch/arm/mach-pxa/time.c        Bill Gatliff       2007-07-21 @136  	.name			= "osmr0",
a88264c2 arch/arm/mach-pxa/time.c        Russell King       2007-11-12 @137  	.features		= CLOCK_EVT_FEAT_ONESHOT,
7bbb18c9 arch/arm/mach-pxa/time.c        Bill Gatliff       2007-07-21 @138  	.rating			= 200,
7bbb18c9 arch/arm/mach-pxa/time.c        Bill Gatliff       2007-07-21 @139  	.set_next_event		= pxa_osmr0_set_next_event,
47d490ea drivers/clocksource/pxa_timer.c Viresh Kumar       2015-06-18 @140  	.set_state_shutdown	= pxa_osmr0_shutdown,
47d490ea drivers/clocksource/pxa_timer.c Viresh Kumar       2015-06-18 @141  	.set_state_oneshot	= pxa_osmr0_shutdown,
5b30d5bf arch/arm/mach-pxa/time.c        Stephen Warren     2012-11-07 @142  	.suspend		= pxa_timer_suspend,
5b30d5bf arch/arm/mach-pxa/time.c        Stephen Warren     2012-11-07 @143  	.resume			= pxa_timer_resume,
^1da177e arch/arm/mach-pxa/time.c        Linus Torvalds     2005-04-16  144  };
^1da177e arch/arm/mach-pxa/time.c        Linus Torvalds     2005-04-16  145  
7bbb18c9 arch/arm/mach-pxa/time.c        Bill Gatliff       2007-07-21  146  static struct irqaction pxa_ost0_irq = {
7bbb18c9 arch/arm/mach-pxa/time.c        Bill Gatliff       2007-07-21  147  	.name		= "ost0",
ed7936f9 arch/arm/mach-pxa/time.c        Michael Opdenacker 2013-12-09  148  	.flags		= IRQF_TIMER | IRQF_IRQPOLL,
7bbb18c9 arch/arm/mach-pxa/time.c        Bill Gatliff       2007-07-21  149  	.handler	= pxa_ost0_interrupt,
7bbb18c9 arch/arm/mach-pxa/time.c        Bill Gatliff       2007-07-21  150  	.dev_id		= &ckevt_pxa_osmr0,
7bbb18c9 arch/arm/mach-pxa/time.c        Bill Gatliff       2007-07-21  151  };
7bbb18c9 arch/arm/mach-pxa/time.c        Bill Gatliff       2007-07-21  152  
6f2116eb drivers/clocksource/pxa_timer.c Robert Jarzmik     2015-01-31  153  static void __init pxa_timer_common_init(int irq, unsigned long clock_tick_rate)
^1da177e arch/arm/mach-pxa/time.c        Linus Torvalds     2005-04-16  154  {
ab5354c4 drivers/clocksource/pxa_timer.c Robert Jarzmik     2014-07-14  155  	timer_writel(0, OIER);
ab5354c4 drivers/clocksource/pxa_timer.c Robert Jarzmik     2014-07-14  156  	timer_writel(OSSR_M0 | OSSR_M1 | OSSR_M2 | OSSR_M3, OSSR);
c80204e5 arch/arm/mach-pxa/time.c        Sascha Hauer       2006-12-12  157  
364ed1e0 arch/arm/mach-pxa/time.c        Stephen Boyd       2013-11-15  158  	sched_clock_register(pxa_read_sched_clock, 32, clock_tick_rate);
6c3a1583 arch/arm/mach-pxa/time.c        Nicolas Pitre      2007-08-17  159  
320ab2b0 arch/arm/mach-pxa/time.c        Rusty Russell      2008-12-13 @160  	ckevt_pxa_osmr0.cpumask = cpumask_of(0);
^1da177e arch/arm/mach-pxa/time.c        Linus Torvalds     2005-04-16  161  
ab5354c4 drivers/clocksource/pxa_timer.c Robert Jarzmik     2014-07-14  162  	setup_irq(irq, &pxa_ost0_irq);
5c53ff08 arch/arm/mach-pxa/time.c        Nicolas Pitre      2005-09-01  163  
ab5354c4 drivers/clocksource/pxa_timer.c Robert Jarzmik     2014-07-14 @164  	clocksource_mmio_init(timer_base + OSCR, "oscr0", clock_tick_rate, 200,
ab5354c4 drivers/clocksource/pxa_timer.c Robert Jarzmik     2014-07-14 @165  			      32, clocksource_mmio_readl_up);
8d84981e arch/arm/mach-pxa/time.c        Olof Johansson     2013-01-14 @166  	clockevents_config_and_register(&ckevt_pxa_osmr0, clock_tick_rate,
8d84981e arch/arm/mach-pxa/time.c        Olof Johansson     2013-01-14  167  					MIN_OSCR_DELTA * 2, 0x7fffffff);
5c53ff08 arch/arm/mach-pxa/time.c        Nicolas Pitre      2005-09-01  168  }
ab5354c4 drivers/clocksource/pxa_timer.c Robert Jarzmik     2014-07-14  169  
ab5354c4 drivers/clocksource/pxa_timer.c Robert Jarzmik     2014-07-14  170  static void __init pxa_timer_dt_init(struct device_node *np)
ab5354c4 drivers/clocksource/pxa_timer.c Robert Jarzmik     2014-07-14  171  {
ab5354c4 drivers/clocksource/pxa_timer.c Robert Jarzmik     2014-07-14  172  	struct clk *clk;
ab5354c4 drivers/clocksource/pxa_timer.c Robert Jarzmik     2014-07-14  173  	int irq;
ab5354c4 drivers/clocksource/pxa_timer.c Robert Jarzmik     2014-07-14  174  
ab5354c4 drivers/clocksource/pxa_timer.c Robert Jarzmik     2014-07-14  175  	/* timer registers are shared with watchdog timer */
ab5354c4 drivers/clocksource/pxa_timer.c Robert Jarzmik     2014-07-14  176  	timer_base = of_iomap(np, 0);
ab5354c4 drivers/clocksource/pxa_timer.c Robert Jarzmik     2014-07-14  177  	if (!timer_base)
ab5354c4 drivers/clocksource/pxa_timer.c Robert Jarzmik     2014-07-14  178  		panic("%s: unable to map resource\n", np->name);
ab5354c4 drivers/clocksource/pxa_timer.c Robert Jarzmik     2014-07-14  179  
ab5354c4 drivers/clocksource/pxa_timer.c Robert Jarzmik     2014-07-14  180  	clk = of_clk_get(np, 0);
ab5354c4 drivers/clocksource/pxa_timer.c Robert Jarzmik     2014-07-14  181  	if (IS_ERR(clk)) {
ab5354c4 drivers/clocksource/pxa_timer.c Robert Jarzmik     2014-07-14  182  		pr_crit("%s: unable to get clk\n", np->name);
ab5354c4 drivers/clocksource/pxa_timer.c Robert Jarzmik     2014-07-14  183  		return;
ab5354c4 drivers/clocksource/pxa_timer.c Robert Jarzmik     2014-07-14  184  	}
ab5354c4 drivers/clocksource/pxa_timer.c Robert Jarzmik     2014-07-14  185  	clk_prepare_enable(clk);
ab5354c4 drivers/clocksource/pxa_timer.c Robert Jarzmik     2014-07-14  186  
ab5354c4 drivers/clocksource/pxa_timer.c Robert Jarzmik     2014-07-14  187  	/* we are only interested in OS-timer0 irq */
ab5354c4 drivers/clocksource/pxa_timer.c Robert Jarzmik     2014-07-14  188  	irq = irq_of_parse_and_map(np, 0);
ab5354c4 drivers/clocksource/pxa_timer.c Robert Jarzmik     2014-07-14  189  	if (irq <= 0) {
ab5354c4 drivers/clocksource/pxa_timer.c Robert Jarzmik     2014-07-14  190  		pr_crit("%s: unable to parse OS-timer0 irq\n", np->name);
ab5354c4 drivers/clocksource/pxa_timer.c Robert Jarzmik     2014-07-14  191  		return;
ab5354c4 drivers/clocksource/pxa_timer.c Robert Jarzmik     2014-07-14  192  	}
ab5354c4 drivers/clocksource/pxa_timer.c Robert Jarzmik     2014-07-14  193  
ab5354c4 drivers/clocksource/pxa_timer.c Robert Jarzmik     2014-07-14  194  	pxa_timer_common_init(irq, clk_get_rate(clk));
ab5354c4 drivers/clocksource/pxa_timer.c Robert Jarzmik     2014-07-14  195  }
ab5354c4 drivers/clocksource/pxa_timer.c Robert Jarzmik     2014-07-14 @196  CLOCKSOURCE_OF_DECLARE(pxa_timer, "marvell,pxa-timer", pxa_timer_dt_init);
ab5354c4 drivers/clocksource/pxa_timer.c Robert Jarzmik     2014-07-14  197  
ab5354c4 drivers/clocksource/pxa_timer.c Robert Jarzmik     2014-07-14  198  /*
ab5354c4 drivers/clocksource/pxa_timer.c Robert Jarzmik     2014-07-14  199   * Legacy timer init for non device-tree boards.

:::::: The code at line 73 was first introduced by commit
:::::: 7bbb18c9f4783b6fb3bf27af71625b590cf4f00b [ARM] 4507/1: pxa2xx clock_event_device

:::::: TO: Bill Gatliff <bgat@billgatliff.com>
:::::: CC: Russell King <rmk+kernel@arm.linux.org.uk>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 42368 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 3/7] clocksource/drivers/st_lpc: Fix Kconfig dependency
  2015-10-29 22:52 ` [PATCH 3/7] clocksource/drivers/st_lpc: Fix Kconfig dependency Daniel Lezcano
@ 2015-10-30  8:51   ` Maxime Coquelin
  0 siblings, 0 replies; 9+ messages in thread
From: Maxime Coquelin @ 2015-10-30  8:51 UTC (permalink / raw)
  To: Daniel Lezcano, tglx
  Cc: john.stultz, linux-kernel, Srinivas Kandagatla, Patrice Chotard,
	Russell King, moderated list:ARM/STI ARCHITECTURE,
	open list:ARM/STI ARCHITECTURE

Hi Daniel,

On 10/29/2015 11:52 PM, Daniel Lezcano wrote:
> Change the Kconfig selection rule by letting the STI arch to select
> the timer.
>
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> ---
>   arch/arm/mach-sti/Kconfig   | 1 +
>   drivers/clocksource/Kconfig | 1 -
>   2 files changed, 1 insertion(+), 1 deletion(-)
>
>
Acked-by: Maxime Coquelin <maxime.coquelin@st.com>

Thanks!
Maxime

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-10-30  8:52 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-29 22:52 [PATCH 1/7] time: Define dummy functions for the generic sched clock Daniel Lezcano
2015-10-29 22:52 ` [PATCH 2/7] clocksource/drivers/qcom: Make COMPILE_TEST enabled for ARM architecture Daniel Lezcano
2015-10-29 22:52 ` [PATCH 3/7] clocksource/drivers/st_lpc: Fix Kconfig dependency Daniel Lezcano
2015-10-30  8:51   ` Maxime Coquelin
2015-10-29 22:52 ` [PATCH 4/7] clocksource/drivers/st_lpc: Add the COMPILE_TEST option Daniel Lezcano
2015-10-29 22:52 ` [PATCH 5/7] clocksource/drivers/pxa_timer: Move the Kconfig rule Daniel Lezcano
2015-10-29 22:52 ` [PATCH 6/7] clocksource/drivers/pxa_timer: Add the COMPILE_TEST option Daniel Lezcano
2015-10-30  6:12   ` kbuild test robot
2015-10-29 22:52 ` [PATCH 7/7] clocksource/drivers/tango: Add " Daniel Lezcano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).