summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorZhikang Zhang <zhikang.zhang@nxp.com>2017-08-03 09:30:59 (GMT)
committerTom Rini <trini@konsulko.com>2017-08-13 19:17:32 (GMT)
commit0adc38be3d0e55fea72b8bbae831376d1649266e (patch)
tree911745a06c54291d0fa39393b6ab3880f0ef5242 /doc
parentf6aa61d599678b74b3c4a6bd5604a0f9ac2af9b2 (diff)
downloadu-boot-fsl-qoriq-0adc38be3d0e55fea72b8bbae831376d1649266e.tar.xz
nvme: Add nvme commands
Add nvme commands in U-Boot command line. 1. "nvme scan" - scan NVMe blk devices 2. "nvme list" - show all available NVMe blk devices 3. "nvme info" - show current or a specific NVMe blk device 4. "nvme device" - show or set current device 5. "nvme part" - print partition table 6. "nvme read" - read data from NVMe blk device 7. "nvme write" - write data to NVMe blk device Signed-off-by: Zhikang Zhang <zhikang.zhang@nxp.com> Signed-off-by: Wenbin Song <wenbin.song@nxp.com> Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/README.nvme36
1 files changed, 36 insertions, 0 deletions
diff --git a/doc/README.nvme b/doc/README.nvme
index d2b917d..28ecf54 100644
--- a/doc/README.nvme
+++ b/doc/README.nvme
@@ -40,3 +40,39 @@ It only support basic block read/write functions in the NVMe driver.
Config options
--------------
CONFIG_NVME Enable NVMe device support
+CONFIG_CMD_NVME Enable basic NVMe commands
+
+Usage in U-Boot
+---------------
+To use an NVMe hard disk from U-Boot shell, a 'nvme scan' command needs to
+be executed for all NVMe hard disks attached to the NVMe controller to be
+identified.
+
+To list all of the NVMe hard disks, try:
+
+ => nvme list
+ Device 0: Vendor: 0x8086 Rev: 8DV10131 Prod: CVFT535600LS400BGN
+ Type: Hard Disk
+ Capacity: 381554.0 MB = 372.6 GB (781422768 x 512)
+
+and print out detailed information for controller and namespaces via:
+
+ => nvme info
+
+Raw block read/write to can be done via the 'nvme read/write' commands:
+
+ => nvme read a0000000 0 11000
+
+ => tftp 80000000 /tftpboot/kernel.itb
+ => nvme write 80000000 0 11000
+
+Of course, file system command can be used on the NVMe hard disk as well:
+
+ => fatls nvme 0:1
+ 32376967 kernel.itb
+ 22929408 100m
+
+ 2 file(s), 0 dir(s)
+
+ => fatload nvme 0:1 a0000000 /kernel.itb
+ => bootm a0000000