Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 41552913 in mainline


Ignore:
Timestamp:
2012-03-15T20:54:48Z (10 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master
Children:
b1c43bd
Parents:
b56481c
Message:

amdm37x,gpt: Add interrupt ack routine. Initialize counter.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/genarch/include/drivers/amdm37x_gpt/amdm37x_gpt.h

    rb56481c r41552913  
    209209        timer->regs = (void*) km_map(ioregs, iosize, PAGE_NOT_CACHEABLE);
    210210
    211 
    212211        /* Set autoreload */
    213212        timer->regs->tclr = AMDM37x_GPT_TCLR_AR_FLAG;
     
    218217            (ioregs == AMDM37x_GPT10_BASE_ADDRESS));
    219218        timer->regs->tldr = 0xffffffff - (32768 / hz) + 1;
     219        timer->regs->tccr = 0xffffffff - (32768 / hz) + 1;
    220220        if (timer->special_available) {
    221221                /* Set values for according to formula (manual p. 2733) */
     
    241241}
    242242
     243static inline void amdm37x_gpt_irq_ack(amdm37x_gpt_t* timer)
     244{
     245        ASSERT(timer);
     246        ASSERT(timer->regs);
     247        /* Clear all pending interrupts */
     248        timer->regs->tisr = timer->regs->tisr;
     249}
     250
    243251#endif
    244252
Note: See TracChangeset for help on using the changeset viewer.