[ARM] 4539/1: clocksource and clockevents for at91rm9200
authorDavid Brownell <david-b@pacbell.net>
Tue, 31 Jul 2007 00:41:26 +0000 (01:41 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Fri, 12 Oct 2007 22:43:15 +0000 (23:43 +0100)
commit5e802dfab7bbbee1e63607a3e6d1ceb78ec4ceeb
treeeb85a0c5746afae2c6ca0959bb9c58caf83351eb
parentf2c10d6c669e5b792c48e86da37ec7fde0a2e302
[ARM] 4539/1: clocksource and clockevents for at91rm9200

GENERIC_TIME and GENERIC_CLOCKEVENTS support for the at91rm9200.

 - Oneshot mode (used for NO_HZ and high res timers) uses the
   alarm to emulate a real oneshot timer; the trickiest bit is
   how to avoid some lowlevel races.  Thanks to Remy Bohmer for
   various fixes to this code.

 - Tighten up periodic mode support using the PIT.

 - Streamline reads of the 32KHz counter.  Thanks to Marc Pignat
   for some testing results: the CRTR register has *very* odd
   behavior.  The reread appears to work around stranger glitches
   than just getting an old clock value (which would quickly
   self-correct).

 - Remove the rounding-up of tick_usec to 10.009 msec (32KiHz/100),
   since that no longer acts correct (time increases too fast).

Note that the at91sam9 and at91x40 chips need other solutions,
since they don't have the same system timer module.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Bill Gatliff <bgat@billgatliff.com>
Acked-by:Remy Bohmer <linux@bohmer.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mach-at91/Kconfig
arch/arm/mach-at91/at91rm9200_time.c