62#define T4NSC_CMD_NAND_RESET 4
63#define T4NSC_CMD_MODE_CHANGE 32
64#define T4NSC_CMD_GET_READYBUSY 108
65#define T4NSC_CMD_SET_FEATURESA 124
66#define T4NSC_CMD_SET_LUN_FEATUREST 132
67#define T4NSC_CMD_SET_FEATUREST 144
68#define T4NSC_CMD_GET_LUN_FEATUREST 192
69#define T4NSC_CMD_GET_FEATUREST 204
70#define T4NSC_CMD_SET_SCRAMBLER_DISABLE 264
71#define T4NSC_CMD_SET_SCRAMBLER_ENABLE 284
72#define T4NSC_CMD_READ_STATUS 304
73#define T4NSC_CMD_ERASE_BLOCK 352
74#define T4NSC_CMD_READ_PAGE_TRIGGER 384
75#define T4NSC_CMD_SINGLE_STATE_READ_PAGE_TRIGGER 392
76#define T4NSC_CMD_READ_PAGE_TRIGGER_WRLPRE_LSB 404
77#define T4NSC_CMD_READ_PAGE_TRIGGER_WRLPRE_CSB 412
78#define T4NSC_CMD_READ_PAGE_TRIGGER_WRLPRE_MSB 420
79#define T4NSC_CMD_READ_PAGE_TRIGGER_LSB 428
80#define T4NSC_CMD_READ_PAGE_TRIGGER_CSB 436
81#define T4NSC_CMD_READ_PAGE_TRIGGER_MSB 444
82#define T4NSC_CMD_READ_PAGE_TRIGGER_PSLC 452
83#define T4NSC_CMD_READ_TRANSFER_RAW 500
84#define T4NSC_CMD_PROGRAM_PAGE_RAW 568
85#define T4NSC_CMD_PROGRAM_PAGE_RAW_xSB 576
86#define T4NSC_CMD_PROGRAM_PAGE_RAW_PSLC 580
87#define T4NSC_CMD_READ_ID 756
88#define T4NSC_CMD_END_OF_COMMON 824
90#define T4NSC_CMD_READ_TRANSFER_PSLC (T4NSC_CMD_END_OF_COMMON + 0)
91#define T4NSC_CMD_PROGRAM_PAGE_PSLC (T4NSC_CMD_END_OF_COMMON + 112)
92#define T4NSC_CMD_READ_TRANSFER (T4NSC_CMD_END_OF_COMMON + 204)
93#define T4NSC_CMD_PROGRAM_PAGES (T4NSC_CMD_END_OF_COMMON + 616)
94#define T4NSC_CMD_FSP_PAGES (T4NSC_CMD_END_OF_COMMON + 960)
95#define T4NSC_CMD_END_OF_PLAINOPS (T4NSC_CMD_END_OF_COMMON + 1308)
97#define V2FFillRegisters(t4regs, cmdtype, cmdpayload) (*((volatile cmdtype *)((t4regs)->t4regSP)) = (cmdpayload))
98#define V2FIssueCommand(t4regs) (((t4regs)->t4regCC)->issueCmd = 1)
100#define V2FIsControllerBusy(t4regs) ((t4regs)->t4regID->queueNotFull == 0)
101#define V2FGetFreeQueueCount(t4regs) (32 - ((t4regs)->t4regID->queueCount))
102#define V2FGetNANDReadyBusy(t4regs, way) !!((t4regs)->t4regBP->nandReadyBusy & (1 << (way)))
104#define V2FCrcValid(errorInformation) !!(*((uint32_t *)(errorInformation)) & 0x10000000)
105#define V2FWorstChunkErrorCount(errorInformation) ((*((uint32_t *)(errorInformation)) & 0x00FF0000) >> 16)
106#define V2FPageDecodeSuccess(secErrorInformation) \
107 ((*((uint32_t *)(secErrorInformation)) & 0xFFFFFFFF) == 0xFFFFFFFF)
109#define V2FEnterToggleMode(dev, way, payLoadAddr) V2FSetFeaturesSync(dev, way, 0x17, 0x06, 0, payLoadAddr)
111#define V2FWayReady(readyBusy, wayNo) (((readyBusy) >> (wayNo)) & 1)
112#define V2FTransferComplete(completeFlag) ((completeFlag)&1)
113#define V2FRequestReportDone(statusReport) ((statusReport)&1)
114#define V2FEliminateReportDoneFlag(statusReport) ((statusReport) >> 1)
115#define V2FRequestComplete(statusReport) (((statusReport)&0x60) == 0x60)
116#define V2FRequestFail(statusReport) ((statusReport)&3)
331#define T4NSC_CMD_FSP_TRANSFER_OPTION_LSB_PASSNEXT 3
332#define T4NSC_CMD_FSP_TRANSFER_OPTION_LSB_COMMIT 2
333#define T4NSC_CMD_FSP_TRANSFER_OPTION_CSB_PASSNEXT 5
334#define T4NSC_CMD_FSP_TRANSFER_OPTION_CSB_COMMIT 4
335#define T4NSC_CMD_FSP_TRANSFER_OPTION_MSB_COMMIT 6
368#define T4NSC_CMD_FSP_TRANSFER_OPTION_LSB_PASSNEXT 3
369#define T4NSC_CMD_FSP_TRANSFER_OPTION_LSB_COMMIT 2
370#define T4NSC_CMD_FSP_TRANSFER_OPTION_CSB_PASSNEXT 5
371#define T4NSC_CMD_FSP_TRANSFER_OPTION_CSB_COMMIT 4
372#define T4NSC_CMD_FSP_TRANSFER_OPTION_MSB_COMMIT 6
439 unsigned int feature0x01,
unsigned int payLoadAddr);
442 unsigned int *errorInformation,
unsigned int *completion,
unsigned int rowAddress);
445 void *spareDataBuffer);
448void V2FReadIdAsync(
T4REGS *t4regs,
int way,
unsigned int *statusReport,
unsigned int *completion);
void V2FReadPageTransferAsync(T4REGS *t4regs, int way, void *pageDataBuffer, void *spareDataBuffer, unsigned int *errorInformation, unsigned int *completion, unsigned int rowAddress)
void V2FReadPageTransferRawAsync(T4REGS *t4regs, int way, void *pageDataBuffer, unsigned int *completion)
void V2FReadPageTriggerAsync(T4REGS *t4regs, int way, unsigned int rowAddress)
void V2FStatusCheckAsync(T4REGS *t4regs, int way, unsigned int *statusReport)
void V2FEraseBlockAsync(T4REGS *t4regs, int way, unsigned int rowAddress)
void V2FInitializeHandle(T4REGS *t4regs, void *t4nscRegisterBaseAddress)
void V2FSetFeaturesSync(T4REGS *t4regs, int way, unsigned int feature0x02, unsigned int feature0x10, unsigned int feature0x01, unsigned int payLoadAddr)
void V2FProgramPageAsync(T4REGS *t4regs, int way, unsigned int rowAddress, void *pageDataBuffer, void *spareDataBuffer)
void V2FReadIdAsync(T4REGS *t4regs, int way, unsigned int *statusReport, unsigned int *completion)
void nfc_set_dq_delay(int channel, unsigned int newValue)
void nfc_set_dqs_delay(int channel, unsigned int newValue)
unsigned int V2FReadyBusyAsync(T4REGS *t4regs)
void V2FReadIdSync(T4REGS *t4regs, int way, unsigned int *statusReport)
void V2FResetSync(T4REGS *t4regs, int way)
unsigned int chunk7ErrorCount
unsigned int chunk2ErrorCount
unsigned int chunk0ErrorCount
unsigned int chunk1ErrorCount
unsigned int chunk6ErrorCount
unsigned int chunk5ErrorCount
unsigned int chunk4ErrorCount
unsigned int spareSuccess
unsigned int totalErrorCount
unsigned int chunk3ErrorCount
unsigned int worstErrorCount
volatile T4REG_CC * t4regCC
volatile T4REG_BP * t4regBP
volatile T4REG_ID * t4regID
volatile T4REG_EXT * t4regEXT
volatile T4REG_CFG * t4regCFG
volatile T4REG_SP * t4regSP
unsigned int nandReadyBusy
unsigned int pageDataAddress
unsigned int spareDataAddress
unsigned int reportAddress
unsigned int completionAddress
unsigned int getFeaturesAddress
unsigned int completionAddress
unsigned int reportAddress
unsigned int getFeaturesAddress
unsigned int reportAddress
unsigned int spareBufferIndex
unsigned int pageBufferIndex
unsigned int pageBufferIndex
unsigned int completionReportAddress
unsigned int spareBufferIndex
unsigned int payloadAddress
unsigned int pageDataAddress
unsigned int spareDataAddress
unsigned int pageDataAddress
unsigned int pageDataAddress
unsigned int spareDataAddress
unsigned int pageDataAddress
unsigned int completionReportAddress
unsigned int reportAddress
unsigned int spareDataAddress
unsigned int pageDataAddress
unsigned int errorInfoAddress
unsigned int completionReportAddress
unsigned int pageDataAddress
unsigned int completionReportAddress
unsigned int spareDataAddress
unsigned int errorInfoAddress
unsigned int pageDataAddress
unsigned int completionReportAddress
unsigned int reportAddress
unsigned int spareBufferAddress
unsigned int pageBufferAddress
unsigned int setFeaturesAddress
unsigned int payloadAddress
unsigned int setFeaturesAddress
unsigned int payloadAddress
unsigned int queueNotFull
unsigned int spareAddress
unsigned int completionAddress
unsigned int errorCountAddress
unsigned int waySelection