OpenSSD Cosmos+ Platform Firmware  0.0.2
The firmware of Cosmos+ OpenSSD Platform for TOSHIBA nand flash module.
nsc_driver.h File Reference
#include "t4nsc_pm.h"
Include dependency graph for nsc_driver.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  V2FMCRegisters
 
struct  T4REG_ID
 
struct  T4REG_CFG
 
struct  T4REG_EXT
 
struct  T4REG_CC
 
struct  T4REG_BP
 
struct  T4REG_SP
 
struct  T4REGS
 
struct  T4REG_CMD_NAND_RESET
 
struct  T4REG_CMD_MODE_CHANGE
 
struct  T4REG_CMD_SET_FEATURES
 
struct  T4REG_CMD_SET_LUN_FEATURES
 
struct  T4REG_CMD_GET_FEATURES
 
struct  T4REG_CMD_GET_READYBUSY
 
struct  T4REG_CMD_GET_LUN_FEATURES
 
struct  T4REG_CMD_SET_SCRAMBLER
 
struct  T4REG_CMD_READ_STATUS
 
struct  T4REG_CMD_ERASE_BLOCK
 
struct  T4REG_CMD_READ_PAGE_TRIGGER
 
struct  T4REG_CMD_SINGLE_STATE_READ_PAGE_TRIGGER
 
struct  T4REG_CMD_READ_PAGE_TRANSFER_PSLC
 
struct  T4REG_CMD_PROGRAM_PAGE_TRANSFER_PSLC
 
struct  T4REG_CMD_READ_PAGE_TRANSFER
 
struct  T4REG_CMD_PROGRAM_PAGE_TRANSFER
 
struct  T4REG_CMD_FSP_TRANSFER
 
struct  T4REG_CMD_READ_PAGE_TRANSFER_RAW
 
struct  T4REG_CMD_PROGRAM_PAGE_TRANSFER_RAW
 
struct  T4REG_CMD_PROGRAM_PAGE_TRANSFER_RAW_XSBOPTION
 
struct  T4REG_CMD_SET_BUFFER_BASEADDRESS
 
struct  T4REG_CMD_INDEXED_READ_PAGE_TRANSFER
 
struct  T4REG_CMD_INDEXED_PROGRAM_PAGE_TRANSFER
 
struct  T4REG_CMD_READ_ID
 
struct  T4NSC_BCH_ERROR_INFO
 

Macros

#define T4NSC_CMD_NAND_RESET   4
 
#define T4NSC_CMD_MODE_CHANGE   32
 
#define T4NSC_CMD_GET_READYBUSY   108
 
#define T4NSC_CMD_SET_FEATURESA   124
 
#define T4NSC_CMD_SET_LUN_FEATUREST   132
 
#define T4NSC_CMD_SET_FEATUREST   144
 
#define T4NSC_CMD_GET_LUN_FEATUREST   192
 
#define T4NSC_CMD_GET_FEATUREST   204
 
#define T4NSC_CMD_SET_SCRAMBLER_DISABLE   264
 
#define T4NSC_CMD_SET_SCRAMBLER_ENABLE   284
 
#define T4NSC_CMD_READ_STATUS   304
 
#define T4NSC_CMD_ERASE_BLOCK   352
 
#define T4NSC_CMD_READ_PAGE_TRIGGER   384
 
#define T4NSC_CMD_SINGLE_STATE_READ_PAGE_TRIGGER   392
 
#define T4NSC_CMD_READ_PAGE_TRIGGER_WRLPRE_LSB   404
 
#define T4NSC_CMD_READ_PAGE_TRIGGER_WRLPRE_CSB   412
 
#define T4NSC_CMD_READ_PAGE_TRIGGER_WRLPRE_MSB   420
 
#define T4NSC_CMD_READ_PAGE_TRIGGER_LSB   428
 
#define T4NSC_CMD_READ_PAGE_TRIGGER_CSB   436
 
#define T4NSC_CMD_READ_PAGE_TRIGGER_MSB   444
 
#define T4NSC_CMD_READ_PAGE_TRIGGER_PSLC   452
 
#define T4NSC_CMD_READ_TRANSFER_RAW   500
 
#define T4NSC_CMD_PROGRAM_PAGE_RAW   568
 
