The functions that implement arch_gettimeoffset are re-used by
new clocksource drivers in subsequent patches.
Signed-off-by: Finn Thain
Acked-by: Linus Walleij
---
arch/m68k/Kconfig | 1 -
arch/m68k/amiga/config.c| 3 ---
arch/m68k/atari/config.c| 2 --
arch/m68k/bvme6000/conf
This series removes "select ARCH_USES_GETTIMEOFFSET" from arch/m68k
and converts users of arch_gettimeoffset to the clocksource API.
Various bugs are fixed along the way.
Those platforms which do not actually implement arch_gettimeoffset
(apollo, q40, sun3, sun3x) use the "jiffies" clocksource by
Reading the timer counter races with timer overflow (and the
corresponding interrupt). This is resolved by reading the overflow
register and taking this value into account. The interrupt handler
must clear the overflow register when it eventually executes.
Suggested-by: Thomas Gleixner
Signed-off
Because hp300_read_clk() never checks the timer interrupt flag it may
fail to notice that the timer has wrapped, allowing the clock to jump
backwards. This is not a new problem.
This is resolved by checking the interrupt flag and, if need be,
taking wrap-around into account. The interrupt handler
These dummy implementations are no better than
default_arch_gettimeoffset() so remove them.
Signed-off-by: Finn Thain
---
arch/m68k/apollo/config.c | 7 ---
arch/m68k/q40/config.c| 9 -
arch/m68k/sun3/config.c | 2 --
arch/m68k/sun3/intersil.c | 7 ---
arch/m68k/sun3x/confi
This resolves some bugs that affect VIA timer counter accesses.
Avoid lost interrupts caused by reading the counter low byte register.
Make allowance for the fact that the counter will be decremented to
0x before being reloaded.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Finn Thai
Some platforms execute their timer handler with the interrupt priority
level set below 6. That means the handler could be interrupted by another
driver and this could lead to re-entry of the timer core.
Avoid this by use of local_irq_save/restore for timer interrupt dispatch.
This provides mutual
Add a platform clocksource by adapting the existing arch_gettimeoffset
implementation.
Normally the MFP timer C interrupt flag would be used to check for
timer counter wrap-around. Unfortunately, that flag gets cleared by the
MFP itself (due to automatic End-of-Interrupt mode). This means that
mfp
Add a platform clocksource by adapting the existing arch_gettimeoffset
implementation.
Signed-off-by: Finn Thain
Acked-by: Linus Walleij
---
Changed since v2:
- Don't check for timer interrupt in bvme6000_read_clk() when the timer is
about to be reloaded.
Changed since v1:
- Moved clk_total a
Add a platform clocksource by adapting the existing arch_gettimeoffset
implementation.
Signed-off-by: Finn Thain
Acked-by: Linus Walleij
---
Changed since v1:
- Moved clk_total access to within the irq lock.
---
arch/m68k/mvme16x/config.c | 37 +++--
1 file chan
Add a platform clocksource by adapting the existing arch_gettimeoffset
implementation.
Signed-off-by: Finn Thain
Acked-by: Linus Walleij
---
Changed since v1:
- Moved clk_total access to within the irq lock.
- Use type u32 for tick counter.
---
arch/m68k/include/asm/mvme147hw.h | 1 -
arch/m
Add a platform clocksource by adapting the existing arch_gettimeoffset
implementation.
Signed-off-by: Finn Thain
Acked-by: Linus Walleij
---
Changed since v2:
- Don't check for timer interrupt in amiga_read_clk() when the timer is
about to be reloaded.
Changed since v1:
- Moved clk_total acce
Add a platform clocksource by adapting the existing arch_gettimeoffset
implementation.
Signed-off-by: Finn Thain
Acked-by: Linus Walleij
Tested-by: Stan Johnson
---
Changed since v2:
- Drop unneeded 'clk_offset' variable.
Changed since v1:
- Moved clk_total access to within the irq lock.
-
Reading the timer counter races with timer overflow (and the
corresponding interrupt). This is resolved by reading the overflow
register and taking this value into account. The interrupt handler
must clear the overflow register when it eventually executes.
Suggested-by: Thomas Gleixner
Signed-off
Add a platform clocksource by adapting the existing arch_gettimeoffset
implementation.
Signed-off-by: Finn Thain
Acked-by: Linus Walleij
---
Changed since v1:
- Moved clk_total access to within the irq lock.
- Use type u32 for tick counter.
---
arch/m68k/hp300/time.c | 37
On Sat, 24 Nov 2018, Michael Schmitz wrote:
>
> Am 20.11.2018 um 23:02 schrieb Andreas Schwab:
> > On Nov 20 2018, Linus Walleij wrote:
> >
> > > Yes you already see the same as I see: this chip MK68901 has no less
> > > than four timers. I bet the kernel is just using one of them, out of
> >
Am 20.11.2018 um 23:02 schrieb Andreas Schwab:
On Nov 20 2018, Linus Walleij wrote:
Yes you already see the same as I see: this chip MK68901 has
no less than four timers. I bet the kernel is just using one of them,
out of habit.
Note that not all timers can be used freely. Some of them ar
17 matches
Mail list logo