From 7837e273df58cafb405a640364da4755b6d35c89 Mon Sep 17 00:00:00 2001 From: Yuri Zaporozhets Date: Wed, 30 Oct 2024 14:17:33 +0100 Subject: [PATCH] drivers/video/vesa: use MTRRs only on x86 MTRR functionality is available only on x86, so this driver cannot be compiled on other architectures. Fix this with preprocessor directives. Signed-off-by: Yuri Zaporozhets --- drivers/video/vesa.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/video/vesa.c b/drivers/video/vesa.c index ab756ac8ea..e96f6747a6 100644 --- a/drivers/video/vesa.c +++ b/drivers/video/vesa.c @@ -8,21 +8,26 @@ #include #include #include +#if defined(CONFIG_X86) #include +#endif static int vesa_video_probe(struct udevice *dev) { - struct video_uc_plat *plat = dev_get_uclass_plat(dev); - ulong fbbase; int ret; ret = vesa_setup_video(dev, NULL); if (ret) return log_ret(ret); +#if defined(CONFIG_X86) + struct video_uc_plat *plat = dev_get_uclass_plat(dev); + ulong fbbase; + /* Use write-combining for the graphics memory, 256MB */ fbbase = IS_ENABLED(CONFIG_VIDEO_COPY) ? plat->copy_base : plat->base; mtrr_set_next_var(MTRR_TYPE_WRCOMB, fbbase, 256 << 20); +#endif return 0; } -- 2.39.5