Changeset 08d059a in mainline
- Timestamp:
- 2012-03-13T04:08:21Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d1714e8
- Parents:
- 08a2007
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/genarch/include/drivers/amdm37x_gpt/amdm37x_gpt.h
r08a2007 r08d059a 202 202 timer->regs = (void*) km_map(ioregs, iosize, PAGE_NOT_CACHEABLE); 203 203 204 /* Set tldr and tccr */205 timer->regs->tldr = 0xffffffff - 32768 / hz;206 timer->regs->tccr = 0xffffffff - 32768 / hz;207 204 208 205 /* Set autoreload */ … … 213 210 (ioregs == AMDM37x_GPT2_BASE_ADDRESS) || 214 211 (ioregs == AMDM37x_GPT10_BASE_ADDRESS)); 212 timer->regs->tldr = 0xffffffff - (32768 / hz) + 1; 213 if (timer->special_available) { 214 /* Set values for according to formula (manual p. 2733) */ 215 const uint32_t tpir = 216 ((32768 / hz + 1) * 1000000) - (32768000L * (1000 / hz)); 217 const uint32_t tnir = 218 ((32768 / hz) * 1000000) - (32768000 * (1000 / hz)); 219 timer->regs->tpir = tpir; 220 timer->regs->tnir = tnir; 221 } 215 222 216 223 }
Note:
See TracChangeset
for help on using the changeset viewer.