diff options
Diffstat (limited to 'c/src/libchip/network/dwmac-core.c')
-rw-r--r-- | c/src/libchip/network/dwmac-core.c | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/c/src/libchip/network/dwmac-core.c b/c/src/libchip/network/dwmac-core.c index 1050751e57..973441a511 100644 --- a/c/src/libchip/network/dwmac-core.c +++ b/c/src/libchip/network/dwmac-core.c @@ -41,12 +41,17 @@ #define DWMAC_CORE_INTR_ENABLE_DEFAULT_MASK_TX \ ( \ DMAGRP_INTERRUPT_ENABLE_NIE \ - | DMAGRP_INTERRUPT_ENABLE_TIE \ | DMAGRP_INTERRUPT_ENABLE_FBE \ | DMAGRP_INTERRUPT_ENABLE_UNE \ | DMAGRP_INTERRUPT_ENABLE_AIE \ ) +#define DWMAC_CORE_INTR_ENABLE_ALL_MASK_TX \ + ( \ + DWMAC_CORE_INTR_ENABLE_DEFAULT_MASK_TX \ + | DMAGRP_INTERRUPT_ENABLE_TIE \ + ) + #define DWMAC_CORE_INTR_STATUS_DEFAULT_MASK_RX \ ( \ DMAGRP_STATUS_NIS \ @@ -67,19 +72,29 @@ void dwmac_core_dma_restart_tx( dwmac_common_context *self ) self->dmagrp->transmit_poll_demand = 1; } -void dwmac_core_enable_dma_irq_tx( dwmac_common_context *self ) +void dwmac_core_enable_dma_irq_tx_default( dwmac_common_context *self ) { self->dmagrp->interrupt_enable |= DWMAC_CORE_INTR_ENABLE_DEFAULT_MASK_TX; } +void dwmac_core_enable_dma_irq_tx_transmitted( dwmac_common_context *self ) +{ + self->dmagrp->interrupt_enable |= DMAGRP_INTERRUPT_ENABLE_TIE; +} + void dwmac_core_enable_dma_irq_rx( dwmac_common_context *self ) { self->dmagrp->interrupt_enable |= DWMAC_CORE_INTR_ENABLE_DEFAULT_MASK_RX; } -void dwmac_core_disable_dma_irq_tx( dwmac_common_context *self ) +void dwmac_core_disable_dma_irq_tx_all( dwmac_common_context *self ) +{ + self->dmagrp->interrupt_enable &= ~DWMAC_CORE_INTR_ENABLE_ALL_MASK_TX; +} + +void dwmac_core_disable_dma_irq_tx_transmitted( dwmac_common_context *self ) { - self->dmagrp->interrupt_enable &= ~DWMAC_CORE_INTR_ENABLE_DEFAULT_MASK_TX; + self->dmagrp->interrupt_enable &= ~DMAGRP_INTERRUPT_ENABLE_TIE; } void dwmac_core_reset_dma_irq_status_tx( dwmac_common_context *self ) |