1
0
Fork 0
alistair23-linux/arch/m68k/atari
Finn Thain 26ccd2d376 m68k: atari: Convert to clocksource API
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_timer_c_handler() and atari_read_clk() must race when accounting
for counter wrap-around.

That problem is avoided by effectively stopping the clock when it might
otherwise jump backwards (due to interrupt latency). Note that this may
affect clock accuracy.

After the timer interrupt is asserted, wait for the counter to be
reloaded so that atari_read_clk() will not see the intermediate state
as that would cause the clock to jump backwards.

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Tested-by: Michael Schmitz <schmitzmic@gmail.com>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2019-03-25 10:22:24 +01:00
..
Makefile m68k/atari: Move Atari-specific code out of drivers/char/nvram.c 2019-01-22 10:21:43 +01:00
ataints.c m68k: Call timer_interrupt() with interrupts disabled 2019-03-25 10:22:24 +01:00
atakeyb.c m68k/atari: Modernize printing of kernel messages 2017-02-12 10:36:49 +01:00
atasound.c Disintegrate asm/system.h for M68K 2012-03-28 18:30:02 +01:00
config.c m68k: Drop ARCH_USES_GETTIMEOFFSET 2019-03-25 10:22:24 +01:00
debug.c m68k/amiga,atari: Fix specifying multiple debug= parameters 2013-12-08 11:03:21 +01:00
nvram.c m68k: Dispatch nvram_ops calls to Atari or Mac functions 2019-01-22 10:21:45 +01:00
stdma.c m68k/atari: Remove obsolete IRQ_TYPE_* 2015-01-15 13:44:51 +01:00
stram.c treewide: add checks for the return value of memblock_alloc*() 2019-03-12 10:04:02 -07:00
time.c m68k: atari: Convert to clocksource API 2019-03-25 10:22:24 +01:00