aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-07-15 21:39:01 -0600
committerBin Meng <bmeng@tinylab.org>2023-07-17 17:12:26 +0800
commit7c10e111c18d73e1bb9c64c79e778c9976900d05 (patch)
treebe170f9b8324bdffa20bdbd707ff7ba1aad96da8 /arch
parent352525801992799b9bb289e3233a8b17bcf2bc52 (diff)
downloadu-boot-7c10e111c18d73e1bb9c64c79e778c9976900d05.zip
u-boot-7c10e111c18d73e1bb9c64c79e778c9976900d05.tar.gz
u-boot-7c10e111c18d73e1bb9c64c79e778c9976900d05.tar.bz2
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 <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/lib/spl.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/x86/lib/spl.c b/arch/x86/lib/spl.c
index f275018..039f219 100644
--- a/arch/x86/lib/spl.c
+++ b/arch/x86/lib/spl.c
@@ -15,6 +15,7 @@
#include <malloc.h>
#include <spl.h>
#include <syscon.h>
+#include <vesa.h>
#include <asm/cpu.h>
#include <asm/cpu_common.h>
#include <asm/fsp2/fsp_api.h>
@@ -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);
+ }
}