56 unsigned char delayVal[32];
73 data1->
delayVal[channel % 4] = newValue;
88 for (i = 0; i < 8; i++)
89 data0->
delayVal[channel * 8 + i] = newValue;
94 for (i = 0; i < 8; i++)
95 data1->
delayVal[(channel % 4) * 8 + i] = newValue;
102 t4regs->
t4regID = (
T4REG_ID *)((
unsigned int)t4nscRegisterBaseAddress + 0);
103 t4regs->
t4regCFG = (
T4REG_CFG *)((
unsigned int)t4nscRegisterBaseAddress + 0x1000);
104 t4regs->
t4regEXT = (
T4REG_EXT *)((
unsigned int)t4nscRegisterBaseAddress + 0x2000);
105 t4regs->
t4regCC = (
T4REG_CC *)((
unsigned int)t4nscRegisterBaseAddress + 0x3000);
106 t4regs->
t4regBP = (
T4REG_BP *)((
unsigned int)t4nscRegisterBaseAddress + 0x3800);
107 t4regs->
t4regSP = (
T4REG_SP *)((
unsigned int)t4nscRegisterBaseAddress + 0x4000);
134 V2FSetScramblerState(t4regs, 0);
138V2FSetFeaturesT(
T4REGS *t4regs,
int way,
unsigned int address, volatile
unsigned int *payload)
165 unsigned int feature0x01,
unsigned int payLoadAddr)
167 volatile unsigned int *payload = (
unsigned int *)payLoadAddr;
168 volatile unsigned int *status = (
unsigned int *)(payLoadAddr + 4);
170 *payload = feature0x02;
173 V2FSetFeaturesT(t4regs, way, 0x02, payload);
179 while (!(*status & 1))
182 }
while (!(*status & (1 << way)));
184 *payload = feature0x10;
187 V2FSetFeaturesT(t4regs, way, 0x10, payload);
193 while (!(*status & 1))
196 }
while (!(*status & (1 << way)));
200 V2FSetScramblerState(t4regs, 0);
219 readPageTrigggerCmd.
waySelect = 1 << way;
230 unsigned int *errorInformation,
unsigned int *completion,
unsigned int rowAddress)
255 readPageTransferRaw.
waySelect = 1 << way;
257 readPageTransferRaw.
wordLength = (16384 + 1664) / 4;
289 assert((rowAddress & 0xFF) == 0);
335 unsigned char buf[8] = {0};
337 for (i = 0; i < 8; i++)
338 ((
unsigned char *)statusReport)[i] = 0;
339 unsigned int *completion = &statusReport[4];
342 while (*completion == 0)
345 for (i = 0; i < 6; i++)
346 buf[i] = ((
unsigned char *)statusReport)[i * 2];
347 for (i = 0; i < 8; i++)
348 ((
unsigned char *)statusReport)[i] = buf[i];
353 volatile unsigned int readyBusy = (t4regs)->t4regBP->nandReadyBusy;
#define XPAR_IODELAY_IF_0_BASEADDR
#define XPAR_IODELAY_IF_0_DQS_BASEADDR
#define XPAR_IODELAY_IF_1_DQS_BASEADDR
void __attribute__((optimize("O0")))
void V2FGetReadyBusy(T4REGS *t4regs, unsigned int *report)
void V2FInitializeHandle(T4REGS *t4regs, void *t4nscRegisterBaseAddress)
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)
void V2FReadIdSync(T4REGS *t4regs, int way, unsigned int *statusReport)
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)
#define V2FIssueCommand(t4regs)
void V2FReadPageTriggerAsync(T4REGS *t4regs, int way, unsigned int rowAddress)
#define T4NSC_CMD_ERASE_BLOCK
#define T4NSC_CMD_READ_TRANSFER_RAW
#define V2FIsControllerBusy(t4regs)
#define T4NSC_CMD_SET_SCRAMBLER_ENABLE
void V2FStatusCheckAsync(T4REGS *t4regs, int way, unsigned int *statusReport)
#define T4NSC_CMD_READ_ID
void V2FEraseBlockAsync(T4REGS *t4regs, int way, unsigned int rowAddress)
#define T4NSC_CMD_SET_FEATUREST
#define T4NSC_CMD_SET_SCRAMBLER_DISABLE
#define T4NSC_CMD_NAND_RESET
#define T4NSC_CMD_READ_PAGE_TRIGGER_PSLC
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)
#define T4NSC_CMD_READ_TRANSFER_PSLC
#define T4NSC_CMD_GET_READYBUSY
#define T4NSC_CMD_READ_STATUS
#define T4NSC_CMD_PROGRAM_PAGE_PSLC
#define V2FFillRegisters(t4regs, cmdtype, cmdpayload)
unsigned int V2FReadyBusyAsync(T4REGS *t4regs)
void V2FResetSync(T4REGS *t4regs, int way)
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 reportAddress
unsigned int pageDataAddress
unsigned int spareDataAddress
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 reportAddress
unsigned int setFeaturesAddress
unsigned int payloadAddress
unsigned char delayVal[32]