DRIVE 5.0 Linux Open Source Software

Development Guide Release

mNAND Health and Status Utility
mNAND_hs Commands
Device Paths
Example Log
The mNAND Health and Status utility (mnand_hs) prints the health and status of onboard mNAND.
Additionally, the tool provides details for the Hynix, Samsung and Toshiba eMMC parts.
Some options are vendor specific. Consequently, some options are valid for Hynix while other eMMC devices report errors. For example, mnand_hs -ah displays age per block for Hynix. However, for a Samsung device or Toshiba device that same option reports a “block data not available” error.
The SDK comes with the source code for the utility and a Makefile.
To build mNAND_hs
1. In a terminal window, navigate to the directory containing the script:
cd <top>/drive-t186ref-linux/samples/tools/mnand_hs
2. Enter the following commands:
make clean
To run mNAND_hs
1. Follow the instructions in the Building and Running Samples topic to set up the target to run the mnand_hs utility.
2. On the target, run mnand_hs by entering:
cd /root/samples/tools/mnand_hs
./mnand_hs -d <path> [options]
Where <path> is the enumeration of the mmc device you want to check.
For information about the supported options, see Options in this topic.
mNAND_hs Commands
This section describes the supported mNAND_hs commands.
./mnand_hs -d <path_to_mnand_device> [options]
mNAND_hs supports the following options:
-d <path>
(Required) Specifies the eMMC device path. For information on supported paths, see Device Paths in this section.
Shows usage.
Includes in the displayed results the bad block table.
Includes the age per block, hex mode.
Includes the age per block. The data is decimal mode and comma-separated.
Includes age totals that are calculated by the app.
Includes age summary that are calculated by the part.
Includes a spare block summary.
Includes the card status.
Includes the ext_csd register data (raw).
Includes the csd register data (raw).
Includes the cid register data (raw).
Includes data area information.
Includes EOL status.
Includes reported or estimated refresh progress if it is available.
Includes the BKOPS_EN status.
Includes the BKOPS_STATUS data.
Enables POWER_OFF notification.
Sends POWER_OFF notification.
Enables mNAND cache.
Flushes mNAND cache.
Trims the device.
-r <count>
Refreshes the <count> blocks.
Since per block information is not provided by the Toshiba emmc device, the -b, -ah, -ac, and -at options that depend on per block information give a “Block data not available.” output message.
Device Paths
This topic describes supported device paths for mnand_hs commands.
./mnand_hs -d /dev/disk/by-path/platform-sdhci-tegra.<ver> -at
Where <ver> is:
1 for eMMC on the baseboard.
3 for eMMC on the VCM.
Alternate usage:
./mnand_hs -d /dev/mmcblk<id> -at
Where <id> is (by default):
1 for eMMC on the baseboard.
0 for eMMC on the VCM.
Example Log
Following is the log of a sample run.
# ./mnand_hs -d /dev/disk/by-path/platform-sdhci-tegra.<ver> -at
mNAND Health and Status Info
mNAND identified: "Hynix F20 (MID=0x90, PRV=0x03)"
MLC Age Totals:
Total number of blocks (9~4180): 4172
Total p/e cycles: 56222
Number of usable blocks: 4170
Number of usable blocks: 4169 (only blocks with age > 0)
Avg p/e cycles: 13.482494
SLC Age Totals:
Total number of blocks (8~8): 1
Total p/e cycles: 13
Number of usable blocks: 1
Number of usable blocks: 1 (only blocks with age > 0)
Avg p/e cycles: 13.000000