diff options
author | Nikhil M Jain <n-jain1@ti.com> | 2023-06-09 14:29:55 +0530 |
---|---|---|
committer | Udit Kumar <u-kumar1@ti.com> | 2023-06-12 09:49:41 +0530 |
commit | e9e88e5447ea888861852473c7d292f6be48f6cb (patch) | |
tree | 64b95b74a75cb8638b02f034944c42d5c4f127a4 /common | |
parent | 5203a921ec1cdc16cc6e8199fd98431fc1603235 (diff) |
common: spl: spl: Remove video driver before u-boot proper
Add method to remove video driver before loading u-boot proper. When
bootstage changes from SPL to u-boot proper, this method will reset the
display controller so that it stops displaying towards the end of SPL
stage, thus avoiding displaying of artefacts when control is passed to
further stages and framebuffer region is used by some other component.
Signed-off-by: Nikhil M Jain <n-jain1@ti.com>
Diffstat (limited to 'common')
-rw-r--r-- | common/spl/spl.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/common/spl/spl.c b/common/spl/spl.c index 6c377ce465..9a9c8fad76 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -35,6 +35,8 @@ #include <mapmem.h> #include <dm/root.h> #include <dm/util.h> +#include <dm/device-internal.h> +#include <dm/uclass-internal.h> #include <linux/compiler.h> #include <fdt_support.h> #include <bootcount.h> @@ -889,6 +891,19 @@ 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); + } +#endif + spl_board_prepare_for_boot(); jump_to_image_no_args(&spl_image); } |