Регистры Allwinner H616

Сокращения  |  Дерево шин  |  Карта памяти


SMHC_FIFOTH
5.3.5. FIFO Water Level Register - адрес: 0x4020040 0x4021040 0x4022040 (смещение: 0x0040)

Хост-контроллер SD / MMC (SMHC): список регистров



31 ||||||||||||||||| 16
15 ||||||||||||||||| 00

  Unused

Bit 31

  BSIZE_OF_TRANS

Bits 30 : 28
R/W
0x0

Burst Size of Multiple Transaction
000: 1 transfers
001: 4
010: 8
011: 16
Others: Reserved

It should be programmed same as DMA controller multiple transaction
size. The units for transfers are the DWORD. A single transfer would be
signaled based on this value. Value should be sub-multiple of (RX_TL + 1)
and (FIFO_DEPTH - TX_TL)
FIFO_DEPTH = 256, FIFO_SIZE = 256 * 32 = 1K
Recommended:
MSize = 16, TX_TL = 240, RX_TL = 15 (for SMHC2)
MSize = 8, TX_TL = 248, RX_TL = 7 (for SMHC0,SMHC1)


  Unused

Bits 27 : 24

  RX_TL

Bits 23 : 16
R/W
0xF

RX Trigger Level
0x0~0xFE: RX Trigger Level is 0~254
0xFF: Reserved
FIFO threshold when FIFO request host to receive data from FIFO. When
FIFO data level is greater than this value, DMA is request is raised if DMA
enabled, or RX interrupt bit is set if interrupt enabled. At the end of
packet, if the last transfer is less than this level, the value is ignored and
relative request will be raised as usual.
Recommended:
15 (means greater than 15, for SMHC2)
7 (means greater than 7, for SMHC0,SMHC1)


  Unused

Bits 15 : 8

  TX_TL

Bits 7 : 0
R/W
0x0

TX Trigger Level
0x1~0xFF: TX Trigger Level is 1~255
0x0: No trigger
FIFO threshold when FIFO requests host to transmit data to FIFO. When
FIFO data level is less than or equal to this value, DMA TX request is
raised if DMA enabled, or TX request interrupt bit is set if interrupt
enabled. At the end of packet, if the last transfer is less than this level,
the value is ignored and relative request will be raised as usual.
Recommended:
240(means less than or equal to 240, for SMHC2)
248(means less than or equal to 248, for SMHC0,SMHC1)



Команда U-Boot для чтения регистра

md 4020040 1
md 4021040 1
md 4022040 1



Bit fields structure

typedef union  smhc_fifoth
{
  struct
  {
   unsigned tx_tl : 8;
   unsigned unused0 : 8;
   unsigned rx_tl : 8;
   unsigned unused1 : 4;
   unsigned bsize_of_trans : 3;
   unsigned unused2 : 1;
  } b;
   unsigned long w;
} SMHC_FIFOTH
   

Allwinner H616 Manual