[PATCH 4/4] board: ti: am62x: evm: Update simple-framebuffer node in device-tree

Devarsh Thakkar devarsht at ti.com
Tue Mar 5 11:28:39 CET 2024


Hi,

On 22/02/24 18:38, Devarsh Thakkar wrote:
> Update simple-framebuffer device-tree node by enumerating framebuffer
> related information in existing simple-framebuffer node in Linux
> device-tree file and enabling it.
> 
> In case there is no simple-framebuffer stub detected in Linux kernel
> device-tree and video is still active, then update the device-tree to
> reserve the framebuffer region for the active splash screen.
> 
> This helps preserve the splash screen till the display server takes over
> after OS is booted.
> 
> Signed-off-by: Devarsh Thakkar <devarsht at ti.com>
> ---
>  board/ti/am62x/evm.c | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
> 
> diff --git a/board/ti/am62x/evm.c b/board/ti/am62x/evm.c
> index 88e02155ee..c825af3368 100644
> --- a/board/ti/am62x/evm.c
> +++ b/board/ti/am62x/evm.c
> @@ -15,6 +15,7 @@
>  #include <cpu_func.h>
>  #include <k3-ddrss.h>
>  #include <fdt_support.h>
> +#include <fdt_simplefb.h>
>  #include <asm/io.h>
>  #include <asm/arch/hardware.h>
>  #include <dm/uclass.h>
> @@ -118,3 +119,21 @@ void spl_perform_fixups(struct spl_image_info *spl_image)
>  #endif
>  }
>  #endif
> +
> +#if defined(CONFIG_OF_BOARD_SETUP)
> +int ft_board_setup(void *blob, struct bd_info *bd)
> +{
> +	int ret = -1;
> +
> +	if (IS_ENABLED(CONFIG_FDT_SIMPLEFB))
> +		ret = fdt_simplefb_enable_and_mem_rsv(blob);
> +

This needs to be protected with IS_ENABLED(CONFIG_VIDEO) too to avoid below
errors when CONFIG_VIDEO is disabled :

/home/devarsht/ti/ti-u-boot/board/ti/am62x/evm.c:102: undefined reference to
`video_is_active'

aarch64-none-linux-gnu-ld.bfd:
/home/devarsht/ti/ti-u-boot/board/ti/am62x/evm.c:104: undefined reference to
`fdt_add_fb_mem_rsv' \

I will send out a V2 of this patch.

Regards
Devarsh
> +	/* If simplefb is not enabled and video is active, then at least reserve
> +	 * the framebuffer region to preserve the splash screen while OS is booting
> +	 */
> +	if (ret && video_is_active())
> +		return fdt_add_fb_mem_rsv(blob);
> +
> +	return 0;
> +}
> +#endif


More information about the U-Boot mailing list