nandpsu: xnandpsu.h File Reference

| nandpsu Xilinx SDK Drivers API Documentation

- Overview
- Data Structures
- APIs
- File List
- Examples

Data Structures | Macros | Enumerations | Functions
xnandpsu.h File Reference

## Data Structures
struct | XNandPsu_Config
| The XNandPsu_Config structure contains configuration information for NAND controller. More...
struct | XNandPsu_BbtDesc
| Bad block table descriptor. More...
struct | XNandPsu_BadBlockPattern
| Bad block pattern. More...
struct | XNandPsu_Geometry
| The XNandPsu_Geometry structure contains the ONFI geometry information. More...
struct | XNandPsu_Features
| The XNandPsu_Features structure contains the ONFI features information. More...
struct | XNandPsu_EccMatrix
| The XNandPsu_EccMatrix structure contains ECC features information. More...
struct | XNandPsu_EccCfg
| The XNandPsu_EccCfg structure contains ECC configuration. More...
struct | XNandPsu
| The XNandPsu structure contains the driver instance data. More...

## Macros
#define | XNANDPSU_MAX_TARGETS 1U
| ce_n0, ce_n1 More...
#define | XNANDPSU_MAX_PKT_SIZE 0x7FFU
| Max packet size. More...
#define | XNANDPSU_MAX_PKT_COUNT 0xFFFU
| Max packet count. More...
#define | XNANDPSU_PAGE_SIZE_512 512U
| 512 bytes page More...
#define | XNANDPSU_PAGE_SIZE_2K 2048U
| 2K bytes page More...
#define | XNANDPSU_PAGE_SIZE_4K 4096U
| 4K bytes page More...
#define | XNANDPSU_PAGE_SIZE_8K 8192U
| 8K bytes page More...
#define | XNANDPSU_PAGE_SIZE_16K 16384U
| 16K bytes page More...
#define | XNANDPSU_PAGE_SIZE_1K_16BIT 1024U
| 16-bit 2K bytes page More...
#define | XNANDPSU_MAX_PAGE_SIZE 16384U
| Max page size supported. More...
#define | XNANDPSU_HAMMING 0x1U
| Hamming Flash. More...
#define | XNANDPSU_BCH 0x2U
| BCH Flash. More...
#define | XNANDPSU_MAX_BLOCKS 16384U
| Max number of Blocks. More...
#define | XNANDPSU_MAX_SPARE_SIZE 0x800U
| Max spare bytes of a NAND flash page of 16K. More...
#define | XNandPsu_SetBits(InstancePtr, RegOffset, BitMask)
| This macro sets the bitmask in the register. More...
#define | XNandPsu_ClrBits(InstancePtr, RegOffset, BitMask)
| This macro clears the bitmask in the register. More...
#define | XNandPsu_ReadModifyWrite(InstancePtr, RegOffset, Mask, Value)
| This macro clears and updates the bitmask in the register. More...
#define | XNandPsu_IntrSigEnable(InstancePtr, Mask)
| This macro enables bitmask in Interrupt Signal Enable register. More...
#define | XNandPsu_IntrSigClear(InstancePtr, Mask)
| This macro clears bitmask in Interrupt Signal Enable register. More...
#define | XNandPsu_IntrStsEnable(InstancePtr, Mask)
| This macro enables bitmask in Interrupt Status Enable register. More...
#define | IS_ONFI(Buff)
| This macro checks for the ONFI ID. More...

## Enumerations
enum | XNandPsu_DataInterface { XNANDPSU_SDR = 0U, XNANDPSU_NVDDR }
| The XNandPsu_DataInterface enum contains flash operating mode. More...
enum | XNandPsu_TimingMode
| XNandPsu_TimingMode enum contains timing modes. More...
enum | XNandPsu_SWMode { XNANDPSU_POLLING = 0, XNANDPSU_INTERRUPT }
| The XNandPsu_SWMode enum contains the driver operating mode. More...
enum | XNandPsu_DmaMode { XNANDPSU_PIO = 0, XNANDPSU_SDMA, XNANDPSU_MDMA }
| The XNandPsu_DmaMode enum contains the controller MDMA mode. More...
enum | XNandPsu_EccMode
| The XNandPsu_EccMode enum contains ECC functionality. More...

## Functions
s32 | XNandPsu_CfgInitialize (XNandPsu *InstancePtr, XNandPsu_Config *ConfigPtr, u32 EffectiveAddr)
| This function initializes a specific XNandPsu instance. More...
s32 | XNandPsu_Erase (XNandPsu *InstancePtr, u64 Offset, u64 Length)
| This function erases the flash. More...
s32 | XNandPsu_Write (XNandPsu *InstancePtr, u64 Offset, u64 Length, u8 *SrcBuf)
| This function writes to the flash. More...
s32 | XNandPsu_Read (XNandPsu *InstancePtr, u64 Offset, u64 Length, u8 *DestBuf)
| This function reads from the flash. More...
s32 | XNandPsu_EraseBlock (XNandPsu *InstancePtr, u32 Target, u32 Block)
| This function sends ONFI block erase command to the flash. More...
s32 | XNandPsu_WriteSpareBytes (XNandPsu *InstancePtr, u32 Page, u8 *Buf)
| This function sends ONFI Program Page command to flash. More...
s32 | XNandPsu_ReadSpareBytes (XNandPsu *InstancePtr, u32 Page, u8 *Buf)
| This function reads spare bytes from flash. More...
s32 | XNandPsu_ChangeTimingMode (XNandPsu *InstancePtr, XNandPsu_DataInterface NewIntf, XNandPsu_TimingMode NewMode)
| This function changes the data interface and timing mode. More...
s32 | XNandPsu_GetFeature (XNandPsu *InstancePtr, u32 Target, u8 Feature, u8 *Buf)
| This function sends ONFI Get Feature command to flash. More...
s32 | XNandPsu_SetFeature (XNandPsu *InstancePtr, u32 Target, u8 Feature, u8 *Buf)
| This function sends ONFI Set Feature command to flash. More...
s32 | XNandPsu_ScanBbt (XNandPsu *InstancePtr)
| This function reads the Bad Block Table(BBT) if present in flash. More...
s32 | XNandPsu_MarkBlockBad (XNandPsu *InstancePtr, u32 Block)
| This function marks a block as bad in the RAM based Bad Block Table(BBT). More...
void | XNandPsu_EnableDmaMode (XNandPsu *InstancePtr)
| This function enables DMA mode of controller operation. More...
void | XNandPsu_DisableDmaMode (XNandPsu *InstancePtr)
| This function disables DMA mode of driver/controller operation. More...
void | XNandPsu_EnableEccMode (XNandPsu *InstancePtr)
| This function enables ECC mode of driver/controller operation. More...
void | XNandPsu_DisableEccMode (XNandPsu *InstancePtr)
| This function disables ECC mode of driver/controller operation. More...
void | XNandPsu_Prepare_Cmd (XNandPsu *InstancePtr, u8 Cmd1, u8 Cmd2, u8 EccState, u8 DmaMode, u8 AddrCycles)
| This function prepares command to be written into command register. More...
XNandPsu_Config * | XNandPsu_LookupConfig (u16 DevID)
| Looks up the controller configuration based on the unique controller ID. More...