#define T4NSC_CMD_PROGRAM_PAGE_RAW_xSB   576
 
#define T4NSC_CMD_PROGRAM_PAGE_RAW_PSLC   580
 
#define T4NSC_CMD_READ_ID   756
 
#define T4NSC_CMD_END_OF_COMMON   824
 
#define T4NSC_CMD_READ_TRANSFER_PSLC   (T4NSC_CMD_END_OF_COMMON + 0)
 
#define T4NSC_CMD_PROGRAM_PAGE_PSLC   (T4NSC_CMD_END_OF_COMMON + 112)
 
#define T4NSC_CMD_READ_TRANSFER   (T4NSC_CMD_END_OF_COMMON + 204)
 
#define T4NSC_CMD_PROGRAM_PAGES   (T4NSC_CMD_END_OF_COMMON + 616)
 
#define T4NSC_CMD_FSP_PAGES   (T4NSC_CMD_END_OF_COMMON + 960)
 
#define T4NSC_CMD_END_OF_PLAINOPS   (T4NSC_CMD_END_OF_COMMON + 1308)
 
#define V2FFillRegisters(t4regs, cmdtype, cmdpayload)   (*((volatile cmdtype *)((t4regs)->t4regSP)) = (cmdpayload))
 
#define V2FIssueCommand(t4regs)   (((t4regs)->t4regCC)->issueCmd = 1)
 
#define V2FIsControllerBusy(t4regs)   ((t4regs)->t4regID->queueNotFull == 0)
 
#define V2FGetFreeQueueCount(t4regs)   (32 - ((t4regs)->t4regID->queueCount))
 
#define V2FGetNANDReadyBusy(t4regs, way)   !!((t4regs)->t4regBP->nandReadyBusy & (1 << (way)))
 
#define V2FCrcValid(errorInformation)   !!(*((uint32_t *)(errorInformation)) & 0x10000000)
 
#define V2FWorstChunkErrorCount(errorInformation)   ((*((uint32_t *)(errorInformation)) & 0x00FF0000) >> 16)
 
#define V2FPageDecodeSuccess(secErrorInformation)    ((*((uint32_t *)(secErrorInformation)) & 0xFFFFFFFF) == 0xFFFFFFFF)
 
#define V2FEnterToggleMode(dev, way, payLoadAddr)   V2FSetFeaturesSync(dev, way, 0x17, 0x06, 0, payLoadAddr)
 
#define V2FWayReady(readyBusy, wayNo)   (((readyBusy) >> (wayNo)) & 1)
 
#define V2FTransferComplete(completeFlag)   ((completeFlag)&1)
 
#define V2FRequestReportDone(statusReport)   ((statusReport)&1)
 
#define V2FEliminateReportDoneFlag(statusReport)   ((statusReport) >> 1)
 
#define V2FRequestComplete(statusReport)   (((statusReport)&0x60) == 0x60)
 
#define V2FRequestFail(statusReport)   ((statusReport)&3)
 
#define T4NSC_CMD_FSP_TRANSFER_OPTION_LSB_PASSNEXT   3
 
#define T4NSC_CMD_FSP_TRANSFER_OPTION_LSB_COMMIT   2
 
#define T4NSC_CMD_FSP_TRANSFER_OPTION_CSB_PASSNEXT   5
 
#define T4NSC_CMD_FSP_TRANSFER_OPTION_CSB_COMMIT   4
 
#define T4NSC_CMD_FSP_TRANSFER_OPTION_MSB_COMMIT   6
 
#define T4NSC_CMD_FSP_TRANSFER_OPTION_LSB_PASSNEXT   3
 
#define T4NSC_CMD_FSP_TRANSFER_OPTION_LSB_COMMIT   2
 
#define T4NSC_CMD_FSP_TRANSFER_OPTION_CSB_PASSNEXT   5
 
#define T4NSC_CMD_FSP_TRANSFER_OPTION_CSB_COMMIT   4
 
#define T4NSC_CMD_FSP_TRANSFER_OPTION_MSB_COMMIT   6
 

Functions

void nfc_set_dqs_delay (int channel, unsigned int newValue)
 
void nfc_set_dq_delay (int channel, unsigned int newValue)
 
void V2FInitializeHandle (T4REGS *t4regs, void *t4nscRegisterBaseAddress)
 
