drivers: board: Add get_fit_loadable()
This function will be used by the SPL to get the names of images to load
from the FIT. This allows to load different images based on runtime HW
detection.
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
diff --git a/drivers/board/board-uclass.c b/drivers/board/board-uclass.c
index a516ba4..b5485e9 100644
--- a/drivers/board/board-uclass.c
+++ b/drivers/board/board-uclass.c
@@ -23,6 +23,17 @@
return ops->detect(dev);
}
+int board_get_fit_loadable(struct udevice *dev, int index,
+ const char *type, const char **strp)
+{
+ struct board_ops *ops = board_get_ops(dev);
+
+ if (!ops->get_fit_loadable)
+ return -ENOSYS;
+
+ return ops->get_fit_loadable(dev, index, type, strp);
+}
+
int board_get_bool(struct udevice *dev, int id, bool *val)
{
struct board_ops *ops = board_get_ops(dev);