mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-11-28 14:11:29 +01:00
xen: pvblock: Print found devices indices
Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> Signed-off-by: Anastasiia Lukianenko <anastasiia_lukianenko@epam.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
3a739cc6c9
commit
53d725c74e
@ -793,6 +793,24 @@ fail:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void print_pvblock_devices(void)
|
||||||
|
{
|
||||||
|
struct udevice *udev;
|
||||||
|
bool first = true;
|
||||||
|
const char *class_name;
|
||||||
|
|
||||||
|
class_name = uclass_get_name(UCLASS_PVBLOCK);
|
||||||
|
for (blk_first_device(IF_TYPE_PVBLOCK, &udev); udev;
|
||||||
|
blk_next_device(&udev), first = false) {
|
||||||
|
struct blk_desc *desc = dev_get_uclass_platdata(udev);
|
||||||
|
|
||||||
|
if (!first)
|
||||||
|
puts(", ");
|
||||||
|
printf("%s: %d", class_name, desc->devnum);
|
||||||
|
}
|
||||||
|
printf("\n");
|
||||||
|
}
|
||||||
|
|
||||||
void pvblock_init(void)
|
void pvblock_init(void)
|
||||||
{
|
{
|
||||||
struct driver_info info;
|
struct driver_info info;
|
||||||
@ -815,6 +833,8 @@ void pvblock_init(void)
|
|||||||
if (ret)
|
if (ret)
|
||||||
return;
|
return;
|
||||||
uclass_foreach_dev_probe(UCLASS_PVBLOCK, udev);
|
uclass_foreach_dev_probe(UCLASS_PVBLOCK, udev);
|
||||||
|
|
||||||
|
print_pvblock_devices();
|
||||||
}
|
}
|
||||||
|
|
||||||
static int pvblock_probe(struct udevice *udev)
|
static int pvblock_probe(struct udevice *udev)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user