NVIDIA DriveOS Linux NSR SDK API Reference

7.0.3.0 Release
nvmnand.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2013-2022 NVIDIA Corporation. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions are met:
6  *
7  * Redistributions of source code must retain the above copyright notice,
8  * this list of conditions and the following disclaimer.
9  *
10  * Redistributions in binary form must reproduce the above copyright notice,
11  * this list of conditions and the following disclaimer in the documentation
12  * and/or other materials provided with the distribution.
13  *
14  * Neither the name of the NVIDIA Corporation nor the names of its contributors
15  * may be used to endorse or promote products derived from this software
16  * without specific prior written permission.
17  *
18  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
22  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28  * POSSIBILITY OF SUCH DAMAGE.
29  *
30  */
31 
42 #ifndef __NV_MNAND_H__
43 #define __NV_MNAND_H__
44 
53 #include <stdio.h>
54 #include <stdint.h>
55 #include <stdbool.h>
56 #include <assert.h>
57 
58 #if defined(__cplusplus)
59 extern "C"
60 {
61 #endif
62 
66 #define MAX_ERASE_CNT 0xFFFF
67 
71 #ifndef SECTOR_SZ
72 #define SECTOR_SZ 512
73 #endif
74 
78 #define MNAND_READ_CACHE_ENABLE (1 << 0)
79 #define MNAND_WRITE_CACHE_ENABLE (1 << 1)
80 
82 #define MAX_FW_STR_LEN (32U)
83 
84 #define MAX_PRN_STR_LEN (64U)
85 
86 /* forward declaration */
87 struct __mnand_chip;
88 struct __mnand_operations;
89 
93 typedef struct __mnand_block_info {
94  uint16_t block_number; /* block#, absolute */
95  uint16_t block_age; /* age (aka erase, p/e) count */
96  uint16_t block_type; /* block type */
97  #define MNAND_UNKNOWN_BLOCK (1 << 0)
98  #define MNAND_MLC_BLOCK (1 << 1)
99  #define MNAND_SLC_BLOCK (1 << 2)
100  #define MNAND_UNKNOWN_BAD_BLOCK (1 << 8)
101  #define MNAND_MANF_BAD_BLOCK (1 << 9)
102  #define MNAND_RUNTIME_BAD_BLOCK (1 << 10)
103  #define MNAND_SYSTEM_BLOCK (1 << 11)
104  uint16_t valid; /* is this entry valid? */
106 
111  uint16_t spare_blocks; /* #spare block in this region */
112  double percentage; /* Life time in percentage */
114 
118 typedef struct __mnand_life_time_info {
120  uint8_t life_time_type; /* how the lifetime being presented */
121  #define MNAND_LIFETIME_INVALID (1 << 0)
122  #define MNAND_LIFETIME_IN_BLOCK (1 << 1)
123  #define MNAND_LIFETIME_IN_PERCENT (1 << 2)
125 
129 typedef union __mnand_refresh_element {
130  uint16_t block; /* last block being refresh */
131  double percentage; /* refresh percentage */
133 
137 typedef struct __mnand_refresh_progress {
139  uint8_t progress_type; /* how the progress being presented */
140  #define MNAND_RFSH_PROG_INVALID (1 << 0)
141  #define MNAND_RFSH_PROG_IN_BLOCK (1 << 1)
142  #define MNAND_RFSH_PROG_IN_PERCENT (1 << 2)
144 
149  uint32_t rfsh_days; /* whole chip refreshes in given days */
150  uint32_t def_rfsh_interval; /* default refresh interval(msec) */
151  uint32_t min_rfsh_interval; /* minimum refresh interval(msec) */
152  uint32_t shutdown_rfsh_interval; /* min shutdown refresh interval(msec) */
153  uint32_t rfsh_calibrate_cnt; /* min refreshes before re-calibration */
154  uint32_t rfsh_unit_time_us; /* time for each refresh operation(UFS only) */
156 
160 typedef struct __mnand_ages_element {
161  uint16_t min_age; /* min. age in this region */
162  uint16_t max_age; /* max. age in this region */
163  double avg_age; /* avg. age in this region */
164  uint32_t total_age; /* total age (if available) */
165  uint8_t valid; /* is this entry valid? */
167 
173 typedef struct __mnand_wr_info {
176  uint32_t fnand;
179  uint32_t fram;
183  uint8_t valid;
184 } mnand_wr_info;
185 
192  double slc_weaf;
195  double mlc_weaf;
199  uint8_t valid;
201 
202 
206 typedef struct __mnand_summary_element {
207  mnand_life_time_info life;/* life time information */
208  mnand_ages_info ages; /* ages information */
217  uint8_t valid; /* is this entry valid? */
219 
223 typedef struct __mnand_summary_info {
224  mnand_summary_element mlc; /* MLC region */
225  mnand_summary_element slc; /* SLC region */
226  mnand_summary_element total; /* per chip */
227  int factory_bb_cnt; /* #factory bad block, -1=invalid */
228  int runtime_bb_cnt; /* #runtime bad block, -1=invalid */
232  int32_t spare_bcnt;
234 
238 typedef struct __mnand_cid_info {
239  uint8_t data[16]; /* JDEC spec. 4.51, table 64, 128bit wide */
241 
245 typedef struct __mnand_csd_info {
246  uint8_t data[16]; /* JDEC spec. 4.51, table 67, 128bit wide */
248 
252 typedef struct __mnand_ext_csd_info {
253  uint8_t data[512]; /* JDEC spec. 4.51, table 82, 512byte wide */
255 
259 typedef struct __mnand_device_desc_info {
260  uint8_t data[64]; /* JESD220C spec. table 14.4, 64byte wide */
262 
266 typedef struct __mnand_config_desc_info {
267  uint8_t data1[144]; /* JESD220C spec. table 14.10, 144byte wide */
268  uint8_t data2[144]; /* JESD220C spec. table 14.10, 144byte wide */
269  uint8_t data3[144]; /* JESD220C spec. table 14.10, 144byte wide */
270  uint8_t data4[144]; /* JESD220C spec. table 14.10, 144byte wide */
272 
276 typedef struct __mnand_geo_desc_info {
277  uint8_t data[72]; /* JESD220C spec. table 14.13, 72byte wide */
279 
283 typedef struct __mnand_unit_desc_info {
284  uint8_t data[19]; /* JESD220C spec. table 14.14, 19byte wide */
286 
290 typedef struct __mnand_mmc_geo_info {
291  uint64_t sec_count;
292  uint64_t enh_size_mult;
293  uint64_t enh_start_addr;
294  uint64_t hc_wp_grp_size;
298  uint64_t user_capacity;
300 
304 typedef struct __mnand_ufs_geo_info {
306  uint8_t max_lu;
307  uint32_t segment_size;
323 
327 typedef union __mnand_geo_info {
331 
335 typedef struct __mnand_lu_info {
336  uint8_t lu_enabled;
337  uint8_t memory_type;
338  uint8_t logical_blk_sz;
339  uint32_t num_alloc_units;
340 } mnand_lu_info;
341 
345 typedef enum __mnand_device_type {
346  MNAND_CATCH_ALL = 0, /* "catch-all", used when none matched */
347  MNAND_HYNIX_F26 = 1, /* Hynix F26 */
348  MNAND_HYNIX_F20 = 2, /* Hynix F20 */
349  MNAND_HYNIX_F16 = 3, /* Hynix F16 */
350  MNAND_MICRON = 4, /* Samsung eMMC5.0 */
351  MNAND_SAMSUNG50 = 5, /* Samsung eMMC5.0 */
352  MNAND_SAMSUNG51 = 6, /* Samsung eMMC5.1 */
353  MNAND_TOSHIBA = 7, /* Toshiba */
354  MNAND_UFS_TOSHIBA = 8, /* Toshiba UFS */
355  MNAND_UFS_SAMSUNG = 9, /* Samsung UFS */
356  MNAND_UFS_MICRON = 10, /* Micron UFS */
358 
359 
363 typedef enum __mnand_storage_type {
364  MNAND_EMMC = 0, /* eMMC storage device */
365  MNAND_UFS = 1, /* UFS storage device */
366  MNAND_UNKNOWN = 2, /* unknown storage - error */
368 
372 typedef enum __mnand_eol_status {
373  MNAND_EOL_OK = 0, /* Not yet EOL */
374  MNAND_EOL_DETECTED = 1, /* EOL detected */
376 
381  /* Passed FW version is same as the current FW version on Device */
383  /* Passed FW version is greater than current FW version on Device */
385  /* Passed FW version is lesser than current FW version on Device */
388 
392 typedef enum __mnand_ffu_status {
412 
416 typedef enum __mnand_status {
417  MNAND_OK = 0, /* OK */
418  MNAND_ENOMEM = 1, /* memory allocation error */
419  MNAND_EIO = 2, /* I/O error */
420  MNAND_EINVAL = 3, /* invalid operation */
421  MNAND_EOPEN = 4, /* error opening device node */
422  MNAND_UNSUPPORTED = 5, /* not supported operation */
423  MNAND_UNKNOWN_ERR = 6, /* unknown error */
424  MNAND_BKOPS_EN_ERR = 7 /* BKOPS en state not set to requested value */
425 } MNAND_STATUS;
426 
430 struct __mnand_chip {
431  int fd; /* file descriptor */
432  char desc[128]; /* chip desciption, mNAND specific */
433  char prn[MAX_PRN_STR_LEN]; /* Produce Name */
434  char fw_version[MAX_FW_STR_LEN];/* firmware version */
435  void *priv_ops; /* mNAND vendor specific priv operations */
436  void *priv_chip_ops; /* mNAND storage specific priv operations */
437  int num_blocks; /* #blocks available, 0=unavailable */
438  mnand_block_info *block_info; /* block info list, indexd by num_blocks */
439  int refresh_available; /* force refresh is available */
440  int ffu_available; /* FFU is available */
441  mnand_refresh_properties rfsh_properties; /* refresh properties */
442  int summary_available; /* summary info is available */
443  int smart_summary_available; /* smart summary info is available */
444  mnand_summary_info *summary; /* summary info, not NULL when available */
445  mnand_cid_info cid; /* eMMC CID */
446  mnand_csd_info csd; /* eMMC CSD */
447  mnand_ext_csd_info xcsd; /* eMMC EXT CSD */
448  mnand_device_desc_info device_desc; /* UFS Device Desccriptior */
449  mnand_config_desc_info cfg_desc; /* UFS Configuration Descriptor */
450  mnand_geo_desc_info geo_desc; /* UFS Geometry Descriptor */
451  mnand_unit_desc_info unit_desc; /* UFS Unit Descriptor */
452  uint32_t card_status; /* card status */
453  MNAND_DEVICE_TYPE dev_type; /* device type */
454  MNAND_STORAGE_TYPE storage_type; /* storage type */
455  void *priv; /* mNAND specific private "handle" */
456 };
457 
458 typedef struct __mnand_chip mnand_chip;
459 
464  uint8_t opcode; /* Query operation opcode */
465  uint8_t idn; /* Query operation idn */
466  uint8_t index; /* index - optional in some cases */
467  uint8_t selector; /* index - optional in some cases */
468  uint8_t buf_size; /* buf_size - buffer size in bytes pointed by buffer */
469  uint8_t *buffer; /* user buffer pointer for query data
470  * should be 4 bytes for Attribute Read/Write
471  * should be 1 byte for Flag Read
472  * size varies for Read/Write Descriptor */
473  uint32_t delay; /* delay after query command completion */
474  MNAND_STATUS status; /* return status of this query request */
475 };
476 
481  uint8_t num_cmds; /* Number of Query Commands in this Combo */
482  uint8_t need_cq_empty; /* Command Queue need to be empty or not */
483  struct __mnand_ufs_query_req *query; /* Query Request info start ptr */
484 };
485 
488 
489 /* inline helpers */
490 
499 static inline int mnand_is_valid_block(mnand_block_info *blk)
500 {
501  assert(blk != NULL);
502 
503  return (blk->valid != 0);
504 }
505 
514 static inline int mnand_is_bad_block(mnand_block_info *blk)
515 {
516  assert(blk != NULL);
517 
518  return mnand_is_valid_block(blk) && ((blk->block_type &
520  MNAND_RUNTIME_BAD_BLOCK)) || (blk->block_age == MAX_ERASE_CNT)) ? 1 : 0;
521 }
522 
533 {
534  assert(blk != NULL);
535 
536  return (!mnand_is_valid_block(blk) || mnand_is_bad_block(blk) ||
537  (blk->block_type & MNAND_SYSTEM_BLOCK)) ? 0 : 1;
538 }
539 
550  uint16_t blk_type)
551 {
552  assert((blk != NULL) && (blk_type != 0));
553 
554  return (mnand_is_usable_block(blk) && (blk->block_type & blk_type)) ? 1 : 0;
555 }
556 
565 static inline int mnand_is_slc_block(mnand_block_info *blk)
566 {
567  assert(blk != NULL);
568 
569  return mnand_is_valid_block(blk) &&
570  (blk->block_type & MNAND_SLC_BLOCK) ? 1 : 0;
571 }
572 
581 static inline int mnand_is_mlc_block(mnand_block_info *blk)
582 {
583  assert(blk != NULL);
584 
585  return mnand_is_valid_block(blk) &&
586  (blk->block_type & MNAND_MLC_BLOCK) ? 1 : 0;
587 }
588 
597 static inline int mnand_is_summary_available(mnand_chip *chip)
598 {
599  assert(chip != NULL);
600 
601  return (chip->summary_available != 0);
602 }
603 
613 {
614  assert(chip != NULL);
615 
616  return (chip->smart_summary_available != 0);
617 }
618 
627 static inline int mnand_is_refresh_available(mnand_chip *chip)
628 {
629  assert(chip != NULL);
630 
631  return (chip->refresh_available != 0);
632 }
633 
643 {
644  assert(chip != NULL);
645 
646  return (chip->num_blocks > 0);
647 }
648 
657 {
658  assert(chip != NULL);
659 
660  return (chip->storage_type);
661 }
662 
663 /* prototypes for wrapper functions */
664 
674 MNAND_STATUS mnand_get_bkops_en(mnand_chip *chip, uint8_t *enabled);
675 
685 MNAND_STATUS mnand_get_bkops_status(mnand_chip *chip, uint8_t *stat);
686 
699 MNAND_STATUS mnand_set_bkops_en(mnand_chip *chip, uint8_t enable);
700 
710 
720 
730 
745 MNAND_STATUS mnand_open(const char *devname, mnand_chip *chip);
746 
760 
778 MNAND_STATUS mnand_bind(int fd, mnand_chip *chip);
779 
795 
805 
815 
825 
835 
845 
855 
865 
866 
877  MNAND_EOL_STATUS *eol_status);
878 
891 MNAND_STATUS mnand_send_refresh(mnand_chip *chip, uint8_t block_type,
892  int num_blocks, uint32_t rfsh_unit_time_us,
893  mnand_refresh_progress *progress);
894 
908 MNAND_STATUS mnand_extract_age_info(mnand_chip *chip, int block_type,
909  uint64_t *total_age, int *blk_count, double *avg_age);
910 
921  double *rfsh_progress);
922 
933  mnand_life_time_info *life_time_info);
934 
946 MNAND_STATUS mnand_set_cache_en(mnand_chip *chip, uint8_t enable);
947 
957 
970 int mnand_read_sectors_virt(mnand_chip *chip, unsigned int start_sector,
971  unsigned int sector_cnt, void *virtaddr);
972 
985 int mnand_read_sectors_phys(mnand_chip *chip, unsigned int start_sector,
986  unsigned int sector_cnt, off_t physaddr);
987 
996 
1008 MNAND_STATUS mnand_get_cache_en(mnand_chip *chip, uint8_t *enabled);
1009 
1021 MNAND_STATUS mnand_switch_cmd(mnand_chip *chip, uint8_t index,
1022  uint8_t value, char *errmsg_prepend);
1023 
1034 
1045 MNAND_STATUS mnand_get_lu_info(mnand_chip *chip, uint32_t lun,
1046  mnand_lu_info *lu_info);
1047 
1057 MNAND_STATUS mnand_get_current_lun(mnand_chip *chip, uint32_t *lun);
1058 
1072  mnand_ufs_query_req *query_req, uint8_t num_cmds, uint8_t need_cq_empty,
1073  uint8_t ret_on_error);
1074 
1087 
1165 MNAND_STATUS mnand_ffu(mnand_chip *chip, char *fw_file);
1166 
1201 
1227 MNAND_STATUS mnand_get_fw_version(mnand_chip *chip, char *fw_version);
1228 
1262 
1289 MNAND_STATUS mnand_is_ffu_ready(mnand_chip *chip, bool *res);
1290 
1291 #if defined(__cplusplus)
1292 }
1293 #endif /* __cplusplus */
1294 
1295 #endif /* __NV_MNAND_H__ */
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.
MNAND_HYNIX_F16
@ MNAND_HYNIX_F16
Definition: nvmnand.h:349
mnand_is_slc_block
static int mnand_is_slc_block(mnand_block_info *blk)
Determine if given block is in SLC region.
Definition: nvmnand.h:565
__mnand_life_time_info::life_time
mnand_life_time_element life_time
Definition: nvmnand.h:119
__mnand_refresh_properties::def_rfsh_interval
uint32_t def_rfsh_interval
Definition: nvmnand.h:150
MNAND_MANF_BAD_BLOCK
#define MNAND_MANF_BAD_BLOCK
Definition: nvmnand.h:101
__mnand_chip::storage_type
MNAND_STORAGE_TYPE storage_type
Definition: nvmnand.h:454
mnand_update_card_status
MNAND_STATUS mnand_update_card_status(mnand_chip *chip)
Updating the card status field inside mNAND chip handle.
__mnand_ufs_geo_info::enhanced4_cap_adj_fac
uint16_t enhanced4_cap_adj_fac
Definition: nvmnand.h:321
__mnand_lu_info::memory_type
uint8_t memory_type
Definition: nvmnand.h:337
MNAND_HYNIX_F26
@ MNAND_HYNIX_F26
Definition: nvmnand.h:347
__mnand_mmc_geo_info::enh_size_mult
uint64_t enh_size_mult
Definition: nvmnand.h:292
__mnand_device_desc_info
DEVICE DESC - UFS Only.
Definition: nvmnand.h:259
__mnand_chip::csd
mnand_csd_info csd
Definition: nvmnand.h:446
__mnand_mmc_geo_info::partition_size_alignment
uint64_t partition_size_alignment
Definition: nvmnand.h:297
__mnand_chip::priv_chip_ops
void * priv_chip_ops
Definition: nvmnand.h:436
__mnand_csd_info
CSD - eMMC only.
Definition: nvmnand.h:245
__mnand_mmc_geo_info::max_enh_size_mult
uint64_t max_enh_size_mult
Definition: nvmnand.h:296
__mnand_refresh_progress
information on refresh progress
Definition: nvmnand.h:137
MNAND_FFU_STATUS
enum __mnand_ffu_status MNAND_FFU_STATUS
mNAND UFS FFU status
__mnand_geo_info::mmc_geo_info
mnand_mmc_geo_info mmc_geo_info
Definition: nvmnand.h:328
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.
__mnand_refresh_progress::progress
mnand_refresh_element progress
Definition: nvmnand.h:138
MNAND_FFU_STATUS_NO_INFORMATION
@ MNAND_FFU_STATUS_NO_INFORMATION
Indicates there is no informatuon available about the FFU operation.
Definition: nvmnand.h:406
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).
mnand_device_desc_info
struct __mnand_device_desc_info mnand_device_desc_info
DEVICE DESC - UFS Only.
__mnand_summary_info::spare_bcnt
int32_t spare_bcnt
Specifies the number of remaining spare blocks, where -1 indicates an invalid count.
Definition: nvmnand.h:232
__mnand_ufs_geo_info
UFS GEOMETRY INFO - UFS only.
Definition: nvmnand.h:304
MNAND_UFS_TOSHIBA
@ MNAND_UFS_TOSHIBA
Definition: nvmnand.h:354
__mnand_chip::dev_type
MNAND_DEVICE_TYPE dev_type
Definition: nvmnand.h:453
__mnand_chip::summary
mnand_summary_info * summary
Definition: nvmnand.h:444
__mnand_summary_element::eaf
mnand_ufs_write_erase_amplification eaf
Specifies the Erase Amplification of the device.
Definition: nvmnand.h:216
mnand_update_xcsd
MNAND_STATUS mnand_update_xcsd(mnand_chip *chip)
Updating the EXT CSD field inside mNAND chip handle.
__mnand_chip::cfg_desc
mnand_config_desc_info cfg_desc
Definition: nvmnand.h:449
mnand_cid_info
struct __mnand_cid_info mnand_cid_info
CID - eMMC only.
MNAND_EOPEN
@ MNAND_EOPEN
Definition: nvmnand.h:421
__mnand_life_time_element::percentage
double percentage
Definition: nvmnand.h:112
__mnand_summary_element::life
mnand_life_time_info life
Definition: nvmnand.h:207
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).
MNAND_UNSUPPORTED
@ MNAND_UNSUPPORTED
Definition: nvmnand.h:422
MNAND_EOL_DETECTED
@ MNAND_EOL_DETECTED
Definition: nvmnand.h:374
__mnand_ages_element::max_age
uint16_t max_age
Definition: nvmnand.h:162
MNAND_UFS_MICRON
@ MNAND_UFS_MICRON
Definition: nvmnand.h:356
__mnand_device_desc_info::data
uint8_t data[64]
Definition: nvmnand.h:260
mnand_is_bad_block
static int mnand_is_bad_block(mnand_block_info *blk)
Determine if given block is a bad block.
Definition: nvmnand.h:514
__mnand_mmc_geo_info::hc_erase_grp_size
uint64_t hc_erase_grp_size
Definition: nvmnand.h:295
mnand_ufs_write_erase_amplification::valid
uint8_t valid
Specifies whether the values indicated are vaild or not.
Definition: nvmnand.h:199
__mnand_unit_desc_info
UNIT DESC - UFS Only.
Definition: nvmnand.h:283
__mnand_summary_info
aggregation of summaries
Definition: nvmnand.h:223
mnand_update_csd
MNAND_STATUS mnand_update_csd(mnand_chip *chip)
Updating the CSD field inside mNAND chip handle.
mnand_ext_csd_info
struct __mnand_ext_csd_info mnand_ext_csd_info
EXT CSD - eMMC only.
__mnand_operations
mNAND part/vendor specific operation block
Definition: nvmnand_part_ops.h:138
__mnand_unit_desc_info::data
uint8_t data[19]
Definition: nvmnand.h:284
__mnand_refresh_properties
information on refresh properties
Definition: nvmnand.h:148
__mnand_ufs_geo_info::supported_memory_types
uint16_t supported_memory_types
Definition: nvmnand.h:309
mnand_is_valid_block
static int mnand_is_valid_block(mnand_block_info *blk)
Return the validity of the block, given the pointer of block info.
Definition: nvmnand.h:499
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.
MNAND_MLC_BLOCK
#define MNAND_MLC_BLOCK
Definition: nvmnand.h:98
__mnand_refresh_properties::shutdown_rfsh_interval
uint32_t shutdown_rfsh_interval
Definition: nvmnand.h:152
mnand_block_info
struct __mnand_block_info mnand_block_info
information per block
__mnand_cid_info::data
uint8_t data[16]
Definition: nvmnand.h:239
__mnand_chip::xcsd
mnand_ext_csd_info xcsd
Definition: nvmnand.h:447
__mnand_ufs_combo_query_req::num_cmds
uint8_t num_cmds
Definition: nvmnand.h:481
MNAND_EINVAL
@ MNAND_EINVAL
Definition: nvmnand.h:420
__mnand_chip::card_status
uint32_t card_status
Definition: nvmnand.h:452
MNAND_FFU_STATUS_ERROR_DOWNLOADING_FIRMWARE
@ MNAND_FFU_STATUS_ERROR_DOWNLOADING_FIRMWARE
Indicates downloading the firmware onto the device failed.
Definition: nvmnand.h:398
mnand_is_refresh_available
static int mnand_is_refresh_available(mnand_chip *chip)
Return if force refresh is available.
Definition: nvmnand.h:627
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 p...
MNAND_SYSTEM_BLOCK
#define MNAND_SYSTEM_BLOCK
Definition: nvmnand.h:103
__mnand_wr_info::fram
uint32_t fram
Specifies the host cumulative written data (units of 100MB) from RAM.
Definition: nvmnand.h:179
__mnand_ufs_query_req::selector
uint8_t selector
Definition: nvmnand.h:467
MNAND_ENOMEM
@ MNAND_ENOMEM
Definition: nvmnand.h:418
mnand_summary_info
struct __mnand_summary_info mnand_summary_info
aggregation of summaries
__mnand_storage_type
__mnand_storage_type
mNAND storage type enumeration
Definition: nvmnand.h:363
__mnand_chip::ffu_available
int ffu_available
Definition: nvmnand.h:440
__mnand_refresh_element::block
uint16_t block
Definition: nvmnand.h:130
__mnand_ufs_geo_info::sys_code_max_alloc
uint32_t sys_code_max_alloc
Definition: nvmnand.h:310
MNAND_FFU_STATUS_RESERVED_ERROR
@ MNAND_FFU_STATUS_RESERVED_ERROR
Indicates there was a reserved error during the FFU process.
Definition: nvmnand.h:410
mnand_life_time_element
union __mnand_life_time_element mnand_life_time_element
information on life time element
__mnand_csd_info::data
uint8_t data[16]
Definition: nvmnand.h:246
__mnand_chip::smart_summary_available
int smart_summary_available
Definition: nvmnand.h:443
mnand_close
MNAND_STATUS mnand_close(mnand_chip *chip)
"Closing" (aka releasing) the mNAND chip.
mnand_life_time_info
struct __mnand_life_time_info mnand_life_time_info
information on life time
__mnand_summary_info::runtime_bb_cnt
int runtime_bb_cnt
Definition: nvmnand.h:228
__mnand_block_info::valid
uint16_t valid
Definition: nvmnand.h:104
__mnand_wr_info
Holds the information that indicates the host cumulative written data (units of 100MB).
Definition: nvmnand.h:173
MNAND_OK
@ MNAND_OK
Definition: nvmnand.h:417
mnand_enable_power_off_notification
MNAND_STATUS mnand_enable_power_off_notification(mnand_chip *chip)
Enable power-off notification.
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)
mnand_ufs_write_erase_amplification::slc_weaf
double slc_weaf
Specifies the SLC write/erase amplification.
Definition: nvmnand.h:192
__mnand_lu_info::logical_blk_sz
uint8_t logical_blk_sz
Definition: nvmnand.h:338
__mnand_chip::block_info
mnand_block_info * block_info
Definition: nvmnand.h:438
__mnand_block_info
information per block
Definition: nvmnand.h:93
mnand_wr_info
struct __mnand_wr_info mnand_wr_info
Holds the information that indicates the host cumulative written data (units of 100MB).
__mnand_config_desc_info::data1
uint8_t data1[144]
Definition: nvmnand.h:267
__mnand_chip::summary_available
int summary_available
Definition: nvmnand.h:442
__mnand_summary_element::ages
mnand_ages_info ages
Definition: nvmnand.h:208
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.
MNAND_FFU_STATUS_SUCCESS
@ MNAND_FFU_STATUS_SUCCESS
Indicates FFU operation was successful.
Definition: nvmnand.h:394
__mnand_refresh_properties::rfsh_days
uint32_t rfsh_days
Definition: nvmnand.h:149
__mnand_refresh_properties::rfsh_calibrate_cnt
uint32_t rfsh_calibrate_cnt
Definition: nvmnand.h:153
mnand_update_summary_info
MNAND_STATUS mnand_update_summary_info(mnand_chip *chip)
Updating the summary info inside mNAND chip handle.
MNAND_FFU_STATUS_FW_VERSION_MISMATCH
@ MNAND_FFU_STATUS_FW_VERSION_MISMATCH
Indicates the frimware version does not match
Definition: nvmnand.h:402
MNAND_PASSED_FW_VERSION_SAME
@ MNAND_PASSED_FW_VERSION_SAME
Definition: nvmnand.h:382
__mnand_ufs_geo_info::non_persist_cap_adj_fac
uint16_t non_persist_cap_adj_fac
Definition: nvmnand.h:313
MNAND_PASSED_FW_VERSION_GREATER
@ MNAND_PASSED_FW_VERSION_GREATER
Definition: nvmnand.h:384
__mnand_ufs_geo_info::sys_code_cap_adj_fac
uint16_t sys_code_cap_adj_fac
Definition: nvmnand.h:311
__mnand_life_time_info::life_time_type
uint8_t life_time_type
Definition: nvmnand.h:120
MNAND_EIO
@ MNAND_EIO
Definition: nvmnand.h:419
__mnand_summary_element::valid
uint8_t valid
Definition: nvmnand.h:217
mnand_mmc_geo_info
struct __mnand_mmc_geo_info mnand_mmc_geo_info
MMC GEOMETRY INFO - eMMC only.
mnand_is_mlc_block
static int mnand_is_mlc_block(mnand_block_info *blk)
Determine if given block is in MLC region.
Definition: nvmnand.h:581
mnand_set_bkops_start
MNAND_STATUS mnand_set_bkops_start(mnand_chip *chip)
Mark the start of BKOPS.
__mnand_mmc_geo_info::user_capacity
uint64_t user_capacity
Definition: nvmnand.h:298
__mnand_fw_comparison_result
__mnand_fw_comparison_result
mNAND firmware comparison enumeration
Definition: nvmnand.h:380
__mnand_ufs_combo_query_req::need_cq_empty
uint8_t need_cq_empty
Definition: nvmnand.h:482
mnand_ufs_geo_info
struct __mnand_ufs_geo_info mnand_ufs_geo_info
UFS GEOMETRY INFO - UFS only.
__mnand_summary_info::slc
mnand_summary_element slc
Definition: nvmnand.h:225
mnand_get_geo_info
MNAND_STATUS mnand_get_geo_info(mnand_chip *chip, mnand_geo_info *geo_info)
Extract mnand geometry info.
__mnand_ufs_geo_info::total_raw_capacity
uint64_t total_raw_capacity
Definition: nvmnand.h:305
MAX_ERASE_CNT
#define MAX_ERASE_CNT
max.
Definition: nvmnand.h:66
__mnand_lu_info::num_alloc_units
uint32_t num_alloc_units
Definition: nvmnand.h:339
mnand_refresh_properties
struct __mnand_refresh_properties mnand_refresh_properties
information on refresh properties
__mnand_ufs_geo_info::enhanced4_max_alloc
uint32_t enhanced4_max_alloc
Definition: nvmnand.h:320
__mnand_chip::unit_desc
mnand_unit_desc_info unit_desc
Definition: nvmnand.h:451
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.
__mnand_summary_info::total
mnand_summary_element total
Definition: nvmnand.h:226
__mnand_ufs_query_req::delay
uint32_t delay
Definition: nvmnand.h:473
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,...
__mnand_geo_desc_info
GEOMETRY DESC - UFS Only.
Definition: nvmnand.h:276
__mnand_chip::cid
mnand_cid_info cid
Definition: nvmnand.h:445
__mnand_ufs_query_req::status
MNAND_STATUS status
Definition: nvmnand.h:474
MNAND_SAMSUNG51
@ MNAND_SAMSUNG51
Definition: nvmnand.h:352
mnand_summary_element
struct __mnand_summary_element mnand_summary_element
summary of given block type (or region)
__mnand_life_time_info
information on life time
Definition: nvmnand.h:118
mnand_get_bkops_en
MNAND_STATUS mnand_get_bkops_en(mnand_chip *chip, uint8_t *enabled)
Return the status of BKOPS_EN bit.
mnand_is_usable_block
static int mnand_is_usable_block(mnand_block_info *blk)
Determine if given block is a usable block.
Definition: nvmnand.h:532
__mnand_chip::fw_version
char fw_version[MAX_FW_STR_LEN]
Definition: nvmnand.h:434
MNAND_HYNIX_F20
@ MNAND_HYNIX_F20
Definition: nvmnand.h:348
mnand_refresh_element
union __mnand_refresh_element mnand_refresh_element
information on refresh element
__mnand_chip::desc
char desc[128]
Definition: nvmnand.h:432
mnand_update_block_info
MNAND_STATUS mnand_update_block_info(mnand_chip *chip)
Updating the list of block info inside mNAND chip handle.
MNAND_UFS_SAMSUNG
@ MNAND_UFS_SAMSUNG
Definition: nvmnand.h:355
__mnand_ufs_geo_info::enhanced1_cap_adj_fac
uint16_t enhanced1_cap_adj_fac
Definition: nvmnand.h:315
mnand_get_cache_en
MNAND_STATUS mnand_get_cache_en(mnand_chip *chip, uint8_t *enabled)
Determine if eMMC cache is enabled.
__mnand_ufs_geo_info::enhanced1_max_alloc
uint32_t enhanced1_max_alloc
Definition: nvmnand.h:314
MNAND_EOL_STATUS
enum __mnand_eol_status MNAND_EOL_STATUS
mNAND EOL status enumeration
mnand_unbind
MNAND_STATUS mnand_unbind(mnand_chip *chip)
"Unbinding" (aka releasing) the mNAND chip.
mnand_geo_info
union __mnand_geo_info mnand_geo_info
GEOMETRY INFO.
__mnand_ages_element::total_age
uint32_t total_age
Definition: nvmnand.h:164
__mnand_config_desc_info::data2
uint8_t data2[144]
Definition: nvmnand.h:268
__mnand_ufs_geo_info::enhanced2_max_alloc
uint32_t enhanced2_max_alloc
Definition: nvmnand.h:316
mnand_ufs_write_erase_amplification
Gives the erase/write amplification value for the device.
Definition: nvmnand.h:189
mnand_update_cid
MNAND_STATUS mnand_update_cid(mnand_chip *chip)
Updating the CID field inside mNAND chip handle.
__mnand_summary_element::wcount
mnand_wr_info wcount
Specifies the host cumulative written data,(units of 100MB).
Definition: nvmnand.h:213
__mnand_mmc_geo_info::enh_start_addr
uint64_t enh_start_addr
Definition: nvmnand.h:293
mnand_get_bkops_status
MNAND_STATUS mnand_get_bkops_status(mnand_chip *chip, uint8_t *stat)
Return the status of BKOPS.
mnand_is_usable_block_with_type
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.
Definition: nvmnand.h:549
__mnand_ages_element::avg_age
double avg_age
Definition: nvmnand.h:163
__mnand_ext_csd_info::data
uint8_t data[512]
Definition: nvmnand.h:253
mnand_update_smart_summary_info
MNAND_STATUS mnand_update_smart_summary_info(mnand_chip *chip)
Updating the smart summary info inside mNAND chip handle.
__mnand_chip::rfsh_properties
mnand_refresh_properties rfsh_properties
Definition: nvmnand.h:441
__mnand_config_desc_info::data3
uint8_t data3[144]
Definition: nvmnand.h:269
__mnand_refresh_element::percentage
double percentage
Definition: nvmnand.h:131
mnand_refresh_progress
struct __mnand_refresh_progress mnand_refresh_progress
information on refresh progress
MNAND_RUNTIME_BAD_BLOCK
#define MNAND_RUNTIME_BAD_BLOCK
Definition: nvmnand.h:102
__mnand_refresh_properties::min_rfsh_interval
uint32_t min_rfsh_interval
Definition: nvmnand.h:151
__mnand_geo_desc_info::data
uint8_t data[72]
Definition: nvmnand.h:277
__mnand_config_desc_info
CONFIG DESC - UFS Only.
Definition: nvmnand.h:266
mnand_check_eol_status
MNAND_STATUS mnand_check_eol_status(mnand_chip *chip, MNAND_EOL_STATUS *eol_status)
Checking EOL status.
MNAND_SAMSUNG50
@ MNAND_SAMSUNG50
Definition: nvmnand.h:351
__mnand_ufs_combo_query_req::query
struct __mnand_ufs_query_req * query
Definition: nvmnand.h:483
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)
mnand_flush_cache
MNAND_STATUS mnand_flush_cache(mnand_chip *chip)
Flush cache on mnand.
MNAND_FFU_STATUS_INTERNAL_ERROR
@ MNAND_FFU_STATUS_INTERNAL_ERROR
Indicates there was device internal error during FFU operation.
Definition: nvmnand.h:404
MNAND_SLC_BLOCK
#define MNAND_SLC_BLOCK
Definition: nvmnand.h:99
__mnand_ufs_geo_info::enhanced3_max_alloc
uint32_t enhanced3_max_alloc
Definition: nvmnand.h:318
mnand_geo_desc_info
struct __mnand_geo_desc_info mnand_geo_desc_info
GEOMETRY DESC - UFS Only.
__mnand_chip::geo_desc
mnand_geo_desc_info geo_desc
Definition: nvmnand.h:450
__mnand_summary_info::factory_bb_cnt
int factory_bb_cnt
Definition: nvmnand.h:227
mnand_is_block_info_available
static int mnand_is_block_info_available(mnand_chip *chip)
Return if the block info is available.
Definition: nvmnand.h:642
MNAND_UNKNOWN_ERR
@ MNAND_UNKNOWN_ERR
Definition: nvmnand.h:423
MNAND_FW_COMPARE
enum __mnand_fw_comparison_result MNAND_FW_COMPARE
mNAND firmware comparison enumeration
MNAND_EMMC
@ MNAND_EMMC
Definition: nvmnand.h:364
__mnand_ages_element::valid
uint8_t valid
Definition: nvmnand.h:165
__mnand_config_desc_info::data4
uint8_t data4[144]
Definition: nvmnand.h:270
mnand_is_summary_available
static int mnand_is_summary_available(mnand_chip *chip)
Return if the summary is available.
Definition: nvmnand.h:597
MAX_FW_STR_LEN
#define MAX_FW_STR_LEN
Maximum length of the firmware string.
Definition: nvmnand.h:82
__mnand_mmc_geo_info::sec_count
uint64_t sec_count
Definition: nvmnand.h:291
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.
__mnand_wr_info::fnand
uint32_t fnand
Specifies the host cumulative written data (units of 100MB) from NAND.
Definition: nvmnand.h:176
__mnand_ufs_geo_info::alloc_unit_size
uint8_t alloc_unit_size
Definition: nvmnand.h:308
__mnand_mmc_geo_info::hc_wp_grp_size
uint64_t hc_wp_grp_size
Definition: nvmnand.h:294
MNAND_FFU_STATUS_GENERIC_ERROR
@ MNAND_FFU_STATUS_GENERIC_ERROR
Indicates there was a generic error during the FFU process.
Definition: nvmnand.h:408
__mnand_ufs_geo_info::segment_size
uint32_t segment_size
Definition: nvmnand.h:307
mnand_bind
MNAND_STATUS mnand_bind(int fd, mnand_chip *chip)
"Binding" the mNAND chip.
__mnand_ages_element
summary of ages
Definition: nvmnand.h:160
__mnand_block_info::block_number
uint16_t block_number
Definition: nvmnand.h:94
__mnand_chip::priv
void * priv
Definition: nvmnand.h:455
MNAND_MICRON
@ MNAND_MICRON
Definition: nvmnand.h:350
__mnand_wr_info::valid
uint8_t valid
Specifies whether the values indicated are vaild or not.
Definition: nvmnand.h:183
MNAND_BKOPS_EN_ERR
@ MNAND_BKOPS_EN_ERR
Definition: nvmnand.h:424
__mnand_ufs_query_req
UFS Query Request Info (UFS Only)
Definition: nvmnand.h:463
mnand_get_refresh_progress
MNAND_STATUS mnand_get_refresh_progress(mnand_chip *chip, double *rfsh_progress)
Extract refresh progress from the mNAND chip.
__mnand_block_info::block_type
uint16_t block_type
Definition: nvmnand.h:96
__mnand_ufs_query_req::opcode
uint8_t opcode
Definition: nvmnand.h:464
mnand_get_storage_type
static MNAND_STORAGE_TYPE mnand_get_storage_type(mnand_chip *chip)
Return mnand storage type.
Definition: nvmnand.h:656
__mnand_refresh_progress::progress_type
uint8_t progress_type
Definition: nvmnand.h:139
mnand_get_current_lun
MNAND_STATUS mnand_get_current_lun(mnand_chip *chip, uint32_t *lun)
get mnand current lun (UFS only)
__mnand_ufs_query_req::buf_size
uint8_t buf_size
Definition: nvmnand.h:468
__mnand_summary_info::mlc
mnand_summary_element mlc
Definition: nvmnand.h:224
__mnand_chip::refresh_available
int refresh_available
Definition: nvmnand.h:439
mnand_trim_all
MNAND_STATUS mnand_trim_all(mnand_chip *chip)
Trimming the whole device.
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.
__mnand_chip::fd
int fd
Definition: nvmnand.h:431
__mnand_chip::device_desc
mnand_device_desc_info device_desc
Definition: nvmnand.h:448
__mnand_chip
mNAND chip information
Definition: nvmnand.h:430
__mnand_lu_info
LOGICAL UNIT INFO - UFS Only.
Definition: nvmnand.h:335
__mnand_life_time_element::spare_blocks
uint16_t spare_blocks
Definition: nvmnand.h:111
__mnand_block_info::block_age
uint16_t block_age
Definition: nvmnand.h:95
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.
MNAND_STORAGE_TYPE
enum __mnand_storage_type MNAND_STORAGE_TYPE
mNAND storage type enumeration
__mnand_life_time_element
information on life time element
Definition: nvmnand.h:110
mnand_ufs_write_erase_amplification::mlc_weaf
double mlc_weaf
Specifies the MLC write/erase amplification.
Definition: nvmnand.h:195
MNAND_UNKNOWN_BAD_BLOCK
#define MNAND_UNKNOWN_BAD_BLOCK
Definition: nvmnand.h:100
__mnand_status
__mnand_status
mNAND operation status used in the API
Definition: nvmnand.h:416
MNAND_DEVICE_TYPE
enum __mnand_device_type MNAND_DEVICE_TYPE
mNAND device enumeration
__mnand_chip::num_blocks
int num_blocks
Definition: nvmnand.h:437
__mnand_summary_element
summary of given block type (or region)
Definition: nvmnand.h:206
MNAND_EOL_OK
@ MNAND_EOL_OK
Definition: nvmnand.h:373
MNAND_STATUS
enum __mnand_status MNAND_STATUS
mNAND operation status used in the API
__mnand_ufs_geo_info::max_lu
uint8_t max_lu
Definition: nvmnand.h:306
MNAND_PASSED_FW_VERSION_LESSER
@ MNAND_PASSED_FW_VERSION_LESSER
Definition: nvmnand.h:386
__mnand_device_type
__mnand_device_type
mNAND device enumeration
Definition: nvmnand.h:345
__mnand_refresh_element
information on refresh element
Definition: nvmnand.h:129
mnand_config_desc_info
struct __mnand_config_desc_info mnand_config_desc_info
CONFIG DESC - UFS Only.
mnand_unit_desc_info
struct __mnand_unit_desc_info mnand_unit_desc_info
UNIT DESC - UFS Only.
__mnand_refresh_properties::rfsh_unit_time_us
uint32_t rfsh_unit_time_us
Definition: nvmnand.h:154
mnand_csd_info
struct __mnand_csd_info mnand_csd_info
CSD - eMMC only.
__mnand_lu_info::lu_enabled
uint8_t lu_enabled
Definition: nvmnand.h:336
__mnand_geo_info::ufs_geo_info
mnand_ufs_geo_info ufs_geo_info
Definition: nvmnand.h:329
__mnand_ufs_query_req::idn
uint8_t idn
Definition: nvmnand.h:465
mnand_lu_info
struct __mnand_lu_info mnand_lu_info
LOGICAL UNIT INFO - UFS Only.
__mnand_mmc_geo_info
MMC GEOMETRY INFO - eMMC only.
Definition: nvmnand.h:290
mnand_set_cache_en
MNAND_STATUS mnand_set_cache_en(mnand_chip *chip, uint8_t enable)
Enable/Disable cache on mnand.
mnand_ufs_write_erase_amplification
struct mnand_ufs_write_erase_amplification mnand_ufs_write_erase_amplification
Gives the erase/write amplification value for the device.
__mnand_ufs_geo_info::enhanced2_cap_adj_fac
uint16_t enhanced2_cap_adj_fac
Definition: nvmnand.h:317
MAX_PRN_STR_LEN
#define MAX_PRN_STR_LEN
Maximum length of the product name string.
Definition: nvmnand.h:84
__mnand_ages_element::min_age
uint16_t min_age
Definition: nvmnand.h:161
MNAND_UFS
@ MNAND_UFS
Definition: nvmnand.h:365
__mnand_chip::prn
char prn[MAX_PRN_STR_LEN]
Definition: nvmnand.h:433
__mnand_ufs_query_req::index
uint8_t index
Definition: nvmnand.h:466
__mnand_geo_info
GEOMETRY INFO.
Definition: nvmnand.h:327
__mnand_ext_csd_info
EXT CSD - eMMC only.
Definition: nvmnand.h:252
MNAND_UNKNOWN
@ MNAND_UNKNOWN
Definition: nvmnand.h:366
__mnand_chip::priv_ops
void * priv_ops
Definition: nvmnand.h:435
__mnand_ufs_combo_query_req
UFS Combo Query Request Info (UFS Only)
Definition: nvmnand.h:480
__mnand_ffu_status
__mnand_ffu_status
mNAND UFS FFU status
Definition: nvmnand.h:392
__mnand_ufs_geo_info::non_persist_max_alloc
uint32_t non_persist_max_alloc
Definition: nvmnand.h:312
mnand_send_power_off_notification
MNAND_STATUS mnand_send_power_off_notification(mnand_chip *chip)
Send power-off notification.
MNAND_TOSHIBA
@ MNAND_TOSHIBA
Definition: nvmnand.h:353
mnand_open
MNAND_STATUS mnand_open(const char *devname, mnand_chip *chip)
"Opening" the mNAND chip.
MNAND_FFU_STATUS_INSTALL_FAILED
@ MNAND_FFU_STATUS_INSTALL_FAILED
Indicates installing the firmware failed.
Definition: nvmnand.h:396
__mnand_cid_info
CID - eMMC only.
Definition: nvmnand.h:238
mnand_is_smart_summary_available
static int mnand_is_smart_summary_available(mnand_chip *chip)
Return if the smart summary is available.
Definition: nvmnand.h:612
__mnand_ufs_query_req::buffer
uint8_t * buffer
Definition: nvmnand.h:469
mnand_ages_info
struct __mnand_ages_element mnand_ages_info
summary of ages
MNAND_FFU_STATUS_FW_CORRUPTION_ERROR
@ MNAND_FFU_STATUS_FW_CORRUPTION_ERROR
Indicates the firmware that was passed for the FFU operation was corrupted.
Definition: nvmnand.h:400
MNAND_CATCH_ALL
@ MNAND_CATCH_ALL
Definition: nvmnand.h:346
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 runnin...
__mnand_ufs_geo_info::enhanced3_cap_adj_fac
uint16_t enhanced3_cap_adj_fac
Definition: nvmnand.h:319
__mnand_eol_status
__mnand_eol_status
mNAND EOL status enumeration
Definition: nvmnand.h:372