NVIDIA DriveOS Linux NSR SDK API Reference

7.0.3.0 Release
nvmnand.h File Reference

Detailed Description

NVIDIA mNAND library

Description: This files declares the interface for using mNAND with encapsulation of different vendor commands for health related information.

Definition in file nvmnand.h.

Go to the source code of this file.

Data Structures

struct  __mnand_block_info
 information per block More...
 
union  __mnand_life_time_element
 information on life time element More...
 
struct  __mnand_life_time_info
 information on life time More...
 
union  __mnand_refresh_element
 information on refresh element More...
 
struct  __mnand_refresh_progress
 information on refresh progress More...
 
struct  __mnand_refresh_properties
 information on refresh properties More...
 
struct  __mnand_ages_element
 summary of ages More...
 
struct  __mnand_wr_info
 Holds the information that indicates the host cumulative written data (units of 100MB). More...
 
struct  mnand_ufs_write_erase_amplification
 Gives the erase/write amplification value for the device. More...
 
struct  __mnand_summary_element
 summary of given block type (or region) More...
 
struct  __mnand_summary_info
 aggregation of summaries More...
 
struct  __mnand_cid_info
 CID - eMMC only. More...
 
struct  __mnand_csd_info
 CSD - eMMC only. More...
 
struct  __mnand_ext_csd_info
 EXT CSD - eMMC only. More...
 
struct  __mnand_device_desc_info
 DEVICE DESC - UFS Only. More...
 
struct  __mnand_config_desc_info
 CONFIG DESC - UFS Only. More...
 
struct  __mnand_geo_desc_info
 GEOMETRY DESC - UFS Only. More...
 
struct  __mnand_unit_desc_info
 UNIT DESC - UFS Only. More...
 
struct  __mnand_mmc_geo_info
 MMC GEOMETRY INFO - eMMC only. More...
 
struct  __mnand_ufs_geo_info
 UFS GEOMETRY INFO - UFS only. More...
 
union  __mnand_geo_info
 GEOMETRY INFO. More...
 
struct  __mnand_lu_info
 LOGICAL UNIT INFO - UFS Only. More...
 
struct  __mnand_chip
 mNAND chip information More...
 
struct  __mnand_ufs_query_req
 UFS Query Request Info (UFS Only) More...
 
struct  __mnand_ufs_combo_query_req
 UFS Combo Query Request Info (UFS Only) More...
 

Macros

#define MAX_ERASE_CNT   0xFFFF
 max. More...
 
#define SECTOR_SZ   512
 sector size More...
 
#define MNAND_READ_CACHE_ENABLE   (1 << 0)
 Read/Write Cache enable bits used in cache handling API. More...
 
#define MNAND_WRITE_CACHE_ENABLE   (1 << 1)
 
#define MAX_FW_STR_LEN   (32U)
 Maximum length of the firmware string. More...
 
#define MAX_PRN_STR_LEN   (64U)
 Maximum length of the product name string. More...
 
#define MNAND_UNKNOWN_BLOCK   (1 << 0)
 
#define MNAND_MLC_BLOCK   (1 << 1)
 
#define MNAND_SLC_BLOCK   (1 << 2)
 
#define MNAND_UNKNOWN_BAD_BLOCK   (1 << 8)
 
#define MNAND_MANF_BAD_BLOCK   (1 << 9)
 
#define MNAND_RUNTIME_BAD_BLOCK   (1 << 10)
 
#define MNAND_SYSTEM_BLOCK   (1 << 11)
 
#define MNAND_LIFETIME_INVALID   (1 << 0)
 
#define MNAND_LIFETIME_IN_BLOCK   (1 << 1)
 
#define MNAND_LIFETIME_IN_PERCENT   (1 << 2)
 
#define MNAND_RFSH_PROG_INVALID   (1 << 0)
 
#define MNAND_RFSH_PROG_IN_BLOCK   (1 << 1)
 
#define MNAND_RFSH_PROG_IN_PERCENT   (1 << 2)
 

Typedefs

typedef struct __mnand_block_info mnand_block_info
 information per block More...
 
typedef union __mnand_life_time_element mnand_life_time_element
 information on life time element More...
 
typedef struct __mnand_life_time_info mnand_life_time_info
 information on life time More...
 
typedef union __mnand_refresh_element mnand_refresh_element
 information on refresh element More...
 
typedef struct __mnand_refresh_progress mnand_refresh_progress
 information on refresh progress More...
 
typedef struct __mnand_refresh_properties mnand_refresh_properties
 information on refresh properties More...
 
typedef struct __mnand_ages_element mnand_ages_info
 summary of ages More...
 
typedef struct __mnand_wr_info mnand_wr_info
 Holds the information that indicates the host cumulative written data (units of 100MB). More...
 
typedef struct mnand_ufs_write_erase_amplification mnand_ufs_write_erase_amplification
 Gives the erase/write amplification value for the device. More...
 
typedef struct __mnand_summary_element mnand_summary_element
 summary of given block type (or region) More...
 
typedef struct __mnand_summary_info mnand_summary_info
 aggregation of summaries More...
 
typedef struct __mnand_cid_info mnand_cid_info
 CID - eMMC only. More...
 
typedef struct __mnand_csd_info mnand_csd_info
 CSD - eMMC only. More...
 
typedef struct __mnand_ext_csd_info mnand_ext_csd_info
 EXT CSD - eMMC only. More...
 
typedef struct __mnand_device_desc_info mnand_device_desc_info
 DEVICE DESC - UFS Only. More...
 
typedef struct __mnand_config_desc_info mnand_config_desc_info
 CONFIG DESC - UFS Only. More...
 
typedef struct __mnand_geo_desc_info mnand_geo_desc_info
 GEOMETRY DESC - UFS Only. More...
 
typedef struct __mnand_unit_desc_info mnand_unit_desc_info
 UNIT DESC - UFS Only. More...
 
typedef struct __mnand_mmc_geo_info mnand_mmc_geo_info
 MMC GEOMETRY INFO - eMMC only. More...
 
typedef struct __mnand_ufs_geo_info mnand_ufs_geo_info
 UFS GEOMETRY INFO - UFS only. More...
 
typedef union __mnand_geo_info mnand_geo_info
 GEOMETRY INFO. More...
 
typedef struct __mnand_lu_info mnand_lu_info
 LOGICAL UNIT INFO - UFS Only. More...
 
