Re: [PATCH 05/13] m68k: coldfire: use legacy_timer_tick()

2020-10-09 Thread Arnd Bergmann
On Fri, Oct 9, 2020 at 2:53 PM Greg Ungerer  wrote:
>
> Hi Arnd,
>
> On 9/10/20 1:46 am, Arnd Bergmann wrote:
> > Replace the indirect function calls in the timer code
> > with direct calls to the newly added legacy_timer_tick()
> > helper for those that have not yet been converted to
> > generic clockevents.
> >
> > This makes the timer code a little more self-contained.
> >
> > Signed-off-by: Arnd Bergmann 
>
> I tested this series on a couple of different ColdFire parts
> (5208 and 5475) and under QEMU emulating the 5208. All checked
> out good, all worked as expected. So for the ColdFire changes:
>
> Tested-by: Greg Ungerer 

Awesome, thanks for testing!

Arnd


Re: [PATCH 05/13] m68k: coldfire: use legacy_timer_tick()

2020-10-09 Thread Greg Ungerer

Hi Arnd,

On 9/10/20 1:46 am, Arnd Bergmann wrote:

Replace the indirect function calls in the timer code
with direct calls to the newly added legacy_timer_tick()
helper for those that have not yet been converted to
generic clockevents.

This makes the timer code a little more self-contained.

Signed-off-by: Arnd Bergmann 


I tested this series on a couple of different ColdFire parts
(5208 and 5475) and under QEMU emulating the 5208. All checked
out good, all worked as expected. So for the ColdFire changes:

Tested-by: Greg Ungerer 

Regards
Greg





---
  arch/m68k/Kconfig.cpu | 35 +--
  arch/m68k/coldfire/Makefile   | 32 ++--
  arch/m68k/coldfire/sltimers.c |  6 ++
  arch/m68k/coldfire/timers.c   |  6 ++
  4 files changed, 51 insertions(+), 28 deletions(-)

diff --git a/arch/m68k/Kconfig.cpu b/arch/m68k/Kconfig.cpu
index 694c4fca9f5d..322a35ef14c6 100644
--- a/arch/m68k/Kconfig.cpu
+++ b/arch/m68k/Kconfig.cpu
@@ -137,6 +137,7 @@ config M5206
bool "MCF5206"
depends on !MMU
select COLDFIRE_SW_A7
+   select COLDFIRE_TIMERS
select HAVE_MBAR
select CPU_NO_EFFICIENT_FFS
help
@@ -146,6 +147,7 @@ config M5206e
bool "MCF5206e"
depends on !MMU
select COLDFIRE_SW_A7
+   select COLDFIRE_TIMERS
select HAVE_MBAR
select CPU_NO_EFFICIENT_FFS
help
@@ -154,7 +156,7 @@ config M5206e
  config M520x
bool "MCF520x"
depends on !MMU
-   select GENERIC_CLOCKEVENTS
+   select COLDFIRE_PIT_TIMER
select HAVE_CACHE_SPLIT
help
   Freescale Coldfire 5207/5208 processor support.
@@ -162,7 +164,7 @@ config M520x
  config M523x
bool "MCF523x"
depends on !MMU
-   select GENERIC_CLOCKEVENTS
+   select COLDFIRE_PIT_TIMER
select HAVE_CACHE_SPLIT
select HAVE_IPSBAR
help
@@ -172,6 +174,7 @@ config M5249
bool "MCF5249"
depends on !MMU
select COLDFIRE_SW_A7
+   select COLDFIRE_TIMERS
select HAVE_MBAR
select CPU_NO_EFFICIENT_FFS
help
@@ -181,6 +184,7 @@ config M525x
bool "MCF525x"
depends on !MMU
select COLDFIRE_SW_A7
+   select COLDFIRE_TIMERS
select HAVE_MBAR
select CPU_NO_EFFICIENT_FFS
help
@@ -189,10 +193,10 @@ config M525x
  config M5271
bool "MCF5271"
depends on !MMU
+   select COLDFIRE_PIT_TIMER
select M527x
select HAVE_CACHE_SPLIT
select HAVE_IPSBAR
-   select GENERIC_CLOCKEVENTS
help
  Freescale (Motorola) ColdFire 5270/5271 processor support.
  
@@ -200,6 +204,7 @@ config M5272

