summaryrefslogtreecommitdiff
path: root/include/bootdev.h
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2025-01-15 17:34:26 -0600
committerTom Rini <trini@konsulko.com>2025-01-15 19:27:14 -0600
commit178f6ecb21fe12ada74a9a1a08093c812b15eea5 (patch)
tree60dee6152b33cbd13f311875ce2fc8e9350a8c3d /include/bootdev.h
parente26a9ac4c6900cac2fa043ac50a3a3c038f4505d (diff)
parenta3d0fadca6b14f57477a4143334993daf52f89dc (diff)
Merge patch series "bootstd: Support recording images"
Simon Glass <sjg@chromium.org> says: This series provides a way to keep track of the images used in bootstd, including the type of each image. At present this is sort-of handled by struct bootflow but in quite an ad-hoc way. The structure has become quite large and is hard to query. Future work will be able to reduce its size. Ultimately the 'bootflow info' command may change to also show images as a list, but that is left for later, as this series is already fairly long. So for now, just introduce the concept and adjust bootstd to use it, with a simple command to list the images. This series includes various alist enhancements, to make use of this new data structure a little easier. [trini: Drop patch 18 and 19 for now due to size considerations] Link: https://lore.kernel.org/r/20241115231926.211999-1-sjg@chromium.org
Diffstat (limited to 'include/bootdev.h')
-rw-r--r--include/bootdev.h36
1 files changed, 9 insertions, 27 deletions
diff --git a/include/bootdev.h b/include/bootdev.h
index ad4af0d1310..12c90c4ec1b 100644
--- a/include/bootdev.h
+++ b/include/bootdev.h
@@ -109,11 +109,9 @@ struct bootdev_hunter {
* This is attached to each device in the bootdev uclass and accessible via
* dev_get_uclass_plat(dev)
*
- * @bootflows: List of available bootflows for this bootdev
* @piro: Priority of this bootdev
*/
struct bootdev_uc_plat {
- struct list_head bootflow_head;
enum bootdev_prio_t prio;
};
@@ -186,31 +184,6 @@ int bootdev_find_in_blk(struct udevice *dev, struct udevice *blk,
void bootdev_list(bool probe);
/**
- * bootdev_clear_bootflows() - Clear bootflows from a bootdev
- *
- * Each bootdev maintains a list of discovered bootflows. This provides a
- * way to clear it. These bootflows are removed from the global list too.
- *
- * @dev: bootdev device to update
- */
-void bootdev_clear_bootflows(struct udevice *dev);
-
-/**
- * bootdev_add_bootflow() - Add a bootflow to the bootdev's list
- *
- * All fields in @bflow must be set up. Note that @bflow->dev is used to add the
- * bootflow to that device.
- *
- * @dev: Bootdev device to add to
- * @bflow: Bootflow to add. Note that fields within bflow must be allocated
- * since this function takes over ownership of these. This functions makes
- * a copy of @bflow itself (without allocating its fields again), so the
- * caller must dispose of the memory used by the @bflow pointer itself
- * Return: 0 if OK, -ENOMEM if out of memory
- */
-int bootdev_add_bootflow(struct bootflow *bflow);
-
-/**
* bootdev_first_bootflow() - Get the first bootflow from a bootdev
*
* Returns the first bootflow attached to a bootdev
@@ -429,6 +402,15 @@ static int bootdev_setup_for_sibling_blk(struct udevice *blk,
int bootdev_get_sibling_blk(struct udevice *dev, struct udevice **blkp);
/**
+ * bootdev_get_from_blk() - Get the bootdev given a block device
+ *
+ * @blk: Block device to check
+ * @bootdebp: Returns the bootdev found, if any
+ * Return 0 if OK, -ve on error
+ */
+int bootdev_get_from_blk(struct udevice *blk, struct udevice **bootdevp);
+
+/**
* bootdev_unbind_dev() - Unbind a bootdev device
*
* Remove and unbind a bootdev device which is a child of @parent. This should