void V2FResetSync (T4REGS *t4regs, int way)
 
void V2FSetFeaturesSync (T4REGS *t4regs, int way, unsigned int feature0x02, unsigned int feature0x10, unsigned int feature0x01, unsigned int payLoadAddr)
 
void V2FReadPageTriggerAsync (T4REGS *t4regs, int way, unsigned int rowAddress)
 
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 V2FProgramPageAsync (T4REGS *t4regs, int way, unsigned int rowAddress, void *pageDataBuffer, void *spareDataBuffer)
 
void V2FEraseBlockAsync (T4REGS *t4regs, int way, unsigned int rowAddress)
 
void V2FStatusCheckAsync (T4REGS *t4regs, int way, unsigned int *statusReport)
 
void V2FReadIdAsync (T4REGS *t4regs, int way, unsigned int *statusReport, unsigned int *completion)
 
void V2FReadIdSync (T4REGS *t4regs, int way, unsigned int *statusReport)
 
unsigned int V2FReadyBusyAsync (T4REGS *t4regs)
 

Macro Definition Documentation

◆ T4NSC_CMD_END_OF_COMMON

#define T4NSC_CMD_END_OF_COMMON   824

Definition at line 88 of file nsc_driver.h.

◆ T4NSC_CMD_END_OF_PLAINOPS

#define T4NSC_CMD_END_OF_PLAINOPS   (T4NSC_CMD_END_OF_COMMON + 1308)

Definition at line 95 of file nsc_driver.h.

◆ T4NSC_CMD_ERASE_BLOCK

#define T4NSC_CMD_ERASE_BLOCK   352

Definition at line 73 of file nsc_driver.h.

◆ T4NSC_CMD_FSP_PAGES

#define T4NSC_CMD_FSP_PAGES   (T4NSC_CMD_END_OF_COMMON + 960)

Definition at line 94 of file nsc_driver.h.

◆ T4NSC_CMD_FSP_TRANSFER_OPTION_CSB_COMMIT [1/2]

#define T4NSC_CMD_FSP_TRANSFER_OPTION_CSB_COMMIT   4

Definition at line 371 of file nsc_driver.h.

◆ T4NSC_CMD_FSP_TRANSFER_OPTION_CSB_COMMIT [2/2]

#define T4NSC_CMD_FSP_TRANSFER_OPTION_CSB_COMMIT   4

Definition at line 371 of file nsc_driver.h.

◆ T4NSC_CMD_FSP_TRANSFER_OPTION_CSB_PASSNEXT [1/2]

#define T4NSC_CMD_FSP_TRANSFER_OPTION_CSB_PASSNEXT   5

Definition at line 370 of file nsc_driver.h.

◆ T4NSC_CMD_FSP_TRANSFER_OPTION_CSB_PASSNEXT [2/2]

#define T4NSC_CMD_FSP_TRANSFER_OPTION_CSB_PASSNEXT   5

Definition at line 370 of file nsc_driver.h.

◆ T4NSC_CMD_FSP_TRANSFER_OPTION_LSB_COMMIT [1/2]

#define T4NSC_CMD_FSP_TRANSFER_OPTION_LSB_COMMIT   2

Definition at line 369 of file nsc_driver.h.

◆ T4NSC_CMD_FSP_TRANSFER_OPTION_LSB_COMMIT [2/2]

#define T4NSC_CMD_FSP_TRANSFER_OPTION_LSB_COMMIT   2

Definition at line 369 of file nsc_driver.h.

◆ T4NSC_CMD_FSP_TRANSFER_OPTION_LSB_PASSNEXT [1/2]

#define T4NSC_CMD_FSP_TRANSFER_OPTION_LSB_PASSNEXT   3

Definition at line 368 of file nsc_driver.h.

◆ T4NSC_CMD_FSP_TRANSFER_OPTION_LSB_PASSNEXT [2/2]

#define T4NSC_CMD_FSP_TRANSFER_OPTION_LSB_PASSNEXT   3

Definition at line 368 of file nsc_driver.h.

◆ T4NSC_CMD_FSP_TRANSFER_OPTION_MSB_COMMIT [1/2]

#define T4NSC_CMD_FSP_TRANSFER_OPTION_MSB_COMMIT   6

Definition at line 372 of file nsc_driver.h.

