X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=include%2Fblk.h;h=d0c033aece0fb7986a614cef5a9176dc6bca2f44;hb=e4b91f085d4259f187052ff724c80af38fc11b18;hp=86f6d5057f23e7155a6ead3248d426baef94d171;hpb=4ac5df4b41ba46d7e635bdd8d500721c642b0a0d;p=platform%2Fkernel%2Fu-boot.git diff --git a/include/blk.h b/include/blk.h index 86f6d50..d0c033a 100644 --- a/include/blk.h +++ b/include/blk.h @@ -33,6 +33,7 @@ enum if_type { IF_TYPE_HOST, IF_TYPE_NVME, IF_TYPE_EFI, + IF_TYPE_VIRTIO, IF_TYPE_COUNT, /* Number of interface types */ }; @@ -357,16 +358,6 @@ int blk_create_devicef(struct udevice *parent, const char *drv_name, lbaint_t lba, struct udevice **devp); /** - * blk_prepare_device() - Prepare a block device for use - * - * This reads partition information from the device if supported. - * - * @dev: Device to prepare - * @return 0 if ok, -ve on error - */ -int blk_prepare_device(struct udevice *dev); - -/** * blk_unbind_all() - Unbind all device of the given interface type * * The devices are removed and then unbound. @@ -389,6 +380,17 @@ int blk_unbind_all(int if_type); int blk_find_max_devnum(enum if_type if_type); /** + * blk_next_free_devnum() - get the next device number for an interface type + * + * Finds the next number that is safe to use for a newly allocated device for + * an interface type @if_type. + * + * @if_type: Interface type to scan + * @return next device number safe to use, or -ve on error + */ +int blk_next_free_devnum(enum if_type if_type); + +/** * blk_select_hwpart() - select a hardware partition * * Select a hardware partition if the device supports it (typically MMC does) @@ -406,6 +408,15 @@ int blk_select_hwpart(struct udevice *dev, int hwpart); */ int blk_get_from_parent(struct udevice *parent, struct udevice **devp); +/** + * blk_get_by_device() - Get the block device descriptor for the given device + * @dev: Instance of a storage device + * + * Return: With block device descriptor on success , NULL if there is no such + * block device. + */ +struct blk_desc *blk_get_by_device(struct udevice *dev); + #else #include /*