typedef enum __mnand_device_type MNAND_DEVICE_TYPE
 mNAND device enumeration More...
 
typedef enum __mnand_storage_type MNAND_STORAGE_TYPE
 mNAND storage type enumeration More...
 
typedef enum __mnand_eol_status MNAND_EOL_STATUS
 mNAND EOL status enumeration More...
 
typedef enum __mnand_fw_comparison_result MNAND_FW_COMPARE
 mNAND firmware comparison enumeration More...
 
typedef enum __mnand_ffu_status MNAND_FFU_STATUS
 mNAND UFS FFU status More...
 
typedef enum __mnand_status MNAND_STATUS
 mNAND operation status used in the API More...
 
typedef struct __mnand_chip mnand_chip
 
typedef struct __mnand_ufs_query_req mnand_ufs_query_req
 
typedef struct __mnand_ufs_combo_query_req mnand_ufs_combo_query_req
 

Enumerations

enum  __mnand_device_type {
  MNAND_CATCH_ALL = 0,
  MNAND_HYNIX_F26 = 1,
  MNAND_HYNIX_F20 = 2,
  MNAND_HYNIX_F16 = 3,
  MNAND_MICRON = 4,
  MNAND_SAMSUNG50 = 5,
  MNAND_SAMSUNG51 = 6,
  MNAND_TOSHIBA = 7,
  MNAND_UFS_TOSHIBA = 8,
  MNAND_UFS_SAMSUNG = 9,
  MNAND_UFS_MICRON = 10
}
 mNAND device enumeration More...
 
enum  __mnand_storage_type {
  MNAND_EMMC = 0,
  MNAND_UFS = 1,
  MNAND_UNKNOWN = 2
}
 mNAND storage type enumeration More...
 
enum  __mnand_eol_status {
  MNAND_EOL_OK = 0,
  MNAND_EOL_DETECTED = 1
}
 mNAND EOL status enumeration More...
 
enum  __mnand_fw_comparison_result {
  MNAND_PASSED_FW_VERSION_SAME = 0,
  MNAND_PASSED_FW_VERSION_GREATER = 1,
  MNAND_PASSED_FW_VERSION_LESSER = 2
}
 mNAND firmware comparison enumeration More...
 
enum  __mnand_ffu_status {
  MNAND_FFU_STATUS_SUCCESS = 0,
  MNAND_FFU_STATUS_INSTALL_FAILED = 1,
  MNAND_FFU_STATUS_ERROR_DOWNLOADING_FIRMWARE = 2,
  MNAND_FFU_STATUS_FW_CORRUPTION_ERROR = 3,
  MNAND_FFU_STATUS_FW_VERSION_MISMATCH = 4,
  MNAND_FFU_STATUS_INTERNAL_ERROR = 5,
  MNAND_FFU_STATUS_NO_INFORMATION = 6,
  MNAND_FFU_STATUS_GENERIC_ERROR = 7,
  MNAND_FFU_STATUS_RESERVED_ERROR = 8
}
 mNAND UFS FFU status More...
 
enum  __mnand_status {
  MNAND_OK = 0,
  MNAND_ENOMEM = 1,
  MNAND_EIO = 2,
  MNAND_EINVAL = 3,
  MNAND_EOPEN = 4,
  MNAND_UNSUPPORTED = 5,
  MNAND_UNKNOWN_ERR = 6,
  MNAND_BKOPS_EN_ERR = 7
}
 mNAND operation status used in the API More...
 

Functions

static int mnand_is_valid_block (mnand_block_info *blk)
 Return the validity of the block, given the pointer of block info. More...
 
static int mnand_is_bad_block (mnand_block_info *blk)
 Determine if given block is a bad block. More...
 
static int mnand_is_usable_block (mnand_block_info *blk)
 Determine if given block is a usable block. More...
 
static int mnand_is_usable_block_with_type (mnand_block_info *blk, uint16_t blk_type)
 Determine if given block is a usable block, and matches given block type. More...
 
static int mnand_is_slc_block (mnand_block_info *blk)
 Determine if given block is in SLC region. More...
 
static int mnand_is_mlc_block (mnand_block_info *blk)
 Determine if given block is in MLC region. More...
 
static int mnand_is_summary_available (mnand_chip *chip)
 Return if the summary is available. More...
 
static int mnand_is_smart_summary_available (mnand_chip *chip)
 Return if the smart summary is available. More...
 
static int mnand_is_refresh_available (mnand_chip *chip)
 Return if force refresh is available. More...
 
static int mnand_is_block_info_available (mnand_chip *chip)
 Return if the block info is available. More...
 
static MNAND_STORAGE_TYPE mnand_get_storage_type (mnand_chip *chip)
 Return mnand storage type. More...
 
MNAND_STATUS mnand_get_bkops_en (mnand_chip *chip, uint8_t *enabled)
 Return the status of BKOPS_EN bit. More...
 
MNAND_STATUS mnand_get_bkops_status (mnand_chip *chip, uint8_t *stat)
 Return the status of BKOPS. More...
 
MNAND_STATUS mnand_set_bkops_en (mnand_chip *chip, uint8_t enable)
 set the BKOPS_EN bit in ext_csd Note: BNKOPS_EN is a OTP, once programmed can't change the value. More...
 
MNAND_STATUS mnand_set_bkops_start (mnand_chip *chip)
 Mark the start of BKOPS. More...
 
MNAND_STATUS mnand_enable_power_off_notification (mnand_chip *chip)
 Enable power-off notification. More...
 
MNAND_STATUS mnand_send_power_off_notification (mnand_chip *chip)
 Send power-off notification. More...
 
MNAND_STATUS mnand_open (const char *devname, mnand_chip *chip)
 "Opening" the mNAND chip. More...
 
MNAND_STATUS mnand_close (mnand_chip *chip)
 "Closing" (aka releasing) the mNAND chip. More...
 
MNAND_STATUS mnand_bind (int fd, mnand_chip *chip)
 "Binding" the mNAND chip. More...
 
MNAND_STATUS mnand_unbind (mnand_chip *chip)
 "Unbinding" (aka releasing) the mNAND chip. More...
 
MNAND_STATUS mnand_update_cid (mnand_chip *chip)
 Updating the CID field inside mNAND chip handle. More...
 
MNAND_STATUS mnand_update_csd (mnand_chip *chip)
 Updating the CSD field inside mNAND chip handle. More...
 
MNAND_STATUS mnand_update_xcsd (mnand_chip *chip)
 Updating the EXT CSD field inside mNAND chip handle. More...
 
