linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [GIT PULL] clockevents / clocksource fixes for 5.1
@ 2019-04-16 12:45 Daniel Lezcano
  2019-04-16 12:46 ` [PATCH 1/4] clocksource/drivers/npcm: select TIMER_OF Daniel Lezcano
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Lezcano @ 2019-04-16 12:45 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: Arnd Bergmann, Nathan Chancellor, Neil Armstrong, Yangtao Li,
	Linux Kernel Mailing List

The following changes since commit 07d7e12091f4ab869cc6a4bb276399057e73b0b3:

  alarmtimer: Return correct remaining time (2019-04-10 15:23:26 +0200)

are available in the Git repository at:

  https://git.linaro.org/people/daniel.lezcano/linux.git
tags/timers-v5.1-rc6

for you to fetch changes up to 4d86c9f73c5a9a7c3c0661e922509c2c51801671:

  clocksource/drivers/timer-ti-dm: Remove omap_dm_timer_set_load_start
(2019-04-16 14:26:54 +0200)

----------------------------------------------------------------
Clockevent / clocksource fixes update for v5.1-rc6

 - Fix TIMER_OF missing option dependency for npcm (Arnd Bergmann)

 - Remove a pointless macro call for arm_arch_timer (Yangtao Li)

 - Fix wrong compatible string for oxnas (Neil Armstrong)

 - Fix compilation warning by removing a dead function on omap (Nathan
Chancellor)

----------------------------------------------------------------
Arnd Bergmann (1):
      clocksource/drivers/npcm: select TIMER_OF

Nathan Chancellor (1):
      clocksource/drivers/timer-ti-dm: Remove omap_dm_timer_set_load_start

Neil Armstrong (1):
      clocksource/drivers/oxnas: Fix OX820 compatible

Yangtao Li (1):
      clocksource/drivers/arm_arch_timer: Remove unneeded pr_fmt macro

 drivers/clocksource/Kconfig           |  1 +
 drivers/clocksource/arm_arch_timer.c  |  5 +----
 drivers/clocksource/timer-oxnas-rps.c |  2 +-
 drivers/clocksource/timer-ti-dm.c     | 28 ----------------------------
 4 files changed, 3 insertions(+), 33 deletions(-)

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


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

* [PATCH 1/4] clocksource/drivers/npcm: select TIMER_OF
  2019-04-16 12:45 [GIT PULL] clockevents / clocksource fixes for 5.1 Daniel Lezcano
@ 2019-04-16 12:46 ` Daniel Lezcano
  2019-04-16 12:46   ` [PATCH 2/4] clocksource/drivers/arm_arch_timer: Remove unneeded pr_fmt macro Daniel Lezcano
                     ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Daniel Lezcano @ 2019-04-16 12:46 UTC (permalink / raw)
  To: tglx; +Cc: linux-kernel, Arnd Bergmann

From: Arnd Bergmann <arnd@arndb.de>

When this is disabled, we get a link failure:

drivers/clocksource/timer-npcm7xx.o: In function `npcm7xx_timer_init':
timer-npcm7xx.c:(.init.text+0xf): undefined reference to `timer_of_init'

Fixes: 1c00289ecd12 ("clocksource/drivers/npcm: Add NPCM7xx timer driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 drivers/clocksource/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
index 171502a356aa..4b3d143f0f8a 100644
--- a/drivers/clocksource/Kconfig
+++ b/drivers/clocksource/Kconfig
@@ -145,6 +145,7 @@ config VT8500_TIMER
 config NPCM7XX_TIMER
 	bool "NPCM7xx timer driver" if COMPILE_TEST
 	depends on HAS_IOMEM
+	select TIMER_OF
 	select CLKSRC_MMIO
 	help
 	  Enable 24-bit TIMER0 and TIMER1 counters in the NPCM7xx architecture,
-- 
2.17.1


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

* [PATCH 2/4] clocksource/drivers/arm_arch_timer: Remove unneeded pr_fmt macro
  2019-04-16 12:46 ` [PATCH 1/4] clocksource/drivers/npcm: select TIMER_OF Daniel Lezcano
