Ignore:
Timestamp:
Jan 22, 2017, 2:58:18 PM (4 years ago)
Author:
Daniel Hellstrom <daniel@…>
Branches:
5, master
Children:
1b559e3
Parents:
8acfa94
git-author:
Daniel Hellstrom <daniel@…> (01/22/17 14:58:18)
git-committer:
Daniel Hellstrom <daniel@…> (03/06/17 06:54:55)
Message:

leon, grspw_pkt: ISR RX/TX DMA interrupt source disable configurable

This patch introduces some new options to let the user control when

the ISR shall disable DMA RX/TX interrupt. The ISR can be set in three
modes when a RX/TX DMA interrupt is asserted:

1) ISR will always clear both RX/TX DMA interrupt enable. (DEFAULT).
2) ISR will never never RX or TX DMA interrupt enable, ISR will

leave RX/TX DMA interrupt enable untouched.

3) ISR will clear the interrupt enable(s) causing the interrupt,

this allows separate RX and TX IRQ handling.

This patch is backwards compatible since default mode 1) is activated
when the grspw_dma_config.flags DMAFLAGS2_IRQD field is 0.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/sparc/shared/include/grspw_pkt.h

    r8acfa94 r94fb377b  
    271271                                         * when rx_irq_en_cnt=0.
    272272                                         */
    273 #define DMAFLAG2_MASK   (DMAFLAG2_TXIE | DMAFLAG2_RXIE)
     273/* Defines how the ISR will disable RX/TX DMA interrupt source when a DMA RX/TX
     274 * interrupt has happended. DMA Error Interrupt always disables both RX/TX DMA
     275 * interrupt. By default both RX/TX IRQs are disabled when either a RX, TX or
     276 * both RX/TX DMA interrupt has been requested. The work-task, custom
     277 * application handler or custom ISR handler is responsible to re-enable
     278 * DMA interrupts.
     279 */
     280#define DMAFLAG2_IRQD_SRC  0x01000000   /* Disable triggering RX/TX source */
     281#define DMAFLAG2_IRQD_NONE 0x00c00000   /* Never disable RX/TX IRQ in ISR */
     282#define DMAFLAG2_IRQD_BOTH 0x00000000   /* Always disable both RX/TX sources */
     283#define DMAFLAG2_IRQD_MASK 0x01c00000   /* Mask of options */
     284#define DMAFLAG2_IRQD_BIT  22
     285
     286#define DMAFLAG2_MASK   (DMAFLAG2_TXIE | DMAFLAG2_RXIE | DMAFLAG2_IRQD_MASK)
    274287
    275288struct grspw_dma_config {
Note: See TracChangeset for help on using the changeset viewer.