MNAND_STATUS mnand_update_card_status (mnand_chip *chip)
 Updating the card status field inside mNAND chip handle. More...
 
MNAND_STATUS mnand_update_block_info (mnand_chip *chip)
 Updating the list of block info inside mNAND chip handle. More...
 
MNAND_STATUS mnand_update_summary_info (mnand_chip *chip)
 Updating the summary info inside mNAND chip handle. More...
 
MNAND_STATUS mnand_update_smart_summary_info (mnand_chip *chip)
 Updating the smart summary info inside mNAND chip handle. More...
 
MNAND_STATUS mnand_check_eol_status (mnand_chip *chip, MNAND_EOL_STATUS *eol_status)
 Checking EOL status. More...
 
MNAND_STATUS mnand_send_refresh (mnand_chip *chip, uint8_t block_type, int num_blocks, uint32_t rfsh_unit_time_us, mnand_refresh_progress *progress)
 Send "refresh" command to the mNAND chip. More...
 
MNAND_STATUS mnand_extract_age_info (mnand_chip *chip, int block_type, uint64_t *total_age, int *blk_count, double *avg_age)
 Extract age info from the mNAND chip. More...
 
MNAND_STATUS mnand_get_refresh_progress (mnand_chip *chip, double *rfsh_progress)
 Extract refresh progress from the mNAND chip. More...
 
MNAND_STATUS mnand_extract_life_time_info (mnand_chip *chip, mnand_life_time_info *life_time_info)
 Extract spare count info from the mNAND chip. More...
 
MNAND_STATUS mnand_set_cache_en (mnand_chip *chip, uint8_t enable)
 Enable/Disable cache on mnand. More...
 
MNAND_STATUS mnand_flush_cache (mnand_chip *chip)
 Flush cache on mnand. More...
 
int mnand_read_sectors_virt (mnand_chip *chip, unsigned int start_sector, unsigned int sector_cnt, void *virtaddr)
 Reading data sectors into given buffer (pointed by virtual address). More...
 
int mnand_read_sectors_phys (mnand_chip *chip, unsigned int start_sector, unsigned int sector_cnt, off_t physaddr)
 Reading data sectors into given buffer (pointed by physical address). More...
 
MNAND_STATUS mnand_trim_all (mnand_chip *chip)
 Trimming the whole device. More...
 
MNAND_STATUS mnand_get_cache_en (mnand_chip *chip, uint8_t *enabled)
 Determine if eMMC cache is enabled. More...
 
MNAND_STATUS mnand_switch_cmd (mnand_chip *chip, uint8_t index, uint8_t value, char *errmsg_prepend)
 Send mnand switch cmd to mmc to set EXT CSD register. More...
 
MNAND_STATUS mnand_get_geo_info (mnand_chip *chip, mnand_geo_info *geo_info)
 Extract mnand geometry info. More...
 
MNAND_STATUS mnand_get_lu_info (mnand_chip *chip, uint32_t lun, mnand_lu_info *lu_info)
 get mnand lu info (UFS only) More...
 
MNAND_STATUS mnand_get_current_lun (mnand_chip *chip, uint32_t *lun)
 get mnand current lun (UFS only) More...
 
MNAND_STATUS mnand_send_combo_query_req (mnand_chip *chip, mnand_ufs_query_req *query_req, uint8_t num_cmds, uint8_t need_cq_empty, uint8_t ret_on_error)
 Send mnand combo query request (UFS only) More...
 
MNAND_STATUS mnand_test_multi_cmd (mnand_chip *chip)
 Test IOCTL MULTI CMD Currently under this test: Reads the XCSD status, toggles the cache status, reads the XCSD status again toggles the cache status again, and updates the XCSD register. More...
 
MNAND_STATUS mnand_ffu (mnand_chip *chip, char *fw_file)
 Performs Field Firmware Update for eMMC device using the firmware image that is passed as argument. More...
 
MNAND_STATUS mnand_get_ffu_status (mnand_chip *chip, MNAND_FFU_STATUS *ffu_status)
 Returns the status of the FFU operation that was done in the previous boot cycle. More...
 
MNAND_STATUS mnand_get_fw_version (mnand_chip *chip, char *fw_version)
 Returns the current version(in hex string format) of the firmware that is running on the device. More...
 
MNAND_STATUS mnand_compare_fw_version (mnand_chip *chip, char *fw_file, MNAND_FW_COMPARE *res)
 Compares the version of the passed firmware with the version of the frimware that is currently running on the device and returns if the passed firmware version is equal or lesser or greater. More...
 
MNAND_STATUS mnand_is_ffu_ready (mnand_chip *chip, bool *res)
 Returns wheher the device is ready to read the current firmware verion that is on the device and to perform the FFU operation . More...
 

Macro Definition Documentation

◆ MAX_ERASE_CNT

#define MAX_ERASE_CNT   0xFFFF

max.

erase count a block can have

Definition at line 66 of file nvmnand.h.

◆ MAX_FW_STR_LEN

#define MAX_FW_STR_LEN   (32U)

Maximum length of the firmware string.

Definition at line 82 of file nvmnand.h.

◆ MAX_PRN_STR_LEN

#define MAX_PRN_STR_LEN   (64U)

Maximum length of the product name string.

Definition at line 84 of file nvmnand.h.

◆ MNAND_LIFETIME_IN_BLOCK

#define MNAND_LIFETIME_IN_BLOCK   (1 << 1)

Definition at line 122 of file nvmnand.h.

◆ MNAND_LIFETIME_IN_PERCENT

#define MNAND_LIFETIME_IN_PERCENT   (1 << 2)

Definition at line 123 of file nvmnand.h.

◆ MNAND_LIFETIME_INVALID

#define MNAND_LIFETIME_INVALID   (1 << 0)

Definition at line 121 of file nvmnand.h.

◆ MNAND_MANF_BAD_BLOCK

#define MNAND_MANF_BAD_BLOCK   (1 << 9)

Definition at line 101 of file nvmnand.h.

◆ MNAND_MLC_BLOCK

#define MNAND_MLC_BLOCK   (1 << 1)

Definition at line 98 of file nvmnand.h.

◆ MNAND_READ_CACHE_ENABLE

#define MNAND_READ_CACHE_ENABLE   (1 << 0)

Read/Write Cache enable bits used in cache handling API.

Definition at line 78 of file nvmnand.h.

