RTEMS
6.3
Toggle main menu visibility
Loading...
Searching...
No Matches
bsps
include
dev
nand
xnandpsu_bbm.h
Go to the documentation of this file.
1
/******************************************************************************
2
* Copyright (C) 2015 - 2022 Xilinx, Inc. All rights reserved.
3
* SPDX-License-Identifier: MIT
4
******************************************************************************/
5
6
/*****************************************************************************/
70
#ifndef XNANDPSU_BBM_H
/* prevent circular inclusions */
71
#define XNANDPSU_BBM_H
/* by using protection macros */
72
73
#ifdef __cplusplus
74
extern
"C"
{
75
#endif
76
77
/***************************** Include Files *********************************/
78
#include "
xnandpsu.h
"
79
80
/************************** Constant Definitions *****************************/
81
/* Block definitions for RAM based Bad Block Table (BBT) */
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
87
/* Block definitions for FLASH based Bad Block Table (BBT) */
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
93
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
115
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
136
137
#define XNANDPSU_ONDIE_SIG_OFFSET 0x4U
138
#define XNANDPSU_ONDIE_VER_OFFSET 0x14U
139
140
#define XNANDPSU_BBT_VERSION_LENGTH 1U
141
#define XNANDPSU_BBT_SIG_LENGTH 4U
142
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))
148
/**************************** Type Definitions *******************************/
149
150
/***************** Macros (Inline Functions) Definitions *********************/
151
152
/****************************************************************************/
164
#define XNandPsu_BbtBlockShift(Block) \
165
(u8)(((Block) * 2U) & XNANDPSU_BLOCK_SHIFT_MASK)
166
167
/************************** Variable Definitions *****************************/
168
169
/************************** Function Prototypes ******************************/
170
171
void
XNandPsu_InitBbtDesc
(
XNandPsu
*InstancePtr);
172
173
s32
XNandPsu_IsBlockBad
(
XNandPsu
*InstancePtr, u32 Block);
174
175
#ifdef __cplusplus
176
}
177
#endif
178
179
#endif
/* end of protection macro */
XNandPsu_IsBlockBad
s32 XNandPsu_IsBlockBad(XNandPsu *InstancePtr, u32 Block)
Definition
xnandpsu_bbm.c:891
XNandPsu_InitBbtDesc
void XNandPsu_InitBbtDesc(XNandPsu *InstancePtr)
Definition
xnandpsu_bbm.c:86
XNandPsu
Definition
xnandpsu.h:393
xnandpsu.h
Generated by
1.18.0