diff options
| author | Simon Glass <[email protected]> | 2024-11-15 16:19:08 -0700 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-01-15 08:48:42 -0600 |
| commit | 47903aacc520c96bafae1225484e5df740a233e6 (patch) | |
| tree | fe9254137a999ee7bc3fb6d46c31e480a22eee92 /include | |
| parent | 5907c81647055a03580dae850f82d85f7d810f7e (diff) | |
bootstd: Move bootflow-adding to bootstd
This relates to more than just the bootdev, since there is a global list
of bootflows. Move the function to the bootstd file and rename it.
Signed-off-by: Simon Glass <[email protected]>
Diffstat (limited to 'include')
| -rw-r--r-- | include/bootdev.h | 15 | ||||
| -rw-r--r-- | include/bootstd.h | 17 |
2 files changed, 17 insertions, 15 deletions
diff --git a/include/bootdev.h b/include/bootdev.h index ad4af0d1310..8db198dd56b 100644 --- a/include/bootdev.h +++ b/include/bootdev.h @@ -196,21 +196,6 @@ void bootdev_list(bool probe); 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 diff --git a/include/bootstd.h b/include/bootstd.h index ac756e98d84..3fc93a4ec2e 100644 --- a/include/bootstd.h +++ b/include/bootstd.h @@ -105,4 +105,21 @@ void bootstd_clear_glob(void); */ int bootstd_prog_boot(void); +/** + * bootstd_add_bootflow() - Add a bootflow to the bootdev's and global list + * + * All fields in @bflow must be set up. Note that @bflow->dev is used to add the + * bootflow to that device. + * + * The bootflow is also added to the global list of all bootflows + * + * @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 bootstd_add_bootflow(struct bootflow *bflow); + #endif |
