mach-k3: common: enable falcon mode from R5 SPL
authorAnshul Dalal <anshuld@ti.com>
Fri, 31 Oct 2025 07:37:53 +0000 (13:07 +0530)
committerTom Rini <trini@konsulko.com>
Thu, 6 Nov 2025 23:39:49 +0000 (17:39 -0600)
commite40c406914aeadbb82cd84fe4d9f48efbcb1c68b
treecc0cf746102947e6ee41b3d52e03388686fb14aa
parent197459d198c710e9cdab203270be68137ee90955
mach-k3: common: enable falcon mode from R5 SPL

We use the spl_board_prepare_for_boot hook to call k3_r5_falcon_prep
which is ran after tispl is loaded but before jump_to_image.

In k3_r5_falcon_prep, we find the boot media and load the kernel FIT
just as standard secure falcon mode (since spl_start_uboot returns 0
now). Once the kernel and args are loaded.

Now when the flow goes to jump_to_image, we do the regular pre-jump
procedure and jump to TFA which jumps to the kernel directly since we
have already loaded the kernel and dtb at their respective addresses
(PRELOADED_BL33_BASE and K3_HW_CONFIG_BASE).

Overall execution for the R5 SPL after this patch:

  board_init_r
  |-> boot_from_devices
  |   +-> load_image (we load tifalcon.bin here since spl_start_uboot
  |                   returns 1)
  |
  +-> spl_prepare_for_boot
  |   +-> k3_falcon_prep
  |       +-> load_image (we load fitImage here since spl_start_uboot
  |                       returns 0 now)
  |
  +-> jump_to_image

Signed-off-by: Anshul Dalal <anshuld@ti.com>
arch/arm/mach-k3/common.c
arch/arm/mach-k3/common.h
arch/arm/mach-k3/r5/common.c