OpenSSD Cosmos+ Platform Firmware
0.0.2
The firmware of Cosmos+ OpenSSD Platform for TOSHIBA nand flash module.
|
#include <assert.h>
#include "debug.h"
#include "xil_printf.h"
#include "memory_map.h"
#include "t4nsc_ucode.h"
#include "nsc_driver.h"
Go to the source code of this file.
Functions | |
void | InitFTL () |
The entry function for FTL initialization. More... | |
void | InitChCtlReg () |
Initialize the base addresses of all channel controllers. More... | |
void | InitNandArray () |
Send RESET and SET_FEATURE to all the flash dies. More... | |
void | CheckConfigRestriction () |
Check the configurations are legal before the initializations start. More... | |
Variables | |
unsigned int | storageCapacity_L |
T4REGS | chCtlReg [USER_CHANNELS] |
unsigned int | NSCS [] |
unsigned int | NSC_UCODES [] |
void CheckConfigRestriction | ( | ) |
Check the configurations are legal before the initializations start.
This function will check two things:
Definition at line 242 of file ftl_config.c.
void InitChCtlReg | ( | ) |
Initialize the base addresses of all channel controllers.
Definition at line 119 of file ftl_config.c.
void InitFTL | ( | ) |
The entry function for FTL initialization.
Definition at line 62 of file ftl_config.c.
void InitNandArray | ( | ) |
Send RESET and SET_FEATURE to all the flash dies.
This function send two requests to each die:
REQ_CODE_RESET
:
REQ_CODE_SET_FEATURE
:
This request is used to make the flash enter the toggle mode, check the function IssueNandReq()
for details.
The two types of request have some characteristics:
no need to do address translation -> use physical address directly:
set nandAddr
to REQ_OPT_NAND_ADDR_PHY_ORG
set physicalCh
to the channel number of target die set physicalWay
to the way number of target die set physicalBlock
to any value (no effect) set physicalPage
to any value (no effect)
no dependency problem:
set rowAddrDependencyCheck
to REQ_OPT_ROW_ADDR_DEPENDENCY_NONE
set prevBlockingReq
to REQ_SLOT_TAG_NONE
no need data buffer needed:
set dataBufFormat
to REQ_OPT_DATA_BUF_NONE
apply to all the blocks (main space + extended space)
set blockSpace
to REQ_OPT_BLOCK_SPACE_TOTAL
These requests must be done in the initialization stage, make sure they are all done before going to next initialization step.
Definition at line 175 of file ftl_config.c.
T4REGS chCtlReg[USER_CHANNELS] |
Definition at line 57 of file ftl_config.c.
unsigned int NSC_UCODES[] |
Definition at line 113 of file ftl_config.c.
unsigned int NSCS[] |
Definition at line 108 of file ftl_config.c.
unsigned int storageCapacity_L |
Definition at line 56 of file ftl_config.c.