Changeset 296b60d7 in rtems


Ignore:
Timestamp:
Jul 9, 2013, 2:04:04 PM (6 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
d168079
Parents:
4fe3ad2
git-author:
Sebastian Huber <sebastian.huber@…> (07/09/13 14:04:04)
git-committer:
Sebastian Huber <sebastian.huber@…> (07/09/13 14:42:00)
Message:

bsp/virtex: Fix interrupt handling

Some modules like the XPS UART Lite use event triggered interrupts. If
we acknowledge the interrupts after the interrupt service we may loose
these events.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/powerpc/virtex/irq/irq_init.c

    r4fe3ad2 r296b60d7  
    8282static void BSP_irq_handle_at_opbintc(void)
    8383{
    84   uint32_t ipr, mask, i, c;
     84  uint32_t ipr, i, c;
     85
     86  /* Get pending interrupts */
    8587  ipr = get_ipr();
    8688
    87   c = 0;
    88   mask = 0;
     89  /* Acknowledge all pending interrupts now and service them afterwards */
     90  set_iar(ipr);
    8991
    9092  for (i = 0;
     
    9698    if ((ipr & c) != 0) {
    9799      /* interrupt is asserted */
    98       mask |= c;
    99100      ipr &= ~c;
    100101
    101102      bsp_interrupt_handler_dispatch(i+BSP_OPBINTC_IRQ_LOWEST_OFFSET);
    102103    }
    103   }
    104 
    105   if (mask) {
    106     /* ack all the interrupts we serviced */
    107     set_iar(mask);
    108104  }
    109105}
Note: See TracChangeset for help on using the changeset viewer.