◆ T4NSC_CMD_FSP_TRANSFER_OPTION_MSB_COMMIT [2/2]

#define T4NSC_CMD_FSP_TRANSFER_OPTION_MSB_COMMIT   6

Definition at line 372 of file nsc_driver.h.

◆ T4NSC_CMD_GET_FEATUREST

#define T4NSC_CMD_GET_FEATUREST   204

Definition at line 69 of file nsc_driver.h.

◆ T4NSC_CMD_GET_LUN_FEATUREST

#define T4NSC_CMD_GET_LUN_FEATUREST   192

Definition at line 68 of file nsc_driver.h.

◆ T4NSC_CMD_GET_READYBUSY

#define T4NSC_CMD_GET_READYBUSY   108

Definition at line 64 of file nsc_driver.h.

◆ T4NSC_CMD_MODE_CHANGE

#define T4NSC_CMD_MODE_CHANGE   32

Definition at line 63 of file nsc_driver.h.

◆ T4NSC_CMD_NAND_RESET

#define T4NSC_CMD_NAND_RESET   4

Definition at line 62 of file nsc_driver.h.

◆ T4NSC_CMD_PROGRAM_PAGE_PSLC

#define T4NSC_CMD_PROGRAM_PAGE_PSLC   (T4NSC_CMD_END_OF_COMMON + 112)

Definition at line 91 of file nsc_driver.h.

◆ T4NSC_CMD_PROGRAM_PAGE_RAW

#define T4NSC_CMD_PROGRAM_PAGE_RAW   568

Definition at line 84 of file nsc_driver.h.

◆ T4NSC_CMD_PROGRAM_PAGE_RAW_PSLC

#define T4NSC_CMD_PROGRAM_PAGE_RAW_PSLC   580

Definition at line 86 of file nsc_driver.h.

◆ T4NSC_CMD_PROGRAM_PAGE_RAW_xSB

#define T4NSC_CMD_PROGRAM_PAGE_RAW_xSB   576

Definition at line 85 of file nsc_driver.h.

◆ T4NSC_CMD_PROGRAM_PAGES

#define T4NSC_CMD_PROGRAM_PAGES   (T4NSC_CMD_END_OF_COMMON + 616)

Definition at line 93 of file nsc_driver.h.

◆ T4NSC_CMD_READ_ID

#define T4NSC_CMD_READ_ID   756

Definition at line 87 of file nsc_driver.h.

◆ T4NSC_CMD_READ_PAGE_TRIGGER

#define T4NSC_CMD_READ_PAGE_TRIGGER   384

Definition at line 74 of file nsc_driver.h.

◆ T4NSC_CMD_READ_PAGE_TRIGGER_CSB

#define T4NSC_CMD_READ_PAGE_TRIGGER_CSB   436

Definition at line 80 of file nsc_driver.h.

◆ T4NSC_CMD_READ_PAGE_TRIGGER_LSB

#define T4NSC_CMD_READ_PAGE_TRIGGER_LSB   428

Definition at line 79 of file nsc_driver.h.

◆ T4NSC_CMD_READ_PAGE_TRIGGER_MSB

#define T4NSC_CMD_READ_PAGE_TRIGGER_MSB   444

Definition at line 81 of file nsc_driver.h.

◆ T4NSC_CMD_READ_PAGE_TRIGGER_PSLC

#define T4NSC_CMD_READ_PAGE_TRIGGER_PSLC   452

Definition at line 82 of file nsc_driver.h.

◆ T4NSC_CMD_READ_PAGE_TRIGGER_WRLPRE_CSB

#define T4NSC_CMD_READ_PAGE_TRIGGER_WRLPRE_CSB   412

Definition at line 77 of file nsc_driver.h.

◆ T4NSC_CMD_READ_PAGE_TRIGGER_WRLPRE_LSB

#define T4NSC_CMD_READ_PAGE_TRIGGER_WRLPRE_LSB   404

Definition at line 76 of file nsc_driver.h.

◆ T4NSC_CMD_READ_PAGE_TRIGGER_WRLPRE_MSB

#define T4NSC_CMD_READ_PAGE_TRIGGER_WRLPRE_MSB   420

Definition at line 78 of file nsc_driver.h.

◆ T4NSC_CMD_READ_STATUS

#define T4NSC_CMD_READ_STATUS   304

