blob: 3a83ac9cd92c8a0f6a5efb5ebfc88b01e2fc8b53 [file] [log] [blame]
Anastasiia Lukianenko722bc5b2020-08-06 12:42:55 +03001// 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>
Anastasiia Lukianenko722bc5b2020-08-06 12:42:55 +03009#include <command.h>
10
11/* Current I/O Device */
12static int pvblock_curr_device;
13
14int do_pvblock(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
15{
Simon Glasse33a5c62022-08-11 19:34:59 -060016 return blk_common_cmd(argc, argv, UCLASS_PVBLOCK,
Anastasiia Lukianenko722bc5b2020-08-06 12:42:55 +030017 &pvblock_curr_device);
18}
19
20U_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'");