82#define XNANDPSU_BLOCK_GOOD 0x0U
83#define XNANDPSU_BLOCK_BAD 0x1U
84#define XNANDPSU_BLOCK_RESERVED 0x2U
85#define XNANDPSU_BLOCK_FACTORY_BAD 0x3U
88#define XNANDPSU_FLASH_BLOCK_GOOD 0x3U
89#define XNANDPSU_FLASH_BLOCK_BAD 0x2U
90#define XNANDPSU_FLASH_BLOCK_RESERVED 0x1U
91#define XNANDPSU_FLASH_BLOCK_FAC_BAD 0x0U
94#define XNANDPSU_BBT_SCAN_2ND_PAGE 0x00000001U
99#define XNANDPSU_BBT_DESC_PAGE_OFFSET 0U
101#define XNANDPSU_BBT_DESC_SIG_OFFSET 8U
103#define XNANDPSU_BBT_DESC_VER_OFFSET 12U
105#define XNANDPSU_NO_OOB_BBT_DESC_SIG_OFFSET 0U
108#define XNANDPSU_NO_OOB_BBT_DESC_VER_OFFSET 4U
111#define XNANDPSU_BBT_DESC_SIG_LEN 4U
113#define XNANDPSU_BBT_DESC_MAX_BLOCKS 64U
116#define XNANDPSU_BBT_BLOCK_SHIFT 2U
118#define XNANDPSU_BBT_ENTRY_NUM_BLOCKS 4U
120#define XNANDPSU_BB_PTRN_OFF_SML_PAGE 5U
122#define XNANDPSU_BB_PTRN_LEN_SML_PAGE 1U
124#define XNANDPSU_BB_PTRN_OFF_LARGE_PAGE 0U
127#define XNANDPSU_BB_PTRN_LEN_LARGE_PAGE 2U
129#define XNANDPSU_BB_PATTERN 0xFFU
132#define XNANDPSU_BLOCK_TYPE_MASK 0x03U
133#define XNANDPSU_BLOCK_SHIFT_MASK 0x06U
137#define XNANDPSU_ONDIE_SIG_OFFSET 0x4U
138#define XNANDPSU_ONDIE_VER_OFFSET 0x14U
140#define XNANDPSU_BBT_VERSION_LENGTH 1U
141#define XNANDPSU_BBT_SIG_LENGTH 4U
143#define XNANDPSU_BBT_BUF_LENGTH ((XNANDPSU_MAX_BLOCKS >> \
144 XNANDPSU_BBT_BLOCK_SHIFT) + \
145 (XNANDPSU_BBT_DESC_SIG_OFFSET + \
146 XNANDPSU_BBT_SIG_LENGTH + \
147 XNANDPSU_BBT_VERSION_LENGTH))
164#define XNandPsu_BbtBlockShift(Block) \
165 (u8)(((Block) * 2U) & XNANDPSU_BLOCK_SHIFT_MASK)
s32 XNandPsu_IsBlockBad(XNandPsu *InstancePtr, u32 Block)
Definition: xnandpsu_bbm.c:887
void XNandPsu_InitBbtDesc(XNandPsu *InstancePtr)
Definition: xnandpsu_bbm.c:82
Definition: xnandpsu.h:380