Changeset 4c754f6 in mainline for kernel/genarch/src/drivers/am335x/timer.c
- Timestamp:
- 2013-02-11T22:55:29Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0f66886
- Parents:
- 40762c6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/genarch/src/drivers/am335x/timer.c
r40762c6 r4c754f6 56 56 57 57 void 58 am335x_timer_init(am335x_timer_t *timer, am335x_timer_id_t id, unsigned hz) 58 am335x_timer_init(am335x_timer_t *timer, am335x_timer_id_t id, unsigned hz, 59 unsigned srcclk_hz) 59 60 { 60 61 uintptr_t base_addr; … … 86 87 regs->tclr |= AM335x_TIMER_TCLR_AR_FLAG; 87 88 88 /* XXX Here we assume that the timer clock source 89 * is running at 32 Khz but this is not always the 90 * case; DMTIMER[2 - 7] can use the internal system 24 Mhz 91 * clock source or an external clock also. 92 */ 93 unsigned const count = 0xFFFFFFFE - 32768 / hz; 89 /* Disable the emulation mode */ 90 regs->tiocp_cfg |= AM335x_TIMER_TIOCPCFG_EMUFREE_FLAG; 91 92 unsigned const count = 0xFFFFFFFE - (srcclk_hz / hz); 94 93 regs->tcrr = count; 95 94 regs->tldr = count;
Note:
See TracChangeset
for help on using the changeset viewer.