Регистры Allwinner H616

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


NDFC_USER_DATA_LEN_N
5.2.5. NDFC User Data Length Register(N from 0 to 3) - адрес: 0x4081004 (смещение: 0x0070+0x04*N)

Контроллер Nand Flash (NDFC): список регистров



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

  ECC_DATA_LEN7

Bits 31 : 28
R/W
0x0

It's used to indicate user data's length of ECC DATA BLOCK [0x08*N+7].
0000: no user data
0001: 4 bytes user data
0010: 8 bytes user data
0011: 12 bytes user data
0100: 16 bytes user data
0101: 20 bytes user data
0110: 24 bytes user data
0111: 28 bytes user data
1000: 32 bytes user data
Other : reserved


  ECC_DATA_LEN6

Bits 27 : 24
R/W
0x0

It's used to indicate user data's length of ECC DATA BLOCK [0x08*N+6].
0000: no user data
0001: 4 bytes user data
0010: 8 bytes user data
0011: 12 bytes user data
0100: 16 bytes user data
0101: 20 bytes user data
0110: 24 bytes user data
0111: 28 bytes user data
1000: 32 bytes user data
Other : reserved


  ECC_DATA_LEN5

Bits 23 : 20
R/W
0x0

It's used to indicate user data's length of ECC DATA BLOCK [0x08*N+5].
0000: no user data
0001: 4 bytes user data
0010: 8 bytes user data
0011: 12 bytes user data
0100: 16 bytes user data
0101: 20 bytes user data
0110: 24 bytes user data
0111: 28 bytes user data
1000: 32 bytes user data
Other : reserved


  ECC_DATA_LEN4

Bits 19 : 16
R/W
0x0

It's used to indicate user data's length of ECC DATA BLOCK [0x08*N+4].
0000: no user data
0001: 4 bytes user data
0010: 8 bytes user data
0011: 12 bytes user data
0100: 16 bytes user data
0101: 20 bytes user data
0110: 24 bytes user data
0111: 28 bytes user data
1000: 32 bytes user data
Other : reserved


  ECC_DATA_LEN3

Bits 15 : 12
R/W
0x0

It's used to indicate user data's length of ECC DATA BLOCK [0x08*N+3].
0000: no user data
0001: 4 bytes user data
0010: 8 bytes user data
0011: 12 bytes user data
0100: 16 bytes user data
0101: 20 bytes user data
0110: 24 bytes user data
0111: 28 bytes user data
1000: 32 bytes user data
Other : reserved


  ECC_DATA_LEN2

Bits 11 : 8
R/W
0x0

It's used to indicate user data's length of ECC DATA BLOCK [0x08*N+2].
0000: no user data
0001: 4 bytes user data
0010: 8 bytes user data
0011: 12 bytes user data
0100: 16 bytes user data
0101: 20 bytes user data
0110: 24 bytes user data
0111: 28 bytes user data
1000: 32 bytes user data
Other : reserved


  ECC_DATA_LEN1

Bits 7 : 4
R/W
0x0

It's used to indicate user data's length of ECC DATA BLOCK [0x08*N+1].
0000: no user data
0001: 4 bytes user data
0010: 8 bytes user data
0011: 12 bytes user data
0100: 16 bytes user data
0101: 20 bytes user data
0110: 24 bytes user data
0111: 28 bytes user data
1000: 32 bytes user data
Other : reserved


  ECC_DATA_LEN0

Bits 3 : 0
R/W
0x0

It's used to indicate user data's length of ECC DATA BLOCK [0x08*N].
0000: no user data
0001: 4 bytes user data
0010: 8 bytes user data
0011: 12 bytes user data
0100: 16 bytes user data
0101: 20 bytes user data
0110: 24 bytes user data
0111: 28 bytes user data
1000: 32 bytes user data
Other : reserved



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

md 4081004 1



Bit fields structure

typedef union  ndfc_user_data_len_n
{
  struct
  {
   unsigned ecc_data_len0 : 4;
   unsigned ecc_data_len1 : 4;
   unsigned ecc_data_len2 : 4;
   unsigned ecc_data_len3 : 4;
   unsigned ecc_data_len4 : 4;
   unsigned ecc_data_len5 : 4;
   unsigned ecc_data_len6 : 4;
   unsigned ecc_data_len7 : 4;
  } b;
   unsigned long w;
} NDFC_USER_DATA_LEN_N
   

Allwinner H616 Manual