summaryrefslogtreecommitdiff
path: root/arch/arm/mach-k3/j721e_init.c
diff options
context:
space:
mode:
authorLokesh Vutla <lokeshvutla@ti.com>2020-08-05 22:44:22 +0530
committerLokesh Vutla <lokeshvutla@ti.com>2020-08-11 20:34:46 +0530
commit9c8f41beea79ec5b44df460947254b43f6d4ed9c (patch)
tree60f37c7eda1a9a13b1cb904f19792176fa601968 /arch/arm/mach-k3/j721e_init.c
parent30de1ba0d375e418e94628037f3a1e30ec58f9aa (diff)
arm: mach-k3: j7200: Add support for storing extended boot info from ROM
Starting J7200 SoC, ROM supports for loading sysfw directly from boot image. ROM passes this information on number of images that are loaded to bootloader at certain location. Add support for storing this information before it gets corrupted. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Suman Anna <s-anna@ti.com>
Diffstat (limited to 'arch/arm/mach-k3/j721e_init.c')
-rw-r--r--arch/arm/mach-k3/j721e_init.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/arm/mach-k3/j721e_init.c b/arch/arm/mach-k3/j721e_init.c
index 63a31c18ce..6246de3a26 100644
--- a/arch/arm/mach-k3/j721e_init.c
+++ b/arch/arm/mach-k3/j721e_init.c
@@ -126,10 +126,13 @@ void k3_mmc_restart_clock(void)
* it to the .data section.
*/
u32 bootindex __attribute__((section(".data")));
+static struct rom_extended_boot_data bootdata __section(.data);
-static void store_boot_index_from_rom(void)
+static void store_boot_info_from_rom(void)
{
bootindex = *(u32 *)(CONFIG_SYS_K3_BOOT_PARAM_TABLE_INDEX);
+ memcpy(&bootdata, (uintptr_t *)ROM_ENTENDED_BOOT_DATA_INFO,
+ sizeof(struct rom_extended_boot_data));
}
void board_init_f(ulong dummy)
@@ -142,7 +145,7 @@ void board_init_f(ulong dummy)
* Cannot delay this further as there is a chance that
* K3_BOOT_PARAM_TABLE_INDEX can be over written by SPL MALLOC section.
*/
- store_boot_index_from_rom();
+ store_boot_info_from_rom();
/* Make all control module registers accessible */
ctrl_mmr_unlock();