Update SPL splashscreen framework for AM62x
Subsystems (3)
v2 cover Update SPL splashscreen framework for AM62x
This patch series aims at updating SPL splashscreen framework for AM62x.
This patch series depends on
https://lore.kernel.org/u-boot/[email protected]/
This series:
- Fixes compilation issues in case splash related configs are not defined in SPL.
- Does page table setup, dram initialisation and dcache enabling in one function call spl_enable_dcache.
- Allows passing of framebuffer from spl to u-boot, eliminating flicker.
V2:
- Update cover letter.
- Fix commit message.
Nikhil M Jain (8):
common: spl: spl: Update stack pointer address
arch: arm: mach-k3: common: Return a pointer after setting page table
board: ti: am62x: evm: Update function calls for splash screen
include: video: Reserve video using blob
common: board_f: Pass frame buffer info from SPL to u-boot
drivers: video: Kconfig: Add config remove video
common: spl: spl: Remove video driver
configs: am62x_evm_a53: Add bloblist address
arch/arm/mach-k3/am625_init.c | 1 + arch/arm/mach-k3/common.c | 2 ++ board/ti/am62x/evm.c | 41 ++++++++++++--------------------- common/board_f.c | 12 +++++++++- common/spl/spl.c | 3 ++- configs/am62x_evm_a53_defconfig | 1 + drivers/video/Kconfig | 13 +++++++++++ drivers/video/video-uclass.c | 23 ++++++++++++++++++ include/video.h | 9 ++++++++ 9 files changed, 77 insertions(+), 28 deletions(-)
Signature · 1 line
2.34.1
PATCH v2 1/8 common: spl: spl: Update stack pointer address
At SPL stage when stack is relocated, the stack pointer needs to be updated, the stack pointer may point to stack in on chip memory even though stack is relocated.
---
V2:
- No change.
common/spl/spl.c | 1 + 1 file changed, 1 insertion(+)
common/spl/spl.c +1 -0
@@ -992,6 +992,7 @@ ulong spl_relocate_stack_gd(void)#endif /* Get stack position: use 8-byte alignment for ABI compliance */ ptr =CONFIG_SPL_STACK_R_ADDR -roundup (sizeof (gd_t),16 ); + gd->start_addr_sp = ptr; new_gd = (gd_t *)ptr;memcpy (new_gd, (void *)gd,sizeof (gd_t));#if CONFIG_IS_ENABLED (DM )
Signature · 1 line
2.34.1
Re: [PATCH V2 1/8] common: spl: spl: Update stack pointer address
Quoted 5 lines · Nikhil M Jain
At SPL stage when stack is relocated, the stack pointer needs to be updated, the stack pointer may point to stack in on chip memory even though stack is relocated.
Signed-off-by Nikhil M Jain <[email protected]>
Signature · 1 line
Tom
PATCH v2 2/8 arch: arm: mach-k3: common: Return a pointer after setting page table
In reply to Nikhil M JainIn spl_dcache_enable after setting up page table, set gd->relocaddr pointer to tlb_addr, to get next location to reserve memory. Align tlb_addr with 64KB address.
---
V2:
- Perform 64KB alignment on tlb_addr.
arch/arm/mach-k3/common.c | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/mach-k3/common.c +2 -0
@@ -624,8 +624,10 @@ void spl_enable_dcache(void) ram_top = (phys_addr_t )0x100000000 ; gd->arch.tlb_addr = ram_top - gd->arch.tlb_size; + gd->arch.tlb_addr &= ~(0x10000 -1 );debug ("TLB table from %08lx to %08lx\n" , gd->arch.tlb_addr, gd->arch.tlb_addr + gd->arch.tlb_size); + gd->relocaddr = gd->arch.tlb_addr;dcache_enable ();#endif
Signature · 1 line
2.34.1
PATCH v2 3/8 board: ti: am62x: evm: Update function calls for splash screen
In reply to Nikhil M JainUse spl_dcache_enable, in place of setup_dram, arch_reserve_mmu to set up pagetable, initialise DRAM and enable Dcache.
---
V2:
- Use CONFIG_SPL_VIDEO in place of CONFIG_SPL_VIDEO_TIDSS to reserve video and call splash at SPL.
- Check SPL_SPLASH_SCREEN and SPL_BMP before calling splash display.
arch/arm/mach-k3/am625_init.c | 1 + board/ti/am62x/evm.c | 41 +++++++++++++---------------------- 2 files changed, 16 insertions(+), 26 deletions(-)
arch/arm/mach-k3/am625_init.c +1 -0
@@ -214,6 +214,7 @@ void board_init_f(ulong dummy)if (ret)panic ("DRAM init failed: %d\n" , ret);#endif +spl_enable_dcache (); }u32 spl_mmc_boot_mode (struct mmc *mmc,const u32 boot_device)
board/ti/am62x/evm.c +15 -26
57 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH v2 4/8 include: video: Reserve video using blob
In reply to Nikhil M JainAdd method to reserve video framebuffer information using blob, recieved from previous stage.
---
V2:
- Remove #if CONFIG_IS_ENABLED(VIDEO) in video_reserve_from_blob.
drivers/video/video-uclass.c | 11 +++++++++++ include/video.h | 9 +++++++++ 2 files changed, 20 insertions(+)
drivers/video/video-uclass.c +11 -0
@@ -142,6 +142,17 @@ int video_reserve(ulong *addrp)return 0 ; } +int video_reserve_from_bloblist (struct video_handoff *ho) +{ + gd->video_bottom = ho->fb; + gd->fb_base = ho->fb; + gd->video_top = ho->fb + ho->size; +debug ("Reserving %luk for video using blob at: %08x\n" , + ((unsigned long )ho->size) >>10 , (u32 )ho->fb); + +return 0 ; +} +int video_fill (struct udevice *dev,u32 colour) {struct video_priv *priv =dev_get_uclass_priv (dev);
include/video.h +9 -0
@@ -389,4 +389,13 @@ int bmp_display(ulong addr, int x, int y);*/ int bmp_info (ulong addr); +/* +* video_reserve_from_bloblist()- Reserve frame-buffer memory for video devices +* using blobs. +* +* @ho: video information passed from SPL +* Returns: 0 (always) +*/ +int video_reserve_from_bloblist (struct video_handoff *ho); +#endif
Signature · 1 line
2.34.1
Re: [PATCH V2 4/8] include: video: Reserve video using blob
Quoted 42 lines · Nikhil M Jain
Add method to reserve video framebuffer information using blob, recieved from previous stage.
Signed-off-by Nikhil M Jain <[email protected]>---
V2:
- Remove #ifCONFIG_IS_ENABLED(VIDEO)invideo_reserve_from_blob.drivers/video/video-uclass.c | 11 +++++++++++ include/video.h | 9 +++++++++ 2 files changed, 20 insertions(+)drivers/video/video-uclass.c +11
-0@@ -142,6 +142,17 @@ int video_reserve(ulong *addrp)return 0 ; } +int video_reserve_from_bloblist (struct video_handoff *ho) +{ + gd->video_bottom = ho->fb; + gd->fb_base = ho->fb; + gd->video_top = ho->fb + ho->size; +debug ("Reserving %luk for video using blob at: %08x\n" , + ((unsigned long )ho->size) >>10 , (u32 )ho->fb); + +return 0 ; +} +int video_fill (struct udevice *dev,u32 colour) {struct video_priv *priv =dev_get_uclass_priv (dev);include/video.h +0
-0@@ -389,4 +389,13 @@ int bmp_display(ulong addr, int x, int y);*/ int bmp_info (ulong addr);
include/video.h int bmp_display(ulong addr, int x, int y); · line 401
Quoted 10 lines
include/video.h +9
-0+/* +* video_reserve_from_bloblist()- Reserve frame-buffer memory for video devices +* using blobs. +* +* @ho: video information passed from SPL +* Returns: 0 (always) +*/ +int video_reserve_from_bloblist (struct video_handoff *ho); +#endif
Anatolij any thoughts?
Signature · 1 line
Tom
Re: [PATCH V2 4/8] include: video: Reserve video using blob
In reply to Nikhil M JainQuoted 4 lines · Nikhil M Jain
Add method to reserve video framebuffer information using blob, recieved from previous stage.
Quoted 8 lines
Signed-off-by Nikhil M Jain <[email protected]>---
V2:
- Remove #ifCONFIG_IS_ENABLED(VIDEO)invideo_reserve_from_blob.drivers/video/video-uclass.c | 11 +++++++++++ include/video.h | 9 +++++++++ 2 files changed, 20 insertions(+)
PATCH v2 5/8 common: board_f: Pass frame buffer info from SPL to u-boot
In reply to Nikhil M JainU-boot proper can use frame buffer address passed from SPL to reserve the memory area used by framebuffer set in SPL so that splash image set in SPL continues to get displayed while u-boot proper is running.
Put the framebuffer address and size in a bloblist to make them available at u-boot proper, if in u-boot proper CONFIG_VIDEO is defined.
---
V2:
- Fix commit message.
- Revert use of #if.
common/board_f.c | 12 +++++++++++- drivers/video/video-uclass.c | 12 ++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-)
common/board_f.c +11 -1
@@ -411,7 +411,17 @@ __weak int arch_reserve_mmu(void)static int reserve_video (void ) { -if (IS_ENABLED (CONFIG_VIDEO )) { + +if (IS_ENABLED (CONFIG_SPL_VIDEO ) &&spl_phase () >PHASE_SPL && +CONFIG_IS_ENABLED (BLOBLIST )) { +struct video_handoff *ho; + + ho =bloblist_find (BLOBLISTT_U_BOOT_VIDEO ,sizeof (*ho)); +if (!ho) +return log_msg_ret ("blf" , -ENOENT ); +video_reserve_from_bloblist (ho); + gd->relocaddr = ho->fb; + }else if (CONFIG_IS_ENABLED (VIDEO )){ulong addr;int ret;
drivers/video/video-uclass.c +12 -0
@@ -6,12 +6,14 @@#define LOG_CATEGORY UCLASS_VIDEO#include <common.h> +#include <bloblist.h> #include <console.h> #include <cpu_func.h> #include <dm.h> #include <log.h> #include <malloc.h> #include <mapmem.h> +#include <spl.h> #include <stdio_dev.h> #include <video.h> #include <video_console.h>
@@ -139,6 +141,16 @@ int video_reserve(ulong *addrp)debug ("Video frame buffers from %lx to %lx\n" , gd->video_bottom, gd->video_top); +if (spl_phase () ==PHASE_SPL &&CONFIG_IS_ENABLED (BLOBLIST )) { +struct video_handoff *ho; + + ho =bloblist_add (BLOBLISTT_U_BOOT_VIDEO ,sizeof (*ho),0 ); +if (!ho) +return log_msg_ret ("blf" , -ENOENT ); + ho->fb = *addrp; + ho->size = size; + } +return 0 ; }
Signature · 1 line
2.34.1
PATCH v2 6/8 drivers: video: Kconfig: Add config remove video
In reply to Nikhil M JainThis is required since user may want to either call the remove method of video driver and reset the display or not call the remove method to continue displaying until next stage.
---
V2:
- Add Reviewed-by tag.
drivers/video/Kconfig | 13 +++++++++++++ 1 file changed, 13 insertions(+)
drivers/video/Kconfig +13 -0
@@ -840,6 +840,13 @@ config IHS_VIDEO_OUT out On-screen Display (OSD) used on gdsys FPGAs to control dynamic textual overlays of the display outputs. +config VIDEO_REMOVE + bool "Remove video driver" + help + Use this option to specify if user wants to call remove method of + video driver in u-boot proper stage. + + config SPLASH_SCREEN bool "Show a splash-screen image" help
@@ -1063,6 +1070,12 @@ config SPL_SYS_WHITE_ON_BLACK This can be better in low-light situations or to reduce eye strain in some cases. +config SPL_VIDEO_REMOVE + bool "Remove video driver after SPL stage" + help + if this option is enabled video driver will be removed at the end of + SPL stage, beforeloading the next stage. + if SPL_SPLASH_SCREEN config SPL_SPLASH_SCREEN_ALIGN
Signature · 1 line
2.34.1
Re: [PATCH V2 6/8] drivers: video: Kconfig: Add config remove video
Quoted 18 lines · Nikhil M Jain
This is required since user may want to either call the remove method of video driver and reset the display or not call the remove method to continue displaying until next stage.
Signed-off-by Nikhil M Jain <[email protected]>Reviewed-by Devarsh Thakkar <[email protected]>---
V2:
- Add Reviewed-by tag.drivers/video/Kconfig | 13 +++++++++++++ 1 file changed, 13 insertions(+)drivers/video/Kconfig +0
-0
drivers/video/Kconfig config IHS_VIDEO_OUT · line 847
Quoted 8 lines
drivers/video/Kconfig +5
-0@@ -840,6 +840,13 @@ config IHS_VIDEO_OUT out On-screen Display (OSD) used on gdsys FPGAs to control dynamic textual overlays of the display outputs. +config VIDEO_REMOVE + bool "Remove video driver" + help + Use this option to specify if user wants to call remove method of + video driver in u-boot proper stage.
Please fix this spacing.
Signature · 1 line
Tom
PATCH v2 7/8 common: spl: spl: Remove video driver
In reply to Nikhil M JainUse config SPL_VIDEO_REMOVE to remove video driver at SPL stage before jumping to next stage, in place of CONFIG_SPL_VIDEO, to allow user to remove video if required.
---
v2:
- Add Reviewed-by tag.
common/spl/spl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
common/spl/spl.c +1 -1
@@ -891,7 +891,7 @@ void board_init_r(gd_t *dummy1, ulong dummy2)debug ("Failed to stash bootstage: err=%d\n" , ret);#endif -#if defined(CONFIG_SPL_VIDEO ) +#if defined(CONFIG_SPL_VIDEO_REMOVE )struct udevice *dev;int rc;
Signature · 1 line
2.34.1
PATCH v2 8/8 configs: am62x_evm_a53: Add bloblist address
In reply to Nikhil M JainDefine bloblist address.
Updated Memory map
0x80000000┌─────────────────────┐
│ Empty 512 KB │
│ │
0x80080000├─────────────────────┤
│ Text Base │
│ 352 KB │
│ │
0x800D8000├─────────────────────┤
│ Empty 1.1MB │
│ │
0x80200000├─────────────────────┤
│ │
│ │
│ │
│ BMP Image Load │
│ │
│ 9.4 MB │
│ │
│ │
│ │
│ │
│ │
│ │
0x80B77660├─────────────────────┤
│ Stack 2KB │
0x80B77e60├─────────────────────┤
│ GD 416 Bytes │
0x80B78000├─────────────────────┤
│ │
│ Malloc 352KB │
0x80B80000├─────────────────────┤
│ │
│ Empty 1 MB │
│ │
0x80C80000├─────────────────────┤
│ BSS 512 KB │
│ │
0x80D00000├─────────────────────┤
│ Blobs 1KB │
0x80D00400├─────────────────────┤
│ │
│ Empty 2.999MB │
│ │
│ │
0x81000000└─────────────────────┘FIT Image load address---
V2:
- Add Reviewed-by tag.
configs/am62x_evm_a53_defconfig | 1 + 1 file changed, 1 insertion(+)
configs/am62x_evm_a53_defconfig +1 -0
@@ -102,3 +102,4 @@ CONFIG_SYSRESET=y CONFIG_SPL_SYSRESET=y CONFIG_SYSRESET_TI_SCI=y CONFIG_FS_FAT_MAX_CLUSTSIZE=16384 +CONFIG_BLOBLIST_ADDR=0x80D00000
Signature · 1 line
2.34.1
Re: [PATCH V2 8/8] configs: am62x_evm_a53: Add bloblist address
Quoted 40 lines · Nikhil M Jain
Define bloblist address.
Updated Memory map
0x80000000┌─────────────────────┐ │ Empty 512 KB │ │ │ 0x80080000├─────────────────────┤ │ Text Base │ │ 352 KB │ │ │ 0x800D8000├─────────────────────┤ │ Empty 1.1MB │ │ │ 0x80200000├─────────────────────┤ │ │ │ │ │ │ │ BMP Image Load │ │ │ │ 9.4 MB │ │ │ │ │ │ │ │ │ │ │ │ │ 0x80B77660├─────────────────────┤ │ Stack 2KB │ 0x80B77e60├─────────────────────┤ │ GD 416 Bytes │ 0x80B78000├─────────────────────┤ │ │ │ Malloc 352KB │ 0x80B80000├─────────────────────┤ │ │ │ Empty 1 MB │ │ │ 0x80C80000├─────────────────────┤ │ BSS 512 KB │ │ │
Quoted 8 lines
0x80D00000├─────────────────────┤
│ Blobs 1KB │
0x80D00400├─────────────────────┤
│ │
│ Empty 2.999MB │
│ │
│ │
0x81000000└─────────────────────┘FIT Image load addressDocument in rst please.
Quoted 22 lines
Signed-off-by Nikhil M Jain <[email protected]>Reviewed-by Devarsh Thakkar <[email protected]>---
V2:
- Add Reviewed-by tag.configs/am62x_evm_a53_defconfig | 1 + 1 file changed, 1 insertion(+)configs/am62x_evm_a53_defconfig +1
-0@@ -102,3 +102,4 @@ CONFIG_SYSRESET=y CONFIG_SPL_SYSRESET=y CONFIG_SYSRESET_TI_SCI=y CONFIG_FS_FAT_MAX_CLUSTSIZE=16384 +CONFIG_BLOBLIST_ADDR=0x80D00000Signature · 1 line
2.34.1
Signature · 3 lines
Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D