diff options
author | Finn Thain <fthain@telegraphics.com.au> | 2018-12-01 11:53:10 +1100 |
---|---|---|
committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2019-03-25 10:22:24 +0100 |
commit | 26ccd2d376d9b7de9a27b9a7ed71e16216101921 (patch) | |
tree | 514f9e44b8c2ef830c6c0e6a6bfb4d7df2a6b927 /ipc | |
parent | 5afd3d06e5cb30a312aaa34348f9457b9fb38a52 (diff) | |
download | linux-26ccd2d376d9b7de9a27b9a7ed71e16216101921.tar.bz2 |
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>
Diffstat (limited to 'ipc')
0 files changed, 0 insertions, 0 deletions