This adds a new block interface type for VirtIO block devices.
Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
dev_desc->revision,
dev_desc->product);
break;
+ case IF_TYPE_VIRTIO:
+ printf("%s VirtIO Block Device\n", dev_desc->vendor);
+ break;
case IF_TYPE_DOC:
puts("device type DOC\n");
return;
case IF_TYPE_NVME:
puts ("NVMe");
break;
+ case IF_TYPE_VIRTIO:
+ puts("VirtIO");
+ break;
default:
puts ("UNKNOWN");
break;
[IF_TYPE_HOST] = "host",
[IF_TYPE_NVME] = "nvme",
[IF_TYPE_EFI] = "efi",
+ [IF_TYPE_VIRTIO] = "virtio",
};
static enum uclass_id if_type_uclass_id[IF_TYPE_COUNT] = {
[IF_TYPE_HOST] = UCLASS_ROOT,
[IF_TYPE_NVME] = UCLASS_NVME,
[IF_TYPE_EFI] = UCLASS_EFI,
+ [IF_TYPE_VIRTIO] = UCLASS_VIRTIO,
};
static enum if_type if_typename_to_iftype(const char *if_typename)
IF_TYPE_HOST,
IF_TYPE_NVME,
IF_TYPE_EFI,
+ IF_TYPE_VIRTIO,
IF_TYPE_COUNT, /* Number of interface types */
};