Re: [RFC PATCH v2 07/14] m68k: atari: Convert to clocksource API

2018-11-23 Thread Finn Thain
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 >

Re: [RFC PATCH v2 07/14] m68k: atari: Convert to clocksource API

2018-11-23 Thread Michael Schmitz
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

Re: [RFC PATCH v2 07/14] m68k: atari: Convert to clocksource API

2018-11-20 Thread 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 are hardwired to generate the clock for the

Re: [RFC PATCH v2 07/14] m68k: atari: Convert to clocksource API

2018-11-20 Thread Linus Walleij
On Tue, Nov 20, 2018 at 10:30 AM Finn Thain wrote: > On Tue, 20 Nov 2018, Linus Walleij wrote: > > As with the Amiga, this chip also has an RTC clock that should go to the > > RTC subsystem, naturally. > > I think some Atari's have an MC146818, which is drivers/rtc/rtc-cmos.c, >

Re: [RFC PATCH v2 07/14] m68k: atari: Convert to clocksource API

2018-11-20 Thread Finn Thain
On Tue, 20 Nov 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. > > By just setting another timer as free-running we get a classic and clean > Linux clocksource

Re: [RFC PATCH v2 07/14] m68k: atari: Convert to clocksource API

2018-11-20 Thread Geert Uytterhoeven
Hi Linus, On Tue, Nov 20, 2018 at 9:10 AM Linus Walleij wrote: > As with the Amiga, this chip also has an RTC clock that should > go to the RTC subsystem, naturally. Please note the Amiga CIA is an 8520, not 6526, hence it has a 24-bit TOD instead of a BCD TOD, so it's not suitable for use as

Re: [RFC PATCH v2 07/14] m68k: atari: Convert to clocksource API

2018-11-20 Thread Linus Walleij
On Mon, Nov 19, 2018 at 2:22 AM Finn Thain wrote: > 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

Re: [RFC PATCH v2 07/14] m68k: atari: Convert to clocksource API

2018-11-19 Thread Michael Schmitz
Hi Finn, this fixes the ssh timeout issues I reported for the earlier versions. Can't see a large degradation of resolution either. The race in the previous versions may have been exacerbated in part by an incorrect assumption about the likelihood of counter wrap-around in the old

[RFC PATCH v2 07/14] m68k: atari: Convert to clocksource API

2018-11-18 Thread Finn Thain
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 EOI mode). This means that