summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2024-11-15 16:19:24 -0700
committerTom Rini <trini@konsulko.com>2025-01-15 08:48:43 -0600
commita3d0fadca6b14f57477a4143334993daf52f89dc (patch)
treef046b8bd5b6f07a7c3cb98f8a81e8a199d285324
parentd9055f5e4f3c62e693991e15222804ed6c1a93ef (diff)
bootstd: Export bootdev_get_from_blk()
Export this function so it can be used from other files. Signed-off-by: Simon Glass <sjg@chromium.org>
-rw-r--r--boot/bootdev-uclass.c2
-rw-r--r--include/bootdev.h9
2 files changed, 10 insertions, 1 deletions
diff --git a/boot/bootdev-uclass.c b/boot/bootdev-uclass.c
index a4e1d79ec9b..65a3b89e40c 100644
--- a/boot/bootdev-uclass.c
+++ b/boot/bootdev-uclass.c
@@ -319,7 +319,7 @@ int bootdev_get_sibling_blk(struct udevice *dev, struct udevice **blkp)
return 0;
}
-static int bootdev_get_from_blk(struct udevice *blk, struct udevice **bootdevp)
+int bootdev_get_from_blk(struct udevice *blk, struct udevice **bootdevp)
{
struct udevice *parent = dev_get_parent(blk);
struct udevice *bootdev;
diff --git a/include/bootdev.h b/include/bootdev.h
index 991b6229c1c..12c90c4ec1b 100644
--- a/include/bootdev.h
+++ b/include/bootdev.h
@@ -402,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