bool "MCF5272"
depends on !MMU
select COLDFIRE_SW_A7
+   select COLDFIRE_TIMERS
select HAVE_MBAR
select CPU_NO_EFFICIENT_FFS
help
@@ -208,17 +213,17 @@ config M5272
  config M5275
bool "MCF5275"
depends on !MMU
+   select COLDFIRE_PIT_TIMER
select M527x
select HAVE_CACHE_SPLIT
select HAVE_IPSBAR
-   select GENERIC_CLOCKEVENTS
help
  Freescale (Motorola) ColdFire 5274/5275 processor support.
  
  config M528x

bool "MCF528x"
depends on !MMU
-   select GENERIC_CLOCKEVENTS
+   select COLDFIRE_PIT_TIMER
select HAVE_CACHE_SPLIT
select HAVE_IPSBAR
help
@@ -227,6 +232,7 @@ config M528x
  config M5307
bool "MCF5307"
depends on !MMU
+   select COLDFIRE_TIMERS
select COLDFIRE_SW_A7
select HAVE_CACHE_CB
select HAVE_MBAR
@@ -237,6 +243,7 @@ config M5307
  config M532x
bool "MCF532x"
depends on !MMU
+   select COLDFIRE_TIMERS
select M53xx
select HAVE_CACHE_CB
help
@@ -245,6 +252,7 @@ config M532x
  config M537x
bool "MCF537x"
depends on !MMU
+   select COLDFIRE_TIMERS
select M53xx
select HAVE_CACHE_CB
help
@@ -254,6 +262,7 @@ config M5407
bool "MCF5407"
depends on !MMU
select COLDFIRE_SW_A7
+   select COLDFIRE_TIMERS
select HAVE_CACHE_CB
select HAVE_MBAR
select CPU_NO_EFFICIENT_FFS
@@ -263,6 +272,7 @@ config M5407
  config M547x
bool "MCF547x"
select M54xx
+   select COLDFIRE_SLTIMERS
select MMU_COLDFIRE if MMU
select FPU if MMU
select HAVE_CACHE_CB
@@ -273,6 +283,7 @@ config M547x
  
  config M548x

bool "MCF548x"
+   select COLDFIRE_SLTIMERS
select MMU_COLDFIRE if MMU
select FPU if MMU
select M54xx
@@ -284,8 +295,8 @@ config M548x
  
  config M5441x

bool "MCF5441x"
+   select COLDFIRE_PIT_TIMER
select MMU_COLDFIRE if MMU
-   select GENERIC_CLOCKEVENTS
select HAVE_CACHE_CB
help
  Freescale Coldfire 54410/54415/54416/54417/54418 processor support.
@@ -302,6 +313,18 @@ 

[PATCH 05/13] m68k: coldfire: use legacy_timer_tick()

2020-10-08 Thread Arnd Bergmann
Replace the indirect function calls in the timer code
with direct calls to the newly added legacy_timer_tick()
helper for those that have not yet been converted to
generic clockevents.

This makes the timer code a little more self-contained.

Signed-off-by: Arnd Bergmann 
---
 arch/m68k/Kconfig.cpu | 35 +--
 arch/m68k/coldfire/Makefile   | 32 ++--
 arch/m68k/coldfire/sltimers.c |  6 ++
 arch/m68k/coldfire/timers.c   |  6 ++
 4 files changed, 51 insertions(+), 28 deletions(-)

diff --git a/arch/m68k/Kconfig.cpu b/arch/m68k/Kconfig.cpu
index 694c4fca9f5d..322a35ef14c6 100644
--- a/arch/m68k/Kconfig.cpu
+++ b/arch/m68k/Kconfig.cpu
@@ -137,6 +137,7 @@ config M5206
bool "MCF5206"
depends on !MMU
select COLDFIRE_SW_A7
+   select COLDFIRE_TIMERS
select HAVE_MBAR
select CPU_NO_EFFICIENT_FFS
help
@@ -146,6 +147,7 @@ config M5206e
bool "MCF5206e"
depends on !MMU
select COLDFIRE_SW_A7
+   select COLDFIRE_TIMERS
select HAVE_MBAR
select CPU_NO_EFFICIENT_FFS
help
@@ -154,7 +156,7 @@ config M5206e
 config M520x
bool "MCF520x"
depends on !MMU
-   select GENERIC_CLOCKEVENTS
+   select COLDFIRE_PIT_TIMER
select HAVE_CACHE_SPLIT
help
   Freescale Coldfire 5207/5208 processor support.