@ 2019-04-16 12:46   ` Daniel Lezcano
  2019-04-16 12:46   ` [PATCH 3/4] clocksource/drivers/oxnas: Fix OX820 compatible Daniel Lezcano
  2019-04-16 12:46   ` [PATCH 4/4] clocksource/drivers/timer-ti-dm: Remove omap_dm_timer_set_load_start Daniel Lezcano
  2 siblings, 0 replies; 6+ messages in thread
From: Daniel Lezcano @ 2019-04-16 12:46 UTC (permalink / raw)
  To: tglx
  Cc: linux-kernel, Yangtao Li, Mark Rutland, Marc Zyngier,
	moderated list:ARM ARCHITECTED TIMER DRIVER

From: Yangtao Li <tiny.windzz@gmail.com>

After this commit ded24019b6b6f(clocksource: arm_arch_timer: clean up
printk usage), the previous macro is redundant, so delete it.

And move the new macro to the previous position.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 drivers/clocksource/arm_arch_timer.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c
index aa4ec53281ce..ea373cfbcecb 100644
--- a/drivers/clocksource/arm_arch_timer.c
+++ b/drivers/clocksource/arm_arch_timer.c
@@ -9,7 +9,7 @@
  * published by the Free Software Foundation.
  */
 
-#define pr_fmt(fmt)	"arm_arch_timer: " fmt
+#define pr_fmt(fmt) 	"arch_timer: " fmt
 
 #include <linux/init.h>
 #include <linux/kernel.h>
@@ -33,9 +33,6 @@
 
 #include <clocksource/arm_arch_timer.h>
 
-#undef pr_fmt
-#define pr_fmt(fmt) "arch_timer: " fmt
-
 #define CNTTIDR		0x08
 #define CNTTIDR_VIRT(n)	(BIT(1) << ((n) * 4))
 
-- 
2.17.1


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

* [PATCH 3/4] clocksource/drivers/oxnas: Fix OX820 compatible
  2019-04-16 12:46 ` [PATCH 1/4] clocksource/drivers/npcm: select TIMER_OF Daniel Lezcano
  2019-04-16 12:46   ` [PATCH 2/4] clocksource/drivers/arm_arch_timer: Remove unneeded pr_fmt macro Daniel Lezcano
@ 2019-04-16 12:46   ` Daniel Lezcano
  2019-04-16 19:26     ` Daniel Golle
  2019-04-16 12:46   ` [PATCH 4/4] clocksource/drivers/timer-ti-dm: Remove omap_dm_timer_set_load_start Daniel Lezcano
  2 siblings, 1 reply; 6+ messages in thread
From: Daniel Lezcano @ 2019-04-16 12:46 UTC (permalink / raw)
  To: tglx
  Cc: linux-kernel, Neil Armstrong, Daniel Golle,
	moderated list:ARM/OXNAS platform support,
	moderated list:ARM/OXNAS platform support

From: Neil Armstrong <narmstrong@baylibre.com>

The OX820 compatible is wrong is the driver, fix it.

Fixes: 2ea3401e2a84 ("clocksource/drivers/oxnas: Add OX820 compatible")
Reported-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 drivers/clocksource/timer-oxnas-rps.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clocksource/timer-oxnas-rps.c b/drivers/clocksource/timer-oxnas-rps.c
index eed6feff8b5f..30c6f4ce672b 100644
--- a/drivers/clocksource/timer-oxnas-rps.c
+++ b/drivers/clocksource/timer-oxnas-rps.c
@@ -296,4 +296,4 @@ static int __init oxnas_rps_timer_init(struct device_node *np)
 TIMER_OF_DECLARE(ox810se_rps,
 		       "oxsemi,ox810se-rps-timer", oxnas_rps_timer_init);
 TIMER_OF_DECLARE(ox820_rps,
-		       "oxsemi,ox820se-rps-timer", oxnas_rps_timer_init);
+		       "oxsemi,ox820-rps-timer", oxnas_rps_timer_init);
-- 
2.17.1


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

* [PATCH 4/4] clocksource/drivers/timer-ti-dm: Remove omap_dm_timer_set_load_start
  2019-04-16 12:46 ` [PATCH 1/4] clocksource/drivers/npcm: select TIMER_OF Daniel Lezcano
  2019-04-16 12:46   ` [PATCH 2/4] clocksource/drivers/arm_arch_timer: Remove unneeded pr_fmt macro Daniel Lezcano
  2019-04-16 12:46   ` [PATCH 3/4] clocksource/drivers/oxnas: Fix OX820 compatible Daniel Lezcano
@ 2019-04-16 12:46   ` Daniel Lezcano
  2 siblings, 0 replies; 6+ messages in thread
From: Daniel Lezcano @ 2019-04-16 12:46 UTC (permalink / raw)
  To: tglx; +Cc: linux-kernel, Nathan Chancellor, Tony Lindgren

From: Nathan Chancellor <natechancellor@gmail.com>