Definition at line 72 of file nsc_driver.h.

◆ T4NSC_CMD_READ_TRANSFER

#define T4NSC_CMD_READ_TRANSFER   (T4NSC_CMD_END_OF_COMMON + 204)

Definition at line 92 of file nsc_driver.h.

◆ T4NSC_CMD_READ_TRANSFER_PSLC

#define T4NSC_CMD_READ_TRANSFER_PSLC   (T4NSC_CMD_END_OF_COMMON + 0)

Definition at line 90 of file nsc_driver.h.

◆ T4NSC_CMD_READ_TRANSFER_RAW

#define T4NSC_CMD_READ_TRANSFER_RAW   500

Definition at line 83 of file nsc_driver.h.

◆ T4NSC_CMD_SET_FEATURESA

#define T4NSC_CMD_SET_FEATURESA   124

Definition at line 65 of file nsc_driver.h.

◆ T4NSC_CMD_SET_FEATUREST

#define T4NSC_CMD_SET_FEATUREST   144

Definition at line 67 of file nsc_driver.h.

◆ T4NSC_CMD_SET_LUN_FEATUREST

#define T4NSC_CMD_SET_LUN_FEATUREST   132

Definition at line 66 of file nsc_driver.h.

◆ T4NSC_CMD_SET_SCRAMBLER_DISABLE

#define T4NSC_CMD_SET_SCRAMBLER_DISABLE   264

Definition at line 70 of file nsc_driver.h.

◆ T4NSC_CMD_SET_SCRAMBLER_ENABLE

#define T4NSC_CMD_SET_SCRAMBLER_ENABLE   284

Definition at line 71 of file nsc_driver.h.

◆ T4NSC_CMD_SINGLE_STATE_READ_PAGE_TRIGGER

#define T4NSC_CMD_SINGLE_STATE_READ_PAGE_TRIGGER   392

Definition at line 75 of file nsc_driver.h.

◆ V2FCrcValid

#define V2FCrcValid (   errorInformation)    !!(*((uint32_t *)(errorInformation)) & 0x10000000)

Definition at line 104 of file nsc_driver.h.

◆ V2FEliminateReportDoneFlag

#define V2FEliminateReportDoneFlag (   statusReport)    ((statusReport) >> 1)

Definition at line 114 of file nsc_driver.h.

◆ V2FEnterToggleMode

#define V2FEnterToggleMode (   dev,
  way,
  payLoadAddr 
)    V2FSetFeaturesSync(dev, way, 0x17, 0x06, 0, payLoadAddr)

Definition at line 109 of file nsc_driver.h.

◆ V2FFillRegisters

#define V2FFillRegisters (   t4regs,
  cmdtype,
  cmdpayload 
)    (*((volatile cmdtype *)((t4regs)->t4regSP)) = (cmdpayload))

Definition at line 97 of file nsc_driver.h.

◆ V2FGetFreeQueueCount

#define V2FGetFreeQueueCount (   t4regs)    (32 - ((t4regs)->t4regID->queueCount))

Definition at line 101 of file nsc_driver.h.

◆ V2FGetNANDReadyBusy

#define V2FGetNANDReadyBusy (   t4regs,
  way 
)    !!((t4regs)->t4regBP->nandReadyBusy & (1 << (way)))

Definition at line 102 of file nsc_driver.h.

◆ V2FIsControllerBusy

#define V2FIsControllerBusy (   t4regs)    ((t4regs)->t4regID->queueNotFull == 0)

Definition at line 100 of file nsc_driver.h.

◆ V2FIssueCommand

#define V2FIssueCommand (   t4regs)    (((t4regs)->t4regCC)->issueCmd = 1)

Definition at line 98 of file nsc_driver.h.

◆ V2FPageDecodeSuccess

#define V2FPageDecodeSuccess (   secErrorInformation)     ((*((uint32_t *)(secErrorInformation)) & 0xFFFFFFFF) == 0xFFFFFFFF)

Definition at line 106 of file nsc_driver.h.

◆ V2FRequestComplete

#define V2FRequestComplete (   statusReport)    (((statusReport)&0x60) == 0x60)

Definition at line 115 of file nsc_driver.h.

◆ V2FRequestFail

#define V2FRequestFail (   statusReport)    ((statusReport)&3)

