From: Simon Glass Date: Sun, 16 Jul 2023 03:39:01 +0000 (-0600) Subject: x86: Init video in SPL if enabled X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=7c10e111c18d73e1bb9c64c79e778c9976900d05;p=u-boot.git x86: Init video in SPL if enabled When video is required in SPL, set this up ready for use. Ignore any problems since it may be that video is not actually available and we still want to continue on to U-Boot proper in that case. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- diff --git a/arch/x86/lib/spl.c b/arch/x86/lib/spl.c index f27501875e..039f219f50 100644 --- a/arch/x86/lib/spl.c +++ b/arch/x86/lib/spl.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -263,4 +264,12 @@ void spl_board_init(void) #ifndef CONFIG_TPL preloader_console_init(); #endif + + if (CONFIG_IS_ENABLED(VIDEO)) { + struct udevice *dev; + + /* Set up PCI video in SPL if required */ + uclass_first_device_err(UCLASS_PCI, &dev); + uclass_first_device_err(UCLASS_VIDEO, &dev); + } }