diff options
Diffstat (limited to 'include/blkmap.h')
| -rw-r--r-- | include/blkmap.h | 29 | 
1 files changed, 29 insertions, 0 deletions
| diff --git a/include/blkmap.h b/include/blkmap.h index af54583c7dd..30dc84a7da8 100644 --- a/include/blkmap.h +++ b/include/blkmap.h @@ -7,6 +7,23 @@  #ifndef _BLKMAP_H  #define _BLKMAP_H +#include <dm/lists.h> + +/** + * struct blkmap - Block map + * + * Data associated with a blkmap. + * + * @label: Human readable name of this blkmap + * @blk: Underlying block device + * @slices: List of slices associated with this blkmap + */ +struct blkmap { +	char *label; +	struct udevice *blk; +	struct list_head slices; +}; +  /**   * blkmap_map_linear() - Map region of other block device   * @@ -74,4 +91,16 @@ int blkmap_create(const char *label, struct udevice **devp);   */  int blkmap_destroy(struct udevice *dev); +/** + * blkmap_create_ramdisk() - Create new ramdisk with blkmap + * + * @label: Label of the new blkmap + * @image_addr: Target memory start address of this mapping + * @image_size: Target memory size of this mapping + * @devp: Updated with the address of the created blkmap device + * Returns: 0 on success, negative error code on failure + */ +int blkmap_create_ramdisk(const char *label, ulong image_addr, ulong image_size, +			  struct udevice **devp); +  #endif	/* _BLKMAP_H */ | 