Definition at line 116 of file nsc_driver.h.

◆ V2FRequestReportDone

#define V2FRequestReportDone (   statusReport)    ((statusReport)&1)

Definition at line 113 of file nsc_driver.h.

◆ V2FTransferComplete

#define V2FTransferComplete (   completeFlag)    ((completeFlag)&1)

Definition at line 112 of file nsc_driver.h.

◆ V2FWayReady

#define V2FWayReady (   readyBusy,
  wayNo 
)    (((readyBusy) >> (wayNo)) & 1)

Definition at line 111 of file nsc_driver.h.

◆ V2FWorstChunkErrorCount

#define V2FWorstChunkErrorCount (   errorInformation)    ((*((uint32_t *)(errorInformation)) & 0x00FF0000) >> 16)

Definition at line 105 of file nsc_driver.h.

Function Documentation

◆ nfc_set_dq_delay()

void nfc_set_dq_delay ( int  channel,
unsigned int  newValue 
)

Definition at line 78 of file nsc_driver.c.

79{
80 volatile unsigned int *ctrl0 = (volatile unsigned int *)XPAR_IODELAY_IF_0_BASEADDR;
81 volatile iodelay_if *data0 = (volatile iodelay_if *)(XPAR_IODELAY_IF_0_BASEADDR + 0x8000);
82 volatile unsigned int *ctrl1 = (volatile unsigned int *)XPAR_IODELAY_IF_0_BASEADDR;
83 volatile iodelay_if *data1 = (volatile iodelay_if *)(XPAR_IODELAY_IF_0_BASEADDR + 0x8000);
84
85 int i;
86 if (channel < 4)
87 {
88 for (i = 0; i < 8; i++)
89 data0->delayVal[channel * 8 + i] = newValue;
90 ctrl0[1] = 1;
91 }
92 else
93 {
94 for (i = 0; i < 8; i++)
95 data1->delayVal[(channel % 4) * 8 + i] = newValue;
96 ctrl1[1] = 1;
97 }
98}
#define XPAR_IODELAY_IF_0_BASEADDR
Definition: bsp.h:12
unsigned char delayVal[32]
Definition: nsc_driver.c:56

◆ nfc_set_dqs_delay()

void nfc_set_dqs_delay ( int  channel,
unsigned int  newValue 
)

Definition at line 59 of file nsc_driver.c.

60{
61 volatile unsigned int *ctrl0 = (volatile unsigned int *)XPAR_IODELAY_IF_0_DQS_BASEADDR;
62 volatile iodelay_if *data0 = (volatile iodelay_if *)(XPAR_IODELAY_IF_0_DQS_BASEADDR + 0x8000);
63 volatile unsigned int *ctrl1 = (volatile unsigned int *)XPAR_IODELAY_IF_1_DQS_BASEADDR;
64 volatile iodelay_if *data1 = (volatile iodelay_if *)(XPAR_IODELAY_IF_1_DQS_BASEADDR + 0x8000);
65
66 if (channel < 4)
67 {
68 data0->delayVal[channel] = newValue;
69 ctrl0[1] = 1;
70 }
71 else
72 {
73 data1->delayVal[channel % 4] = newValue;
74 ctrl1[1] = 1;
75 }
76}
#define XPAR_IODELAY_IF_0_DQS_BASEADDR
Definition: bsp.h:14
#define XPAR_IODELAY_IF_1_DQS_BASEADDR
Definition: bsp.h:15

◆ V2FEraseBlockAsync()

void V2FEraseBlockAsync ( T4REGS t4regs,
int  way,
unsigned int  rowAddress 
)
Here is the caller graph for this function:

◆ V2FInitializeHandle()

void V2FInitializeHandle ( T4REGS t4regs,
void *  t4nscRegisterBaseAddress 
)

Definition at line 100 of file nsc_driver.c.

101{
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);
108}
volatile T4REG_CC * t4regCC
Definition: nsc_driver.h:175
volatile T4REG_BP * t4regBP
Definition: nsc_driver.h:177
volatile T4REG_ID * t4regID
Definition: nsc_driver.h:169
volatile T4REG_EXT * t4regEXT
Definition: nsc_driver.h:173
volatile T4REG_CFG * t4regCFG
Definition: nsc_driver.h:171
volatile T4REG_SP * t4regSP
Definition: nsc_driver.h:179

