m68k: mac: Fix VIA timer counter accesses
authorFinn Thain <fthain@telegraphics.com.au>
Sat, 1 Dec 2018 00:53:10 +0000 (11:53 +1100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Jan 2020 13:50:33 +0000 (14:50 +0100)
commit0f4c7dad4ec37e2d751d1124960b6036409ea10c
treea0dd1e9de943e20da8b7393c453dd636a39db5e3
parente317b36324b0184ca3063675a3b4f18a0c206c76
m68k: mac: Fix VIA timer counter accesses

[ Upstream commit 0ca7ce7db771580433bf24454f7a1542bd326078 ]

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
0xFFFF before being reloaded.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/m68k/mac/via.c