DMA utility functions. More...
|
Data Structures | |
| struct | dma_desc |
| Element in the pool of TX DMA bridge descriptors. More... | |
| struct | dma_env_tag |
| Structure describing the DMA driver environment. More... | |
Defines | |
| #define | IPC_DMA_LLI_TX_MASK 0x001F |
| Mask of the DMA LLI IRQs status bits that are assigned for TX. | |
| #define | IPC_DMA_LLI_CFM_MASK 0x0100 |
| Mask of the DMA LLI IRQs status bits that are assigned for CFM. | |
| #define | IPC_DMA_LLI_RX_MASK 0x0020 |
| Mask of the DMA LLI IRQs status bits that are assigned for RX. | |
| #define | IPC_DMA_LLI_COUNTER_EN 0x0010 |
| Indicate that an LLI counter must be incremented at the end of the LLI process. | |
| #define | IPC_DMA_LLI_COUNTER_MASK 0x000F |
| Mask of the LLI counter index to increment at the end of the LLI process. | |
| #define | IPC_DMA_LLI_COUNTER_POS 0 |
| Bit position of the LLI counter index. | |
| #define | IPC_DMA_LLI_IRQ_EN 0x1000 |
| Indicate that an IRQ must be generated at the end of the LLI process. | |
| #define | IPC_DMA_LLI_IRQ_MASK 0x0F00 |
| Mask of the LLI IRQ index to generate at the end of the LLI process. | |
| #define | IPC_DMA_LLI_IRQ_POS 8 |
| Bit position of the LLI IRQ index. | |
Enumerations | |
| enum | { IPC_DMA_CHANNEL_CTRL_RX, IPC_DMA_CHANNEL_DATA_RX, IPC_DMA_CHANNEL_CTRL_TX, IPC_DMA_CHANNEL_DATA_TX, IPC_DMA_CHANNEL_INTERNAL, IPC_DMA_CHANNEL_MAX } |
DMA channel indexes. More... | |
| enum | { IPC_DMA_LLI_DATA_AC0_TX, IPC_DMA_LLI_DATA_AC1_TX, IPC_DMA_LLI_DATA_AC2_TX, IPC_DMA_LLI_DATA_AC3_TX, IPC_DMA_LLI_DATA_BCN_TX, IPC_DMA_LLI_DATA_RX0, IPC_DMA_LLI_MSG, IPC_DMA_LLI_DBG, IPC_DMA_LLI_CFM_TX, IPC_DMA_LLI_GP_DL, IPC_DMA_LLI_DBG_DUMP, IPC_DMA_LLI_GP_UL, IPC_DMA_LLI_MAX } |
DMA LLI assignment. More... | |
Functions | |
| void | dma_init (void) |
| Initialize the bridge DMA registers. | |
| void | dma_push (struct dma_desc *first, struct dma_desc *last, int channel_idx) |
| Chains a chained list of descriptors in the DMA. | |
| void | dma_buserr_isr (void) |
| Interrupt service routine when a bus error is detected while in a DMA transfer. | |
| __INLINE void | dma_lli_disable (int lli) |
| Disable an LLI IRQ. | |
| __INLINE void | dma_lli_enable (int lli) |
| Enable an LLI IRQ. | |
| __INLINE void | dma_lli_poll (int lli) |
| Poll for an LLI IRQ. | |
Variables | |
| struct dma_env_tag | dma_env |
| DMA environment structure. | |
DMA utility functions.
| anonymous enum |
DMA channel indexes.
| anonymous enum |
DMA LLI assignment.
This mapping is more important than it looks because of the way the interrupts are mapped on the reference IP interrupt controller:
| void dma_buserr_isr | ( | void | ) |
Interrupt service routine when a bus error is detected while in a DMA transfer.
This error is considered as fatal and triggers a non-recoverable assertion.
Definition at line 85 of file dma.c.
References ASSERT_ERR.
| void dma_init | ( | void | ) |
Initialize the bridge DMA registers.
Definition at line 27 of file dma.c.
References dma_env, and dma_env_tag::last_dma.
| __INLINE void dma_lli_disable | ( | int | lli | ) |
| __INLINE void dma_lli_enable | ( | int | lli | ) |
| __INLINE void dma_lli_poll | ( | int | lli | ) |
Poll for an LLI IRQ.
| [in] | lli | LLI IRQ index (must be in range 0..15) |
Definition at line 217 of file dma.h.
References CO_BIT.
Referenced by macif_tx_cfm_done().
Chains a chained list of descriptors in the DMA.
| [in] | first | First DMA descriptor of the list (filled by the caller) |
| [in] | last | last DMA descriptor of the list (filled by the caller) |
| [in] | channel_idx | Channel index |
Definition at line 38 of file dma.c.
References ASSERT_ERR, CPU2HW, dma_env, GLOBAL_INT_DISABLE, GLOBAL_INT_RESTORE, IPC_DMA_CHANNEL_INTERNAL, dma_env_tag::last_dma, and dma_desc::next.
Referenced by macif_rx_desc_upload(), macif_tx_cfm_done(), rxl_mpdu_transfer(), rxl_payload_transfer(), and txl_int_fake_transfer().
1.6.1