summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorNikhil M Jain <n-jain1@ti.com>2023-07-18 14:27:33 +0530
committerTom Rini <trini@konsulko.com>2023-07-21 15:32:12 -0400
commit954b0ad4a228112f68cf96522e93f4b30c7b6117 (patch)
treefc62d9ef038c51488bc427008ced420b7a0ff614 /common
parent63e73a13e994e5aa960418f02b148d023719021e (diff)
downloadu-boot-954b0ad4a228112f68cf96522e93f4b30c7b6117.tar.gz
u-boot-954b0ad4a228112f68cf96522e93f4b30c7b6117.tar.bz2
u-boot-954b0ad4a228112f68cf96522e93f4b30c7b6117.zip
common: spl: spl: Remove video driver
Use config SPL_VIDEO_REMOVE to remove video driver at SPL stage before jumping to next stage, in place of CONFIG_SPL_VIDEO, to allow user to remove video if required. Signed-off-by: Nikhil M Jain <n-jain1@ti.com> Reviewed-by: Devarsh Thakkar <devarsht@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common')
-rw-r--r--common/spl/spl.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/common/spl/spl.c b/common/spl/spl.c
index d45dd1c923..f09bb97781 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -891,18 +891,18 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
debug("Failed to stash bootstage: err=%d\n", ret);
#endif
-#if defined(CONFIG_SPL_VIDEO)
- struct udevice *dev;
- int rc;
-
- rc = uclass_find_device(UCLASS_VIDEO, 0, &dev);
- if (!rc && dev) {
- rc = device_remove(dev, DM_REMOVE_NORMAL);
- if (rc)
- printf("Cannot remove video device '%s' (err=%d)\n",
- dev->name, rc);
+ if (IS_ENABLED(CONFIG_SPL_VIDEO_REMOVE)) {
+ struct udevice *dev;
+ int rc;
+
+ rc = uclass_find_device(UCLASS_VIDEO, 0, &dev);
+ if (!rc && dev) {
+ rc = device_remove(dev, DM_REMOVE_NORMAL);
+ if (rc)
+ printf("Cannot remove video device '%s' (err=%d)\n",
+ dev->name, rc);
+ }
}
-#endif
spl_board_prepare_for_boot();
jump_to_image_no_args(&spl_image);