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