◆ MNAND_RFSH_PROG_IN_BLOCK

#define MNAND_RFSH_PROG_IN_BLOCK   (1 << 1)

Definition at line 141 of file nvmnand.h.

◆ MNAND_RFSH_PROG_IN_PERCENT

#define MNAND_RFSH_PROG_IN_PERCENT   (1 << 2)

Definition at line 142 of file nvmnand.h.

◆ MNAND_RFSH_PROG_INVALID

#define MNAND_RFSH_PROG_INVALID   (1 << 0)

Definition at line 140 of file nvmnand.h.

◆ MNAND_RUNTIME_BAD_BLOCK

#define MNAND_RUNTIME_BAD_BLOCK   (1 << 10)

Definition at line 102 of file nvmnand.h.

◆ MNAND_SLC_BLOCK

#define MNAND_SLC_BLOCK   (1 << 2)

Definition at line 99 of file nvmnand.h.

◆ MNAND_SYSTEM_BLOCK

#define MNAND_SYSTEM_BLOCK   (1 << 11)

Definition at line 103 of file nvmnand.h.

◆ MNAND_UNKNOWN_BAD_BLOCK

#define MNAND_UNKNOWN_BAD_BLOCK   (1 << 8)

Definition at line 100 of file nvmnand.h.

◆ MNAND_UNKNOWN_BLOCK

#define MNAND_UNKNOWN_BLOCK   (1 << 0)

Definition at line 97 of file nvmnand.h.

◆ MNAND_WRITE_CACHE_ENABLE

#define MNAND_WRITE_CACHE_ENABLE   (1 << 1)

Definition at line 79 of file nvmnand.h.

◆ SECTOR_SZ

#define SECTOR_SZ   512

sector size

Definition at line 72 of file nvmnand.h.

Typedef Documentation

◆ mnand_ages_info

summary of ages

◆ mnand_block_info

information per block

◆ mnand_chip

typedef struct __mnand_chip mnand_chip

Definition at line 458 of file nvmnand.h.

◆ mnand_cid_info

CID - eMMC only.

◆ mnand_config_desc_info

CONFIG DESC - UFS Only.

◆ mnand_csd_info

CSD - eMMC only.

◆ mnand_device_desc_info

DEVICE DESC - UFS Only.

◆ MNAND_DEVICE_TYPE

mNAND device enumeration

◆ MNAND_EOL_STATUS

mNAND EOL status enumeration

◆ mnand_ext_csd_info

EXT CSD - eMMC only.

◆ MNAND_FFU_STATUS

mNAND UFS FFU status

◆ MNAND_FW_COMPARE

mNAND firmware comparison enumeration

◆ mnand_geo_desc_info

GEOMETRY DESC - UFS Only.

◆ mnand_geo_info

GEOMETRY INFO.

◆ mnand_life_time_element

information on life time element

◆ mnand_life_time_info

information on life time

◆ mnand_lu_info

LOGICAL UNIT INFO - UFS Only.

◆ mnand_mmc_geo_info

MMC GEOMETRY INFO - eMMC only.

◆ mnand_refresh_element

information on refresh element

◆ mnand_refresh_progress

information on refresh progress

◆ mnand_refresh_properties

information on refresh properties

◆ MNAND_STATUS

mNAND operation status used in the API

◆ MNAND_STORAGE_TYPE

mNAND storage type enumeration

◆ mnand_summary_element

summary of given block type (or region)

◆ mnand_summary_info

aggregation of summaries

◆ mnand_ufs_combo_query_req

Definition at line 487 of file nvmnand.h.

◆ mnand_ufs_geo_info

UFS GEOMETRY INFO - UFS only.

◆ mnand_ufs_query_req

Definition at line 486 of file nvmnand.h.

◆ mnand_ufs_write_erase_amplification

Gives the erase/write amplification value for the device.

◆ mnand_unit_desc_info

UNIT DESC - UFS Only.

◆ mnand_wr_info

Holds the information that indicates the host cumulative written data (units of 100MB).

Written data is calculated as host cumulative written data * 100MB.

Enumeration Type Documentation

◆ __mnand_device_type

mNAND device enumeration

Enumerator
MNAND_CATCH_ALL 
MNAND_HYNIX_F26 
MNAND_HYNIX_F20 
MNAND_HYNIX_F16 
MNAND_MICRON 
MNAND_SAMSUNG50 
MNAND_SAMSUNG51 
MNAND_TOSHIBA 
MNAND_UFS_TOSHIBA 
MNAND_UFS_SAMSUNG 
MNAND_UFS_MICRON 

Definition at line 345 of file nvmnand.h.

◆ __mnand_eol_status

mNAND EOL status enumeration

Enumerator
MNAND_EOL_OK 
MNAND_EOL_DETECTED 

Definition at line 372 of file nvmnand.h.

◆ __mnand_ffu_status

mNAND UFS FFU status

Enumerator
MNAND_FFU_STATUS_SUCCESS 

Indicates FFU operation was successful.

MNAND_FFU_STATUS_INSTALL_FAILED 

Indicates installing the firmware failed.

MNAND_FFU_STATUS_ERROR_DOWNLOADING_FIRMWARE 

Indicates downloading the firmware onto the device failed.

MNAND_FFU_STATUS_FW_CORRUPTION_ERROR 

Indicates the firmware that was passed for the FFU operation was corrupted.

MNAND_FFU_STATUS_FW_VERSION_MISMATCH 

Indicates the frimware version does not match

MNAND_FFU_STATUS_INTERNAL_ERROR 

Indicates there was device internal error during FFU operation.

MNAND_FFU_STATUS_NO_INFORMATION 

Indicates there is no informatuon available about the FFU operation.

MNAND_FFU_STATUS_GENERIC_ERROR 

Indicates there was a generic error during the FFU process.

MNAND_FFU_STATUS_RESERVED_ERROR 

Indicates there was a reserved error during the FFU process.

Definition at line 392 of file nvmnand.h.

◆ __mnand_fw_comparison_result

mNAND firmware comparison enumeration

Enumerator
MNAND_PASSED_FW_VERSION_SAME 
MNAND_PASSED_FW_VERSION_GREATER 
MNAND_PASSED_FW_VERSION_LESSER 

Definition at line 380 of file nvmnand.h.

◆ __mnand_status

mNAND operation status used in the API

