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>
Wed, 29 Jan 2020 09:24:20 +0000 (10:24 +0100)
commit0c48a9cefff0805f3336a44c3ef2609f31a54b17
treefcf0563bb069d3f6986aabab3c7155e627716c5a
parentf1c179e1fb782bcdf3bad705d72bc02f13d5fd72
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