X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=drivers%2Fvideo%2Fsunxi%2Fsunxi_de2.c;h=8333ddc44c08d49c8ac11d41cf082a06c8fdce0b;hb=83a5df42614c566c3c642871f683e66a53d228ae;hp=860187323c964128727a7d112a756f4e3a4fe2a9;hpb=0458e8c6fa660c40f52098e32a71aeee31e3aa92;p=oweals%2Fu-boot.git diff --git a/drivers/video/sunxi/sunxi_de2.c b/drivers/video/sunxi/sunxi_de2.c index 860187323c..8333ddc44c 100644 --- a/drivers/video/sunxi/sunxi_de2.c +++ b/drivers/video/sunxi/sunxi_de2.c @@ -1,15 +1,15 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * Allwinner DE2 display driver * * (C) Copyright 2017 Jernej Skrabec - * - * SPDX-License-Identifier: GPL-2.0+ */ #include #include #include #include +#include #include #include #include @@ -222,6 +222,13 @@ static int sunxi_de2_init(struct udevice *dev, ulong fbbase, uc_priv->bpix = l2bpp; debug("fb=%lx, size=%d %d\n", fbbase, uc_priv->xsize, uc_priv->ysize); +#ifdef CONFIG_EFI_LOADER + efi_add_memory_map(fbbase, + ALIGN(timing.hactive.typ * timing.vactive.typ * + (1 << l2bpp) / 8, EFI_PAGE_SIZE) >> EFI_PAGE_SHIFT, + EFI_RESERVED_MEMORY_TYPE, false); +#endif + return 0; } @@ -340,6 +347,9 @@ int sunxi_simplefb_setup(void *blob) if (ret) { debug("DE2 not present\n"); return 0; + } else if (!device_active(de2)) { + debug("DE2 present but not probed\n"); + return 0; } ret = uclass_find_device_by_name(UCLASS_DISPLAY,