Enumerator
MNAND_OK 
MNAND_ENOMEM 
MNAND_EIO 
MNAND_EINVAL 
MNAND_EOPEN 
MNAND_UNSUPPORTED 
MNAND_UNKNOWN_ERR 
MNAND_BKOPS_EN_ERR 

Definition at line 416 of file nvmnand.h.

◆ __mnand_storage_type

mNAND storage type enumeration

Enumerator
MNAND_EMMC 
MNAND_UFS 
MNAND_UNKNOWN 

Definition at line 363 of file nvmnand.h.

Function Documentation

◆ mnand_bind()

MNAND_STATUS mnand_bind ( int  fd,
mnand_chip chip 
)

"Binding" the mNAND chip.

This function needs to be called first to establish mNAND health related content. Identification of mNAND will be performed. Various health related data structures will be allocated, initialized, and set up.

mnand_bind and mnand_unbind to be used in pair.

Note: this function uses existed file descriptor (unlike mnand_open, which takes a pathname for device node).

Parameters
fd- file descriptor to mNAND device
chip- the mNAND chip handle to be initialized
Return values
MNAND_OK,success
elseproblem with operation

◆ mnand_check_eol_status()

MNAND_STATUS mnand_check_eol_status ( mnand_chip chip,
MNAND_EOL_STATUS eol_status 
)

Checking EOL status.

Parameters
chip- the mNAND chip handle to be updated
eol_status- EOL status (MNAND_EOL_DETECTED = EOL set)
Return values
MNAND_OK,success
elseproblem with operation

◆ mnand_close()

MNAND_STATUS mnand_close ( mnand_chip chip)

"Closing" (aka releasing) the mNAND chip.

This function needs to be called last to free up health related resource and various data structures.

mnand_open and mnand_close to be used in pair.

Parameters
chip- the mNAND chip handle to be used
Return values
MNAND_OK,success
elseproblem with operation

◆ mnand_compare_fw_version()

MNAND_STATUS mnand_compare_fw_version ( mnand_chip chip,
char *  fw_file,
MNAND_FW_COMPARE res 
)

Compares the version of the passed firmware with the version of the frimware that is currently running on the device and returns if the passed firmware version is equal or lesser or greater.

Parameters
[in]handle- Handle to an mNAND eMMC device structure.
[in]fw_file- Pointer to the path/name of the firmware file with the firmware filename adhering to the filename naming convention given in the API description of mnand_ffu().
[out]res- result of the version comparison.
Returns
  • MNAND_OK : Success
  • MNAND_EINVAL : Invalid input parameter, such as NULL or invalid "handle", or invalid firmware file.
Precondition
mnand_is_ffu_ready() shall be success


Usage considerations

  • Allowed context for the API call
    • Interrupt handler: No
    • Signal handler: No
    • Thread-safe: Yes, with the condition:
      • This API is thread safe if there are different instances of "handle" When it is called from different threads.
    • Async/Sync: Sync
    • Re-entrant: No
  • API Group
    • Init: No
    • Runtime: Yes
    • De-Init: No

◆ mnand_enable_power_off_notification()

MNAND_STATUS mnand_enable_power_off_notification ( mnand_chip chip)

Enable power-off notification.

Parameters
chip- pointer to chip handle
Return values
MNAND_OK,success
elseproblem with operation

◆ mnand_extract_age_info()

MNAND_STATUS mnand_extract_age_info ( mnand_chip chip,
int  block_type,
uint64_t *  total_age,
int *  blk_count,
double *  avg_age 
)

Extract age info from the mNAND chip.

Parameters
chip- the mNAND chip handle to be used
block_type- which region (SLC/MLC) to be used
total_age- the sum of the ages from the blocks @prarm blk_count - #blocks in specified region
avg_age- average age of the blocks, can be used when total_age/blk_counot not available
Return values
MNAND_OK,success
elseproblem with operation

◆ mnand_extract_life_time_info()

MNAND_STATUS mnand_extract_life_time_info ( mnand_chip chip,
mnand_life_time_info life_time_info 
)

Extract spare count info from the mNAND chip.

Parameters
chip- the mNAND chip handle to be used
life_time_info- information on life time
Return values
MNAND_OK,success
elseproblem with operation

◆ mnand_ffu()

MNAND_STATUS mnand_ffu ( mnand_chip chip,
char *  fw_file 
)

Performs Field Firmware Update for eMMC device using the firmware image that is passed as argument.

This API expects the firmware image name to be defined in below format. <firmware image>_PRN_<product id/revision>_FWVER_<hex version string>.bin

For generating the firmware image name in the above format, the details can be obtained from below sources.

  • PRN is the product id or product revision that uniquely identifies the product family. It can be obtained from the vendor data sheet and added in the place of <product id/revision>. The maximum size of this string is defined in MAX_PRN_STR_LEN.
  • FW version is the unique version number of each firmware the is released from the verdor. It should be obtained from the vendors when the new firmware image is received from them. This version string or number should then be converted to hex and added in the place of <hex version string>. The maximum size of this string is defined in MAX_FW_STR_LEN.

Ex: If below are the UFS firmare image details received from the vendor, then the firmware image name should be "SAMSUNG_UFS_3_1_SELENA_V5_TLC_128GB_P53_PRN_KLUDG4UHYB-B0EP_FWVER_13EC.bin"

  • FW image name : SAMSUNG_UFS_3_1_SELENA_V5 TLC_128GB_P53
  • PRN(PRODUCT IDENTIFICATION(16 bytes string) field of INQUIRY response) : KLUDG4UHYB-B0EP (PRODUCT IDENTIFICATION(16 bytes string) field of INQUIRY response)
  • FW version : 5100(decimal) / 13EC(hex) (PRODUCT REVISION LEVEL(4 bytes string stored as Hex) field of INQUIRY response)

Similarly if below are the eMMC firmware details received from the vendor, then the firmware image name should be "SAMSUNG_eMMC_5_1_VINCENT_FETB_MLC_32GB_P63_PRN_BGUF4R_FWVER_000000059.bin"

  • FW image name : SAMSUNG_eMMC_5_1_VINCENT_FETB_MLC_32GB_P63
  • PRN : BGUF4R (PRODUCT NAME(6 bytes string) field in the CID.)
  • FW version : 000000089(decimal)/000000059(hex) (FIRMWARE_VERSION(8 bytes string stored as Hex) field in the EXT CSD)

Below is the sequence that needs to be followed for performing FFU.

