Adding a New Part to nvmnand Library#

Update the nvmnand_ops.c file in the samples/tools/nvmnand directory by adding a new mnand_operation extern structure variable for the new part.

For example:

extern mnand_operations mnand_sample_ops;

Add the newly created mnand operations (mnand_sample_ops) to mnand_ops_list.

Add a new file (for example, nvmnand_sample.c) that contains the function definitions for the part specific operations listed in the mnand_operations structure.

The structure definition and function prototypes are in include/nvmnand_part_ops.h.

Each function typically needs the following:

  • open()

    • Identifies the part and updates the chip description with the part info in string form.

    • Fills in any part specific information.

    • Fills in default refresh properties, if desired.

  • close()

    • Releases any resources allocated in open.

  • send_rfsh()

    • Implements refresh functionality for the part.

  • get_rfsh_progress()

    • Obtains refresh progress and eMMC/UFS, and updates the refresh_progress variable.

  • update_blk_info()

    • Updates block specific info, if desired.

  • update_summary

    • Updates desired summary data in chip summary.

  • check_eol

    • Checks eMMC/UFS and returns whether EOL is detected.

Update Makefile to include the new c file added into the library:

Replace:

OBJS   =   nvmnand_ops.o

With:

OBJS   =   nvmnand_ops.o  nvmnand_sample.o

Generate libnvmnand_public.so.