Commit graph

7 commits

Author SHA1 Message Date
Matthias Kaehlcke
b032698ff6 ep93xx timer: refactoring
ep93xx timer: Simplified the timer code by eliminating clk_to_systicks() and
performing (almost) all manipulation of the timer structure in read_timer()

Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
2010-04-03 15:24:26 -05:00
Matthias Kaehlcke
33eef04bf8 ep93xx timer: Rename struct timer_reg pointers
ep93xx timer: Renamed pointers to struct timer_regs from name 'timer' to
'timer_regs' in order to avoid confusion with the global variable 'timer'

Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
2010-04-03 15:24:26 -05:00
Matthias Kaehlcke
d650da2dd4 ep93xx timer: Fix resolution of get_ticks()
ep93xx timer: Make get_ticks() return a value in CONFIG_SYS_HZ resolution,
as announced by get_tbclk()

Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
2010-03-22 11:58:28 -05:00
Matthias Kaehlcke
7e67fb5bf2 ep93xx timer: Fix possible overflow in usecs_to_ticks()
ep93xx timer: Use 64-bit values in usecs_to_ticks() in order to avoid
overflows in intermediate values

Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
2010-03-22 11:58:28 -05:00
Matthias Kaehlcke
c7ad13a242 ep93xx: Refactoring of timer code
ep93xx: Refactoring of the timer code, including the following changes

 * use a free running timer instead of a periodical one
 * use unsigned long long for total number of ticks
 * hold the timer state in a structure instead of separate variables
 * increment the timer counter instead of decrementing it
 * remove unused function udelay_masked()
 * remove unused function set_timer()

Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
2010-03-07 12:36:35 -06:00
Matthias Kaehlcke
d9f505e3cd ep93xx: Fix calculation of sys ticks in clk_to_systicks()
ep93xx: Use unsigned long long for calculation of sys ticks in clk_to_systicks()
for proper handling of large intermediate values

Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
2010-03-07 12:36:35 -06:00
Matthias Kaehlcke
fcfb632bd1 ARM: Add support for EP93xx SoCs
Add support for the Cirrus EP93xx platform

Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
Acked-by: Tom <Tom.Rix@windriver.com>
2010-02-12 12:31:54 -06:00