fifoth

DMA and FIFO Control Fields.
Module Instance Base Address Register Address
sdmmc 0xFF704000 0xFF70404C

Offset: 0x4C

Access: RW

Important: To prevent indeterminate system behavior, reserved areas of memory must not be accessed by software or hardware. Any area of the memory map that is not explicitly defined as a register space or accessible memory is considered reserved.
Bit Fields
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16

Reserved

dw_dma_multiple_transaction_size

RW 0x0

rx_wmark

RW 0x3FF

15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

Reserved

tx_wmark

RW 0x0

fifoth Fields

Bit Name Description Access Reset
30:28 dw_dma_multiple_transaction_size

Burst size of multiple transaction; should be programmed same as DMA controller multiple-transaction-size SRC/DEST_MSIZE. The units for transfers is 32 bits. A single transfer would be signalled based on this value. Value should be sub-multiple of 512. Allowed combinations for MSize and TX_WMark.

Value Description
0x0 Msize 1 and TX_WMARK 1-1023
0x1 Msize 4 and TX_WMARK 256
0x2 Msize 8 and TX_WMARK 128
0x3 Msize 16 and TX_WMARK 64
0x5 Msize 1 and RX_WMARK 512
0x6 Msize 4 and RX_WMARK 128
0x7 Msize 8 and RX_WMARK 64
RW 0x0
27:16 rx_wmark

FIFO threshold watermark level when receiving data to card. When FIFO data count reaches greater than this number, DMA/FIFO request is raised. During end of packet, request is generated regardless of threshold programming in order to complete any remaining data. In non-DMA mode, when receiver FIFO threshold (RXDR) interrupt is enabled, then interrupt is generated instead of DMA request. During end of packet, interrupt is not generated if threshold programming is larger than any remaining data. It is responsibility of host to read remaining bytes on seeing Data Transfer Done interrupt. In DMA mode, at end of packet, even if remaining bytes are less than threshold, DMA request does single transfers to flush out any remaining bytes before Data Transfer Done interrupt is set. 12 bits - 1 bit less than FIFO-count of status register, which is 13 bits. Limitation: RX_WMark <= 1022 Recommended: 511; means greater than (FIFO_DEPTH/2) - 1) NOTE: In DMA mode during CCS time-out, the DMA does not generate the request at the end of packet, even if remaining bytes are less than threshold. In this case, there will be some data left in the FIFO. It is the responsibility of the application to reset the FIFO after the CCS timeout.

RW 0x3FF
11:0 tx_wmark

FIFO threshold watermark level when transmitting data to card. When FIFO data count is less than or equal to this number, DMA/FIFO request is raised. If Interrupt is enabled, then interrupt occurs. During end of packet, request or interrupt is generated, regardless of threshold programming. In non-DMA mode, when transmit FIFO threshold (TXDR) interrupt is enabled, then interrupt is generated instead of DMA request. During end of packet, on last interrupt, host is responsible for filling FIFO with only required remaining bytes (not before FIFO is full or after CIU completes data transfers, because FIFO may not be empty). In DMA mode, at end of packet, if last transfer is less than burst size, DMA controller does single cycles until required bytes are transferred. 12 bits - 1 bit less than FIFO-count of status register, which is 13 bits. Limitation: TX_WMark >= 1; Recommended: FIFO_DEPTH/2 = 512; (means less than or equal to 512)

RW 0x0