blob: 1b604c37373c5de86b20b8f796aa289d429547f8 [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>
9#include <common.h>
10#include <command.h>
11
12/* Current I/O Device */
13static int pvblock_curr_device;
14
15int do_pvblock(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
16{
Simon Glasse33a5c62022-08-11 19:34:59 -060017 return blk_common_cmd(argc, argv, UCLASS_PVBLOCK,
Anastasiia Lukianenko722bc5b2020-08-06 12:42:55 +030018 &pvblock_curr_device);
19}
20
21U_BOOT_CMD(pvblock, 5, 1, do_pvblock,
22 "Xen para-virtualized block device",
23 "info - show available block devices\n"
24 "pvblock device [dev] - show or set current device\n"
25 "pvblock part [dev] - print partition table of one or all devices\n"
26 "pvblock read addr blk# cnt\n"
27 "pvblock write addr blk# cnt - read/write `cnt'"
28 " blocks starting at block `blk#'\n"
29 " to/from memory address `addr'");