Parameters
[in]handle- Handle to an mNAND UFS device structure.
[in]fw_file- Pointer to the path of the firmware file with the firmware filename adhering to the filename naming convention given in the API description.
Returns
  • MNAND_OK : Success
  • MNAND_EINVAL : Invalid input parameter, such as NULL or invalid "handle", or invalid firmware file or firmware version is lesser than the current firmware version of the device or the firmware size is invalid.
  • MNAND_UNSUPPORTED : FFU is not supported by device or the firmeare size is too high.
  • MNAND_EIO : Device I/O operation failed or reading from the passed firmware file failed.
  • MNAND_EOFLOW : Overflow error, while conversion of data from one essential type to another
Precondition
mnand_is_ffu_ready() shall be success


Usage considerations

  • Allowed context for the API call
    • Interrupt handler: No
    • Signal handler: No
    • Thread-safe: Yes, with the condition:
      • This API is thread safe if there are different instances of "handle" When it is called from different threads.
    • Async/Sync: Sync
    • Re-entrant: No
  • API Group
    • Init: No
    • Runtime: Yes
    • De-Init: No

◆ mnand_flush_cache()

MNAND_STATUS mnand_flush_cache ( mnand_chip chip)

Flush cache on mnand.

Parameters
chip- the mNAND chip handle to be used
Return values
MNAND_OK,success
elseproblem with operation

◆ mnand_get_bkops_en()

MNAND_STATUS mnand_get_bkops_en ( mnand_chip chip,
uint8_t *  enabled 
)

Return the status of BKOPS_EN bit.

Parameters
chip- pointer to chip handle
enabled- store the BKOPS_EN bit
Return values
MNAND_OK,success
elseproblem with operation

◆ mnand_get_bkops_status()

MNAND_STATUS mnand_get_bkops_status ( mnand_chip chip,
uint8_t *  stat 
)

Return the status of BKOPS.

Parameters
chip- pointer to chip handle
stat- store the status of BKOPS
Return values
MNAND_OK,success
elseproblem with operation

◆ mnand_get_cache_en()

MNAND_STATUS mnand_get_cache_en ( mnand_chip chip,
uint8_t *  enabled 
)

Determine if eMMC cache is enabled.

Parameters
chip- pointer to chip handle
enabled- store the Read and Write cache enabled status Bit 0 - Read Cache, Bit 1 - Write Cache Bit value 1 - Cache enabled, Bit value 0 - Cache Disabled
Return values
MNAND_OK,success
elseproblem with operation

◆ mnand_get_current_lun()

MNAND_STATUS mnand_get_current_lun ( mnand_chip chip,
uint32_t *  lun 
)

get mnand current lun (UFS only)

Parameters
chip- the mNAND chip handle to be used
lun- Pointer to logical unit number to be updated
Return values
MNAND_OK,success
elseproblem with operation

◆ mnand_get_ffu_status()

MNAND_STATUS mnand_get_ffu_status ( mnand_chip chip,
MNAND_FFU_STATUS ffu_status 
)

Returns the status of the FFU operation that was done in the previous boot cycle.

  • If the ffu_status is returned as MNAND_FFU_STATUS_NO_INFORMATION, then it can be ignored.
  • mnand_compare_fw_version() should be called to confirm the Firmware is upgraded to the correct version.
Parameters
[in]handle- Handle to an mNAND eMMC device structure.
[out]ffu_status- Ths status of the FFU operation that was performed before.
Returns
  • MNAND_OK : Success
  • MNAND_EINVAL : Invalid input parameter, such as NULL or invalid "handle".
  • MNAND_EIO : Device I/O operation failed.
  • MNAND_EOFLOW : Overflow error, while conversion of data from one essential type to another
Precondition
mnand_fu() shall be success


Usage considerations

  • Allowed context for the API call
    • Interrupt handler: No
    • Signal handler: No
    • Thread-safe: Yes, with the condition:
      • This API is thread safe if there are different instances of "handle" When it is called from different threads.
    • Async/Sync: Sync
    • Re-entrant: No
  • API Group
    • Init: No
    • Runtime: Yes
    • De-Init: No

◆ mnand_get_fw_version()

MNAND_STATUS mnand_get_fw_version ( mnand_chip chip,
char *  fw_version 
)

Returns the current version(in hex string format) of the firmware that is running on the device.

Parameters
[in]handle- Handle to an mNAND eMMC device structure.
[out]fw_version- pointer to the string buffer to which the version should be copied.
Returns
  • MNAND_OK : Success
  • MNAND_EINVAL : Invalid input parameter, such as NULL or invalid "handle".
Precondition
mnand_is_ffu_ready() shall be success


Usage considerations

  • Allowed context for the API call
    • Interrupt handler: No
    • Signal handler: No
    • Thread-safe: Yes, with the condition:
      • This API is thread safe if there are different instances of "handle" When it is called from different threads.
    • Async/Sync: Sync
    • Re-entrant: No
  • API Group
    • Init: No
    • Runtime: Yes
    • De-Init: No

◆ mnand_get_geo_info()

MNAND_STATUS mnand_get_geo_info ( mnand_chip chip,
mnand_geo_info geo_info 
)

Extract mnand geometry info.

Parameters
chip- the mNAND chip handle to be used
geo_info- mnand geometry info
Return values
MNAND_OK,success
elseproblem with operation

◆ mnand_get_lu_info()

MNAND_STATUS mnand_get_lu_info ( mnand_chip chip,
uint32_t  lun,
mnand_lu_info lu_info 
)

get mnand lu info (UFS only)

Parameters
chip- the mNAND chip handle to be used
lun- logical unit number for which lu info is needed
lu_info- pointer for the lu_info data to be updated
Return values
MNAND_OK,success
elseproblem with operation

◆ mnand_get_refresh_progress()

MNAND_STATUS mnand_get_refresh_progress ( mnand_chip chip,
double *  rfsh_progress 
)

Extract refresh progress from the mNAND chip.

Parameters
chip- the mNAND chip handle to be used
rfsh_progress- current refresh progress (in percentage)
Return values
MNAND_OK,success
elseproblem with operation

◆ mnand_get_storage_type()

static MNAND_STORAGE_TYPE mnand_get_storage_type ( mnand_chip chip)
inlinestatic

Return mnand storage type.

Parameters
chip- pointer to chip handle
Return values
storagetype(enum) of the mnand device

Definition at line 656 of file nvmnand.h.

References __mnand_chip::storage_type.

◆ mnand_is_bad_block()

