Changeset 61cc024 in rtems


Ignore:
Timestamp:
Mar 21, 2016, 2:02:58 PM (3 years ago)
Author:
Daniel Hellstrom <daniel@…>
Branches:
master
Children:
c442647f
Parents:
b109add
git-author:
Daniel Hellstrom <daniel@…> (03/21/16 14:02:58)
git-committer:
Daniel Hellstrom <daniel@…> (03/06/17 06:54:55)
Message:

leon, gptimer: start/reset must take RS and IP into account

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/sparc/shared/timer/gptimer.c

    rb109add r61cc024  
    378378        struct gptimer_timer *timer = (struct gptimer_timer *)hand;
    379379
    380         timer->tregs->ctrl = 0;
     380        timer->tregs->ctrl = (timer->tregs->ctrl & timer->irq_ack_mask) &
     381                             GPTIMER_CTRL_IP;
    381382        timer->tregs->reload = 0xffffffff;
    382383        timer->tregs->ctrl = GPTIMER_CTRL_LD;
     
    465466        if ( once == 0 )
    466467                ctrl |= GPTIMER_CTRL_RS; /* Restart Timer */
    467         timer->tregs->ctrl |= ctrl;
     468        timer->tregs->ctrl = ctrl | (timer->tregs->ctrl & timer->irq_ack_mask &
     469                             ~GPTIMER_CTRL_RS);
    468470}
    469471
Note: See TracChangeset for help on using the changeset viewer.