]>
Commit | Line | Data |
---|---|---|
722bc5b5 AL |
1 | // SPDX-License-Identifier: GPL-2.0+ |
2 | /* | |
3 | * (C) Copyright 2020 EPAM Systems Inc. | |
4 | * | |
5 | * XEN para-virtualized block device support | |
6 | */ | |
7 | ||
8 | #include <blk.h> | |
722bc5b5 AL |
9 | #include <command.h> |
10 | ||
11 | /* Current I/O Device */ | |
12 | static int pvblock_curr_device; | |
13 | ||
14 | int do_pvblock(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) | |
15 | { | |
e33a5c6b | 16 | return blk_common_cmd(argc, argv, UCLASS_PVBLOCK, |
722bc5b5 AL |
17 | &pvblock_curr_device); |
18 | } | |
19 | ||
20 | U_BOOT_CMD(pvblock, 5, 1, do_pvblock, | |
21 | "Xen para-virtualized block device", | |
22 | "info - show available block devices\n" | |
23 | "pvblock device [dev] - show or set current device\n" | |
24 | "pvblock part [dev] - print partition table of one or all devices\n" | |
25 | "pvblock read addr blk# cnt\n" | |
26 | "pvblock write addr blk# cnt - read/write `cnt'" | |
27 | " blocks starting at block `blk#'\n" | |
28 | " to/from memory address `addr'"); |