static int mnand_is_bad_block ( mnand_block_info blk)
inlinestatic

Determine if given block is a bad block.

Parameters
blk- pointer to block info
Return values
non-zero,blockis bad block
0,blockis not bad block

Definition at line 514 of file nvmnand.h.

References __mnand_block_info::block_age, __mnand_block_info::block_type, MAX_ERASE_CNT, mnand_is_valid_block(), MNAND_MANF_BAD_BLOCK, MNAND_RUNTIME_BAD_BLOCK, and MNAND_UNKNOWN_BAD_BLOCK.

Referenced by mnand_is_usable_block().

◆ mnand_is_block_info_available()

static int mnand_is_block_info_available ( mnand_chip chip)
inlinestatic

Return if the block info is available.

Parameters
chip- pointer to chip handle
Return values
non-zero,blockinfo is available
0,blockinfo is not available

Definition at line 642 of file nvmnand.h.

References __mnand_chip::num_blocks.

◆ mnand_is_ffu_ready()

MNAND_STATUS mnand_is_ffu_ready ( mnand_chip chip,
bool *  res 
)

Returns wheher the device is ready to read the current firmware verion that is on the device and to perform the FFU operation .

Parameters
[in]handle- Handle to an mNAND eMMC device structure.
[out]res- whether the device is ready.
Returns
  • MNAND_OK : Success
  • MNAND_EINVAL : Invalid input parameter, such as NULL or invalid "handle".
Precondition
mnand_open() shall be success


Usage considerations

  • Allowed context for the API call
    • Interrupt handler: No
    • Signal handler: No
    • Thread-safe: Yes, with the condition:
      • This API is thread safe if there are different instances of "handle" When it is called from different threads.
    • Async/Sync: Sync
    • Re-entrant: No
  • API Group
    • Init: No
    • Runtime: Yes
    • De-Init: No

◆ mnand_is_mlc_block()

static int mnand_is_mlc_block ( mnand_block_info blk)
inlinestatic

Determine if given block is in MLC region.

Parameters
blk- pointer to block info
Return values
non-zero,blockis in MLC region
0,blockis not in MLC region

Definition at line 581 of file nvmnand.h.

References __mnand_block_info::block_type, mnand_is_valid_block(), and MNAND_MLC_BLOCK.

◆ mnand_is_refresh_available()

static int mnand_is_refresh_available ( mnand_chip chip)
inlinestatic

Return if force refresh is available.

Parameters
chip- pointer to chip handle
Return values
non-zero,forcerefresh is available
0,forcerefresh is not available

Definition at line 627 of file nvmnand.h.

References __mnand_chip::refresh_available.

◆ mnand_is_slc_block()

static int mnand_is_slc_block ( mnand_block_info blk)
inlinestatic

Determine if given block is in SLC region.

Parameters
blk- pointer to block info
Return values
non-zero,blockis in SLC region
0,blockis not in SLC region

Definition at line 565 of file nvmnand.h.

References __mnand_block_info::block_type, mnand_is_valid_block(), and MNAND_SLC_BLOCK.

◆ mnand_is_smart_summary_available()

static int mnand_is_smart_summary_available ( mnand_chip chip)
inlinestatic

Return if the smart summary is available.

Parameters
chip- pointer to chip handle
Return values
non-zero,smartsummary is available
0,smartsummary is not available

Definition at line 612 of file nvmnand.h.

References __mnand_chip::smart_summary_available.

◆ mnand_is_summary_available()

static int mnand_is_summary_available ( mnand_chip chip)
inlinestatic

Return if the summary is available.

Parameters
chip- pointer to chip handle
Return values
non-zero,summaryis available
0,summaryis not available

Definition at line 597 of file nvmnand.h.

References __mnand_chip::summary_available.

◆ mnand_is_usable_block()

static int mnand_is_usable_block ( mnand_block_info blk)
inlinestatic

Determine if given block is a usable block.

Note, in addition to bad block, system block is not usable, neither.

Parameters
blk- pointer to block info
Return values
non-zero,blockis usable
0,blockis not usable

Definition at line 532 of file nvmnand.h.

References __mnand_block_info::block_type, mnand_is_bad_block(), mnand_is_valid_block(), and MNAND_SYSTEM_BLOCK.

Referenced by mnand_is_usable_block_with_type().

◆ mnand_is_usable_block_with_type()

static int mnand_is_usable_block_with_type ( mnand_block_info blk,
uint16_t  blk_type 
)
inlinestatic

Determine if given block is a usable block, and matches given block type.

Parameters
blk- pointer to block info
blk_type- block type to match
Return values
non-zero,blockis usable
0,blockis not usable

Definition at line 549 of file nvmnand.h.

References __mnand_block_info::block_type, and mnand_is_usable_block().

◆ mnand_is_valid_block()

static int mnand_is_valid_block ( mnand_block_info blk)
inlinestatic

Return the validity of the block, given the pointer of block info.

Parameters
blk- pointer to block info
Return values
non-zero,blockinfo is valid
0,blockinfo is invalid

Definition at line 499 of file nvmnand.h.

References __mnand_block_info::valid.

Referenced by mnand_is_bad_block(), mnand_is_mlc_block(), mnand_is_slc_block(), and mnand_is_usable_block().

◆ mnand_open()

MNAND_STATUS mnand_open ( const char *  devname,
mnand_chip chip 
)

"Opening" the mNAND chip.

This function needs to be called first to establish mNAND health related content. Identification of mNAND will be performed. Various health related data structures will be allocated, initialized, and set up.

mnand_open and mnand_close to be used in pair.

Parameters
devname- pointer to device name (e.g. /dev/emmc0)
chip- the mNAND chip handle to be initialized
Return values
MNAND_OK,success
elseproblem with operation

◆ mnand_read_sectors_phys()

int mnand_read_sectors_phys ( mnand_chip chip,
unsigned int  start_sector,
unsigned int  sector_cnt,
off_t  physaddr 
)

Reading data sectors into given buffer (pointed by physical address).

Parameters
chip- the mNAND chip handle to be used
start_sector- the starting sector to be read
sector_cnt- the number of sectors to be read
addr- buffer address (in physical address form)
Return values
numberof sectors read
-1problem with operation

◆ mnand_read_sectors_virt()

int mnand_read_sectors_virt ( mnand_chip chip,
unsigned int  start_sector,
unsigned int  sector_cnt,
void virtaddr 
)

Reading data sectors into given buffer (pointed by virtual address).