Commit 008258d995a6 ("clocksource/drivers/timer-ti-dm: Make
omap_dm_timer_set_load_start() static") made omap_dm_time_set_load_start
static because its prototype was not defined in a header. Unfortunately,
this causes a build warning on multi_v7_defconfig because this function
is not used anywhere in this translation unit:

drivers/clocksource/timer-ti-dm.c:589:12: error: unused function
'omap_dm_timer_set_load_start' [-Werror,-Wunused-function]

In fact, omap_dm_timer_set_load_start hasn't been used anywhere since
commit f190be7f39a5 ("staging: tidspbridge: remove driver") and the
prototype was removed in commit 592ea6bd1fad ("clocksource: timer-ti-dm:
Make unexported functions static"), which is probably where this should
have happened.

Fixes: 592ea6bd1fad ("clocksource: timer-ti-dm: Make unexported functions static")
Fixes: 008258d995a6 ("clocksource/drivers/timer-ti-dm: Make omap_dm_timer_set_load_start() static")
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 drivers/clocksource/timer-ti-dm.c | 28 ----------------------------
 1 file changed, 28 deletions(-)

diff --git a/drivers/clocksource/timer-ti-dm.c b/drivers/clocksource/timer-ti-dm.c
index 3352da6ed61f..ee8ec5a8cb16 100644
--- a/drivers/clocksource/timer-ti-dm.c
+++ b/drivers/clocksource/timer-ti-dm.c
@@ -585,34 +585,6 @@ static int omap_dm_timer_set_load(struct omap_dm_timer *timer, int autoreload,
 	return 0;
 }
 
-/* Optimized set_load which removes costly spin wait in timer_start */
-static int omap_dm_timer_set_load_start(struct omap_dm_timer *timer,
-					int autoreload, unsigned int load)
-{
-	u32 l;
-
-	if (unlikely(!timer))
-		return -EINVAL;
-
-	omap_dm_timer_enable(timer);
-
-	l = omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG);
-	if (autoreload) {
-		l |= OMAP_TIMER_CTRL_AR;
-		omap_dm_timer_write_reg(timer, OMAP_TIMER_LOAD_REG, load);
-	} else {
-		l &= ~OMAP_TIMER_CTRL_AR;
-	}
-	l |= OMAP_TIMER_CTRL_ST;
-
-	__omap_dm_timer_load_start(timer, l, load, timer->posted);
-
-	/* Save the context */
-	timer->context.tclr = l;
-	timer->context.tldr = load;
-	timer->context.tcrr = load;
-	return 0;
-}
 static int omap_dm_timer_set_match(struct omap_dm_timer *timer, int enable,
 				   unsigned int match)
 {
-- 
2.17.1


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

* Re: [PATCH 3/4] clocksource/drivers/oxnas: Fix OX820 compatible
  2019-04-16 12:46   ` [PATCH 3/4] clocksource/drivers/oxnas: Fix OX820 compatible Daniel Lezcano
@ 2019-04-16 19:26     ` Daniel Golle
  0 siblings, 0 replies; 6+ messages in thread
From: Daniel Golle @ 2019-04-16 19:26 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: tglx, linux-kernel, Neil Armstrong,
	moderated list:ARM/OXNAS platform support,
	moderated list:ARM/OXNAS platform support

Works great here

On Tue, Apr 16, 2019 at 02:46:39PM +0200, Daniel Lezcano wrote:
> From: Neil Armstrong <narmstrong@baylibre.com>
> 
> The OX820 compatible is wrong is the driver, fix it.
> 
> Fixes: 2ea3401e2a84 ("clocksource/drivers/oxnas: Add OX820 compatible")
> Reported-by: Daniel Golle <daniel@makrotopia.org>
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Tested-by: Daniel Golle <daniel@makrotopia.org>

> ---
>  drivers/clocksource/timer-oxnas-rps.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/clocksource/timer-oxnas-rps.c b/drivers/clocksource/timer-oxnas-rps.c
> index eed6feff8b5f..30c6f4ce672b 100644
> --- a/drivers/clocksource/timer-oxnas-rps.c
> +++ b/drivers/clocksource/timer-oxnas-rps.c
> @@ -296,4 +296,4 @@ static int __init oxnas_rps_timer_init(struct device_node *np)
>  TIMER_OF_DECLARE(ox810se_rps,
>  		       "oxsemi,ox810se-rps-timer", oxnas_rps_timer_init);
>  TIMER_OF_DECLARE(ox820_rps,
> -		       "oxsemi,ox820se-rps-timer", oxnas_rps_timer_init);
> +		       "oxsemi,ox820-rps-timer", oxnas_rps_timer_init);
> -- 
> 2.17.1
> 

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

end of thread, other threads:[~2019-04-16 19:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-16 12:45 [GIT PULL] clockevents / clocksource fixes for 5.1 Daniel Lezcano
2019-04-16 12:46 ` [PATCH 1/4] clocksource/drivers/npcm: select TIMER_OF Daniel Lezcano
2019-04-16 12:46   ` [PATCH 2/4] clocksource/drivers/arm_arch_timer: Remove unneeded pr_fmt macro Daniel Lezcano
2019-04-16 12:46   ` [PATCH 3/4] clocksource/drivers/oxnas: Fix OX820 compatible Daniel Lezcano
2019-04-16 19:26     ` Daniel Golle
2019-04-16 12:46   ` [PATCH 4/4] clocksource/drivers/timer-ti-dm: Remove omap_dm_timer_set_load_start 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).