]>
git.ipfire.org Git - people/ms/u-boot.git/blob - cmd/nvme.c
2 * Copyright (C) 2017 NXP Semiconductors
3 * Copyright (C) 2017 Bin Meng <bmeng.cn@gmail.com>
5 * SPDX-License-Identifier: GPL-2.0+
13 static int nvme_curr_dev
;
15 static int do_nvme(cmd_tbl_t
*cmdtp
, int flag
, int argc
, char * const argv
[])
20 if (strncmp(argv
[1], "scan", 4) == 0) {
21 ret
= nvme_scan_namespace();
23 return CMD_RET_FAILURE
;
27 if (strncmp(argv
[1], "deta", 4) == 0) {
30 ret
= blk_get_device(IF_TYPE_NVME
, nvme_curr_dev
,
33 return CMD_RET_FAILURE
;
35 nvme_print_info(udev
);
41 return blk_common_cmd(argc
, argv
, IF_TYPE_NVME
, &nvme_curr_dev
);
46 "NVM Express sub-system",
47 "scan - scan NVMe devices\n"
48 "nvme detail - show details of current NVMe device\n"
49 "nvme info - show all available NVMe devices\n"
50 "nvme device [dev] - show or set current NVMe device\n"
51 "nvme part [dev] - print partition table of one or all NVMe devices\n"
52 "nvme read addr blk# cnt - read `cnt' blocks starting at block\n"
53 " `blk#' to memory address `addr'\n"
54 "nvme write addr blk# cnt - write `cnt' blocks starting at block\n"
55 " `blk#' from memory address `addr'"