Parameters
chip- the mNAND chip handle to be used
start_sector- the starting sector to be read
sector_cnt- the number of sectors to be read
virtaddr- buffer address (in virtual address form)
Return values
numberof sectors read
-1problem with operation

◆ mnand_send_combo_query_req()

MNAND_STATUS mnand_send_combo_query_req ( mnand_chip chip,
mnand_ufs_query_req query_req,
uint8_t  num_cmds,
uint8_t  need_cq_empty,
uint8_t  ret_on_error 
)

Send mnand combo query request (UFS only)

Parameters
chip- the mNAND chip handle to be used
query_req- Pointer to ufs query request info
num_cmds- number of query requests in this combo request
need_cq_empty- Flag to specify if this request needs cq to be empty
ret_on_err- Flag to specify to return on error or continue furthur
Return values
MNAND_OK,success
elseproblem with operation

◆ mnand_send_power_off_notification()

MNAND_STATUS mnand_send_power_off_notification ( mnand_chip chip)

Send power-off notification.

Parameters
chip- pointer to chip handle
Return values
MNAND_OK,success
elseproblem with operation

◆ mnand_send_refresh()

MNAND_STATUS mnand_send_refresh ( mnand_chip chip,
uint8_t  block_type,
int  num_blocks,
uint32_t  rfsh_unit_time_us,
mnand_refresh_progress progress 
)

Send "refresh" command to the mNAND chip.

The purpose is to force data rotation to improve the data retention.

Parameters
chip- the mNAND chip handle to be used
block_type- which region (SLC/MLC) to be used
num_blocks- #blocks to be refreshed @prarm progress - refresh progress
Return values
MNAND_OK,success
elseproblem with operation

◆ mnand_set_bkops_en()

MNAND_STATUS mnand_set_bkops_en ( mnand_chip chip,
uint8_t  enable 
)

set the BKOPS_EN bit in ext_csd Note: BNKOPS_EN is a OTP, once programmed can't change the value.

Parameters
chip- pointer to chip handle
enable- Value to set in BKOPS_EN bit Set 1 to BKOPS_EN, indicates host driver will issue bkops req and 0 indicate host driver will not issue bkops request.
Return values
MNAND_OK,success
elseproblem with operation

◆ mnand_set_bkops_start()

MNAND_STATUS mnand_set_bkops_start ( mnand_chip chip)

Mark the start of BKOPS.

Parameters
chip- pointer to chip handle
Return values
MNAND_OK,success
elseproblem with operation

◆ mnand_set_cache_en()

MNAND_STATUS mnand_set_cache_en ( mnand_chip chip,
uint8_t  enable 
)

Enable/Disable cache on mnand.

Parameters
chip- the mNAND chip handle to be used
enable- Enables/Disable state for Read and Write cache Bit 0 - Read Cache, Bit 1 - Write Cache Bit value 1 - Cache enabled, Bit value 0 - Cache Disabled
Return values
MNAND_OK,success
elseproblem with operation

◆ mnand_switch_cmd()

MNAND_STATUS mnand_switch_cmd ( mnand_chip chip,
uint8_t  index,
uint8_t  value,
char *  errmsg_prepend 
)

Send mnand switch cmd to mmc to set EXT CSD register.

(eMMC only)

Parameters
chip- the mNAND chip handle to be used
index- which EXT CSD register to be set
value- the value of EXT CSD register to be set
errmsg_prepend- error msg to be displayed on failure
Return values
MNAND_OK,success
elseproblem with operation

◆ mnand_test_multi_cmd()

MNAND_STATUS mnand_test_multi_cmd ( mnand_chip chip)

Test IOCTL MULTI CMD Currently under this test: Reads the XCSD status, toggles the cache status, reads the XCSD status again toggles the cache status again, and updates the XCSD register.

Parameters
chip- the mNAND chip handle to be used
Return values
MNAND_OK,success
elseproblem with operation

◆ mnand_trim_all()

MNAND_STATUS mnand_trim_all ( mnand_chip chip)

Trimming the whole device.

Return values
MNAND_OK,success
elseproblem with operation

◆ mnand_unbind()

MNAND_STATUS mnand_unbind ( mnand_chip chip)

"Unbinding" (aka releasing) the mNAND chip.

This function needs to be called last to free up health related resource and various data structures.

mnand_bind and mnand_unbind to be used in pair.

Note: file descriptor used in "bind" will NOT be closed.

Parameters
chip- the mNAND chip handle to be used
Return values
MNAND_OK,success
elseproblem with operation

◆ mnand_update_block_info()

MNAND_STATUS mnand_update_block_info ( mnand_chip chip)

Updating the list of block info inside mNAND chip handle.

Parameters
chip- the mNAND chip handle to be updated
Return values
MNAND_OK,success
elseproblem with operation

◆ mnand_update_card_status()

MNAND_STATUS mnand_update_card_status ( mnand_chip chip)

Updating the card status field inside mNAND chip handle.

Parameters
chip- the mNAND chip handle to be updated
Return values
MNAND_OK,success
elseproblem with operation

◆ mnand_update_cid()

MNAND_STATUS mnand_update_cid ( mnand_chip chip)

Updating the CID field inside mNAND chip handle.

Parameters
chip- the mNAND chip handle to be updated
Return values
MNAND_OK,success
elseproblem with operation

◆ mnand_update_csd()

MNAND_STATUS mnand_update_csd ( mnand_chip chip)

Updating the CSD field inside mNAND chip handle.

Parameters
chip- the mNAND chip handle to be updated
Return values
MNAND_OK,success
elseproblem with operation

◆ mnand_update_smart_summary_info()

MNAND_STATUS mnand_update_smart_summary_info ( mnand_chip chip)

Updating the smart summary info inside mNAND chip handle.

Parameters
chip- the mNAND chip handle to be updated
Return values
MNAND_OK,success
elseproblem with operation

◆ mnand_update_summary_info()

MNAND_STATUS mnand_update_summary_info ( mnand_chip chip)

Updating the summary info inside mNAND chip handle.

Parameters
chip- the mNAND chip handle to be updated
Return values
MNAND_OK,success
elseproblem with operation

◆ mnand_update_xcsd()

MNAND_STATUS mnand_update_xcsd ( mnand_chip chip)

Updating the EXT CSD field inside mNAND chip handle.

Parameters
chip- the mNAND chip handle to be updated
Return values
MNAND_OK,success
elseproblem with operation