@@ -162,7 +164,7 @@ config M520x
 config M523x
bool "MCF523x"
depends on !MMU
-   select GENERIC_CLOCKEVENTS
+   select COLDFIRE_PIT_TIMER
select HAVE_CACHE_SPLIT
select HAVE_IPSBAR
help
@@ -172,6 +174,7 @@ config M5249
bool "MCF5249"
depends on !MMU
select COLDFIRE_SW_A7
+   select COLDFIRE_TIMERS
select HAVE_MBAR
select CPU_NO_EFFICIENT_FFS
help
@@ -181,6 +184,7 @@ config M525x
bool "MCF525x"
depends on !MMU
select COLDFIRE_SW_A7
+   select COLDFIRE_TIMERS
select HAVE_MBAR
select CPU_NO_EFFICIENT_FFS
help
@@ -189,10 +193,10 @@ config M525x
 config M5271
bool "MCF5271"
depends on !MMU
+   select COLDFIRE_PIT_TIMER
select M527x
select HAVE_CACHE_SPLIT
select HAVE_IPSBAR
-   select GENERIC_CLOCKEVENTS
help
  Freescale (Motorola) ColdFire 5270/5271 processor support.
 
@@ -200,6 +204,7 @@ config M5272
bool "MCF5272"
depends on !MMU
select COLDFIRE_SW_A7
+   select COLDFIRE_TIMERS
select HAVE_MBAR
select CPU_NO_EFFICIENT_FFS
help
@@ -208,17 +213,17 @@ config M5272
 config M5275
bool "MCF5275"
depends on !MMU
+   select COLDFIRE_PIT_TIMER
select M527x
select HAVE_CACHE_SPLIT
select HAVE_IPSBAR
-   select GENERIC_CLOCKEVENTS
help
  Freescale (Motorola) ColdFire 5274/5275 processor support.
 
 config M528x
bool "MCF528x"
depends on !MMU
-   select GENERIC_CLOCKEVENTS
+   select COLDFIRE_PIT_TIMER
select HAVE_CACHE_SPLIT
select HAVE_IPSBAR
help
@@ -227,6 +232,7 @@ config M528x
 config M5307
bool "MCF5307"
depends on !MMU
+   select COLDFIRE_TIMERS
select COLDFIRE_SW_A7
select HAVE_CACHE_CB
select HAVE_MBAR
@@ -237,6 +243,7 @@ config M5307
 config M532x
bool "MCF532x"
depends on !MMU
+   select COLDFIRE_TIMERS
select M53xx
select HAVE_CACHE_CB
help
@@ -245,6 +252,7 @@ config M532x
 config M537x
bool "MCF537x"
depends on !MMU
+   select COLDFIRE_TIMERS
select M53xx
select HAVE_CACHE_CB
help
@@ -254,6 +262,7 @@ config M5407
bool "MCF5407"
depends on !MMU
select COLDFIRE_SW_A7
+   select COLDFIRE_TIMERS
select HAVE_CACHE_CB
select HAVE_MBAR
select CPU_NO_EFFICIENT_FFS
@@ -263,6 +272,7 @@ config M5407
 config M547x
bool "MCF547x"
select M54xx
+   select COLDFIRE_SLTIMERS
select MMU_COLDFIRE if MMU
select FPU if MMU
select HAVE_CACHE_CB
@@ -273,6 +283,7 @@ config M547x
 
 config M548x
bool "MCF548x"
+   select COLDFIRE_SLTIMERS
select MMU_COLDFIRE if MMU
select FPU if MMU
select M54xx
@@ -284,8 +295,8 @@ config M548x
 
 config M5441x
bool "MCF5441x"
+   select COLDFIRE_PIT_TIMER
select MMU_COLDFIRE if MMU
-   select GENERIC_CLOCKEVENTS
select HAVE_CACHE_CB
help
  Freescale Coldfire 54410/54415/54416/54417/54418 processor support.
@@ -302,6 +313,18 @@ config M54xx
select HAVE_PCI
bool
 
+config COLDFIRE_PIT_TIMER
+   bool
+   select GENERIC_CLOCKEVENTS
+
+config COLDFIRE_TIMERS
+   bool
+   select LEGACY_TIMER_TICK
+
+config COLDFIRE_SLTIMERS
+   bool
+   select LEGACY_TIMER_TICK
+
 endif # COLDFIRE
 
 
diff --git