◆ V2FProgramPageAsync()

void V2FProgramPageAsync ( T4REGS t4regs,
int  way,
unsigned int  rowAddress,
void *  pageDataBuffer,
void *  spareDataBuffer 
)
Here is the caller graph for this function:

◆ V2FReadIdAsync()

void V2FReadIdAsync ( T4REGS t4regs,
int  way,
unsigned int *  statusReport,
unsigned int *  completion 
)

Definition at line 316 of file nsc_driver.c.

317{
318 T4REG_CMD_READ_ID readIdCmd;
319
320 readIdCmd.cmdSelect = T4NSC_CMD_READ_ID;
321 readIdCmd.waySelect = 1 << way;
322 readIdCmd.colAddress = 0x0090;
323 readIdCmd.length = 3;
324 readIdCmd.reportAddress = (unsigned int)statusReport;
325 readIdCmd.completionReportAddress = (unsigned int)completion;
326
327 while (V2FIsControllerBusy(t4regs))
328 ;
329 V2FFillRegisters(t4regs, T4REG_CMD_READ_ID, readIdCmd);
330 V2FIssueCommand(t4regs);
331}
#define V2FIssueCommand(t4regs)
Definition: nsc_driver.h:98
#define V2FIsControllerBusy(t4regs)
Definition: nsc_driver.h:100
#define T4NSC_CMD_READ_ID
Definition: nsc_driver.h:87
#define V2FFillRegisters(t4regs, cmdtype, cmdpayload)
Definition: nsc_driver.h:97
unsigned int length
Definition: nsc_driver.h:412
unsigned int completionReportAddress
Definition: nsc_driver.h:414
unsigned int waySelect
Definition: nsc_driver.h:410
unsigned int reportAddress
Definition: nsc_driver.h:413
unsigned int cmdSelect
Definition: nsc_driver.h:409
unsigned int colAddress
Definition: nsc_driver.h:411
Here is the caller graph for this function:

◆ V2FReadIdSync()

void V2FReadIdSync ( T4REGS t4regs,
int  way,
unsigned int *  statusReport 
)

Definition at line 333 of file nsc_driver.c.

334{
335 unsigned char buf[8] = {0};
336 int i;
337 for (i = 0; i < 8; i++)
338 ((unsigned char *)statusReport)[i] = 0;
339 unsigned int *completion = &statusReport[4];
340 *completion = 0;
341 V2FReadIdAsync(t4regs, way, statusReport, completion);
342 while (*completion == 0)
343 ;
344
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];
349}
void V2FReadIdAsync(T4REGS *t4regs, int way, unsigned int *statusReport, unsigned int *completion)
Definition: nsc_driver.c:316
Here is the call graph for this function:
Here is the caller graph for this function:

◆ V2FReadPageTransferAsync()

void V2FReadPageTransferAsync ( T4REGS t4regs,
int  way,
void *  pageDataBuffer,
void *  spareDataBuffer,
unsigned int *  errorInformation,
unsigned int *  completion,
unsigned int  rowAddress 
)
Here is the caller graph for this function:

◆ V2FReadPageTransferRawAsync()

void V2FReadPageTransferRawAsync ( T4REGS t4regs,
int  way,
void *  pageDataBuffer,
unsigned int *  completion 
)
Here is the caller graph for this function:

◆ V2FReadPageTriggerAsync()

void V2FReadPageTriggerAsync ( T4REGS t4regs,
int  way,
unsigned int  rowAddress 
)
Here is the caller graph for this function:

◆ V2FReadyBusyAsync()

unsigned int V2FReadyBusyAsync ( T4REGS t4regs)
Here is the caller graph for this function:

◆ V2FResetSync()

void V2FResetSync ( T4REGS t4regs,
int  way 
)
Here is the caller graph for this function:

◆ V2FSetFeaturesSync()

void V2FSetFeaturesSync ( T4REGS t4regs,
int  way,
unsigned int  feature0x02,
unsigned int  feature0x10,
unsigned int  feature0x01,
unsigned int  payLoadAddr 
)

◆ V2FStatusCheckAsync()

void V2FStatusCheckAsync ( T4REGS t4regs,
int  way,
unsigned int *  statusReport 
)
Here is the caller graph for this function: