35 alert_idx = DMA_ALERT_TEST_FATAL_FAULT_BIT;
42 mmio_region_write32(dma->
base_addr, (ptrdiff_t)DMA_ALERT_TEST_REG_OFFSET,
55 *index_out = DMA_INTR_COMMON_DMA_DONE_BIT;
58 *index_out = DMA_INTR_COMMON_DMA_CHUNK_DONE_BIT;
61 *index_out = DMA_INTR_COMMON_DMA_ERROR_BIT;
83 *type = irq_types[irq];
91 if (dma == NULL || snapshot == NULL) {
96 mmio_region_read32(dma->
base_addr, (ptrdiff_t)DMA_INTR_STATE_REG_OFFSET);
108 mmio_region_write32(dma->
base_addr, (ptrdiff_t)DMA_INTR_STATE_REG_OFFSET,
117 if (dma == NULL || is_pending == NULL) {
122 if (!dma_get_irq_bit_index(irq, &index)) {
126 uint32_t intr_state_reg =
127 mmio_region_read32(dma->
base_addr, (ptrdiff_t)DMA_INTR_STATE_REG_OFFSET);
141 mmio_region_write32(dma->
base_addr, (ptrdiff_t)DMA_INTR_STATE_REG_OFFSET,
154 if (!dma_get_irq_bit_index(irq, &index)) {
160 mmio_region_write32(dma->
base_addr, (ptrdiff_t)DMA_INTR_STATE_REG_OFFSET,
174 if (!dma_get_irq_bit_index(irq, &index)) {
179 mmio_region_write32(dma->
base_addr, (ptrdiff_t)DMA_INTR_TEST_REG_OFFSET,
188 if (dma == NULL || state == NULL) {
193 if (!dma_get_irq_bit_index(irq, &index)) {
197 uint32_t intr_enable_reg =
198 mmio_region_read32(dma->
base_addr, (ptrdiff_t)DMA_INTR_ENABLE_REG_OFFSET);
214 if (!dma_get_irq_bit_index(irq, &index)) {
218 uint32_t intr_enable_reg =
219 mmio_region_read32(dma->
base_addr, (ptrdiff_t)DMA_INTR_ENABLE_REG_OFFSET);
223 mmio_region_write32(dma->
base_addr, (ptrdiff_t)DMA_INTR_ENABLE_REG_OFFSET,
237 if (snapshot != NULL) {
238 *snapshot = mmio_region_read32(dma->
base_addr,
239 (ptrdiff_t)DMA_INTR_ENABLE_REG_OFFSET);
243 mmio_region_write32(dma->
base_addr, (ptrdiff_t)DMA_INTR_ENABLE_REG_OFFSET,
252 if (dma == NULL || snapshot == NULL) {
256 mmio_region_write32(dma->
base_addr, (ptrdiff_t)DMA_INTR_ENABLE_REG_OFFSET,