3.8.4. Descriptor Chain
The SSGDMA IP descriptors are formed in a block of contiguous 4k Bytes in host memory which can hold up to 128 descriptors where each descriptor is 32 bytes in size. The descriptor block starts with Link Descriptor which host the next block address that chain the block together. The descriptor block is also holding the number of descriptors present in the block. There is a maximum of 127 Data descriptors following the Link Descriptor.
The descriptor blocks can be chained in a loop from last descriptor block back to the first descriptor block via Link Descriptor per the maximum descriptor blocks in a queue configured in Q_SIZE register as in figure Descriptor Chain / Ring buffer for Descriptor Blocks (Continuous Ring). The hardware stops fetching from next new block when SSGDMA Q_EXTRACT_POINTER is equal to Q_INSERT_POINTER as in Descriptor Chain for Descriptor Blocks (Stop at Last Descriptor).
The responder chain is required when Write-back is enabled for completion status update. A responder block contains 128 x256bits(32 bytes) responder. The SSGDMA IP is designed to have 128 blocks of Responder block, which in return support a maximum responder circular buffer of 128 blocks x 128 x 32 Bytes = 512kByes in size. Each responder block is chained in a manner where the base address of the descriptor block hosted in Responder Table (configurable via Q_RESPONDER_ADDR_L/H).
During the initialization of the queue, the driver needs to form the responder chain and fill up the physical address of the base offset for each block into Responder Table based on the maximum responder blocks configured in Q_RESP_SIZE. During the completion of each descriptor, the SSGDMA IP hardware writes the responder descriptor in sequence. On driver, it polls the " Complete" bit in the responder structure to determine if it is valid. Upon service the responder, it moves on to poll on the next responder's " Complete" bit.