MODIFICATION HISTORY:
Ver Who Date Changes ----- ------ -------- ---------------------------------------------- 1.00 hbm 08/19/2010 First Release 1.00 nm 05/25/2011 Updated for minor doxygen corrections 1.02a sg 05/16/2012 Made changes for doxygen and moved some function header from the xdmaps.h file to xdmaps.c file Other cleanup for coding guidelines and CR 657109 and CR 657898 1.03a sg 07/16/2012 changed inline to __inline for CR665681 1.04a nm 10/22/2012 Fixed CR# 681671. 1.05a nm 04/15/2013 Fixed CR# 704396. Removed warnings when compiled with -Wall and -Wextra option in bsp. 05/01/2013 Fixed CR# 700189. Changed XDmaPs_BuildDmaProg() function description. Fixed CR# 704396. Removed unused variables UseM2MByte & MemBurstLen from XDmaPs_BuildDmaProg() function. 1.07a asa 11/02/13. Made changes to fix compilation issues for iarcc. Removed the PDBG prints. By default they were always defined out and never used. The PDBG is non-standard for Xilinx drivers and no other driver does something similar. Since there is no easy way to fix compilation issues with the IARCC compiler around PDBG, it is better to remove it. Users can always use xil_printfs if they want to debug.
#include <string.h>
#include "xstatus.h"
#include "xdmaps.h"
#include "xil_io.h"
#include "xil_cache.h"
#include "xil_printf.h"
Functions | |
int | XDmaPs_CfgInitialize (XDmaPs *InstPtr, XDmaPs_Config *Config, u32 EffectiveAddr) |
int | XDmaPs_ResetManager (XDmaPs *InstPtr) |
int | XDmaPs_ResetChannel (XDmaPs *InstPtr, unsigned int Channel) |
void | XDmaPs_FaultISR (XDmaPs *InstPtr) |
int | XDmaPs_SetDoneHandler (XDmaPs *InstPtr, unsigned Channel, XDmaPsDoneHandler DoneHandler, void *CallbackRef) |
int | XDmaPs_SetFaultHandler (XDmaPs *InstPtr, XDmaPsFaultHandler FaultHandler, void *CallbackRef) |
__inline int | XDmaPs_Instr_DMAEND (char *DmaProg) |
__inline int | XDmaPs_Instr_DMAGO (char *DmaProg, unsigned int Cn, u32 Imm, unsigned int Ns) |
__inline int | XDmaPs_Instr_DMALD (char *DmaProg) |
__inline int | XDmaPs_Instr_DMALP (char *DmaProg, unsigned Lc, unsigned LoopIterations) |
__inline int | XDmaPs_Instr_DMALPEND (char *DmaProg, char *BodyStart, unsigned Lc) |
__inline int | XDmaPs_Instr_DMAMOV (char *DmaProg, unsigned Rd, u32 Imm) |
__inline int | XDmaPs_Instr_DMANOP (char *DmaProg) |
__inline int | XDmaPs_Instr_DMARMB (char *DmaProg) |
__inline int | XDmaPs_Instr_DMASEV (char *DmaProg, unsigned int EventNumber) |
__inline int | XDmaPs_Instr_DMAST (char *DmaProg) |
__inline int | XDmaPs_Instr_DMAWMB (char *DmaProg) |
__inline unsigned | XDmaPs_ToEndianSwapSizeBits (unsigned int EndianSwapSize) |
__inline unsigned | XDmaPs_ToBurstSizeBits (unsigned BurstSize) |
u32 | XDmaPs_ToCCRValue (XDmaPs_ChanCtrl *ChanCtrl) |
int | XDmaPs_ConstructSingleLoop (char *DmaProgStart, int CacheLength, char *DmaProgLoopStart, int LoopCount) |
int | XDmaPs_ConstructNestedLoop (char *DmaProgStart, int CacheLength, char *DmaProgLoopStart, unsigned int LoopCountOuter, unsigned int LoopCountInner) |
int | XDmaPs_GenDmaProg (XDmaPs *InstPtr, unsigned int Channel, XDmaPs_Cmd *Cmd) |
int | XDmaPs_FreeDmaProg (XDmaPs *InstPtr, unsigned int Channel, XDmaPs_Cmd *Cmd) |
int | XDmaPs_Start (XDmaPs *InstPtr, unsigned int Channel, XDmaPs_Cmd *Cmd, int HoldDmaProg) |
int | XDmaPs_IsActive (XDmaPs *InstPtr, unsigned int Channel) |
void | XDmaPs_DoneISR_0 (XDmaPs *InstPtr) |
void | XDmaPs_DoneISR_1 (XDmaPs *InstPtr) |
void | XDmaPs_DoneISR_2 (XDmaPs *InstPtr) |
void | XDmaPs_DoneISR_3 (XDmaPs *InstPtr) |
void | XDmaPs_DoneISR_4 (XDmaPs *InstPtr) |
void | XDmaPs_DoneISR_5 (XDmaPs *InstPtr) |
void | XDmaPs_DoneISR_6 (XDmaPs *InstPtr) |
void | XDmaPs_DoneISR_7 (XDmaPs *InstPtr) |
void | XDmaPs_Print_DmaProg (XDmaPs_Cmd *Cmd) |
|
Initializes a specific XDmaPs instance such that it is ready to be used. The data format of the device is setup for 8 data bits, 1 stop bit, and no parity by default. The baud rate is set to a default value specified by Config->DefaultBaudRate if set, otherwise it is set to 19.2K baud. The receive FIFO threshold is set for 8 bytes. The default operating mode of the driver is polled mode.
|
|
Construct a nested loop with only DMALD and DMAST in the inner loop body. It uses loop counter 1 for the outer loop and loop counter 0 for the inner loop.
|
|
Construct a loop with only DMALD and DMAST as the body using loop counter 0. The function also makes sure the loop body and the lpend is in the same cache line.
|
|
Driver done interrupt service routine for channel 0. We need this done ISR mainly because the driver needs to release the DMA program buffer. This is the one that connects the GIC
|
|
Driver done interrupt service routine for channel 1. We need this done ISR mainly because the driver needs to release the DMA program buffer. This is the one that connects the GIC
|
|
Driver done interrupt service routine for channel 2. We need this done ISR mainly because the driver needs to release the DMA program buffer. This is the one that connects the GIC
|
|
Driver done interrupt service routine for channel 3. We need this done ISR mainly because the driver needs to release the DMA program buffer. This is the one that connects the GIC
|
|
Driver done interrupt service routine for channel 4. We need this done ISR mainly because the driver needs to release the DMA program buffer. This is the one that connects the GIC
|
|
Driver done interrupt service routine for channel 5. We need this done ISR mainly because the driver needs to release the DMA program buffer. This is the one that connects the GIC
|
|
Driver done interrupt service routine for channel 6. We need this done ISR mainly because the driver needs to release the DMA program buffer. This is the one that connects the GIC
|
|
Driver done interrupt service routine for channel 7. We need this done ISR mainly because the driver needs to release the DMA program buffer. This is the one that connects the GIC
|
|
Driver fault interrupt service routine This is the one that connects the GIC
|
|
Free the DMA program buffer that is pointed by the GeneratedDmaProg field of the command.
|
|
Generate a DMA program based for the DMA command, the buffer will be pointed by the GeneratedDmaProg field of the command.
|
|
Construction function for DMAEND instruction. This function fills the program buffer with the constructed instruction.
|
|
Construction function for DMAGO instruction. This function fills the program buffer with the constructed instruction.
|
|
Construction function for DMALD instruction. This function fills the program buffer with the constructed instruction.
|
|
Construction function for DMALP instruction. This function fills the program buffer with the constructed instruction.
|
|
Construction function for DMALPEND instruction. This function fills the program buffer with the constructed instruction.
|
|
Construction function for DMAMOV instruction. This function fills the program buffer with the constructed instruction.
|
|
Construction function for DMANOP instruction. This function fills the program buffer with the constructed instruction.
|
|
Construction function for DMARMB instruction. This function fills the program buffer with the constructed instruction.
|
|
Construction function for DMASEV instruction. This function fills the program buffer with the constructed instruction.
|
|
Construction function for DMAST instruction. This function fills the program buffer with the constructed instruction.
|
|
Construction function for DMAWMB instruction. This function fills the program buffer with the constructed instruction.
|
|
Checks whether the DMA channel is active or idle.
|
|
Print the Dma Prog Contents.
|
|
Reset the specified DMA Channel.
|
|
Reset the DMA Manager.
|
|
Set the done handler for a channel.
|
|
Set the fault handler for a channel.
|
|
Start a DMA command. The command can only be invoked when the channel is idle. The driver takes the command, generates DMA program if needed, then pass the program to DMAC to execute.
|
|
Conversion function from the burst size to the bit encoding of the CCR
|
|
Conversion function from PL330 bus transfer descriptors to CCR value. All the values passed to the functions are in terms of assembly languages, not in terms of the register bit encoding.
|
|
Conversion function from the endian swap size to the bit encoding of the CCR
|