summaryrefslogtreecommitdiff
path: root/arch/arm/mach-stm32mp/stm32mp2/cpu.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2025-09-30 10:47:19 -0600
committerTom Rini <trini@konsulko.com>2025-09-30 10:47:19 -0600
commit5b93c3ec7f9d66dc40d062a47a4a880f7d346b7a (patch)
treef10ba825a869213ac23bb65cda4cbaffa12e7ee2 /arch/arm/mach-stm32mp/stm32mp2/cpu.c
parent8dee93cfc50992990ea6f1871b128d464929e1f5 (diff)
parent8a2e75e6a1ca51bbd81eef36ffb26737adec316f (diff)
Merge tag 'u-boot-stm32-20250930' of https://source.denx.de/u-boot/custodians/u-boot-stm
CI: https://source.denx.de/u-boot/custodians/u-boot-stm/-/pipelines/27776 - stm32mp1: Fix env_get_location() - stm32mp2: Update register used by BL31 for boot parameter
Diffstat (limited to 'arch/arm/mach-stm32mp/stm32mp2/cpu.c')
-rw-r--r--arch/arm/mach-stm32mp/stm32mp2/cpu.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/arch/arm/mach-stm32mp/stm32mp2/cpu.c b/arch/arm/mach-stm32mp/stm32mp2/cpu.c
index c3b87d7f981..e081dc605b8 100644
--- a/arch/arm/mach-stm32mp/stm32mp2/cpu.c
+++ b/arch/arm/mach-stm32mp/stm32mp2/cpu.c
@@ -92,13 +92,21 @@ uintptr_t get_stm32mp_bl2_dtb(void)
}
/*
- * Save the FDT address provided by TF-A in r2 at boot time
+ * Save the FDT address provided by TF-A at boot time
* This function is called from start.S
*/
-void save_boot_params(unsigned long r0, unsigned long r1, unsigned long r2,
- unsigned long r3)
+void save_boot_params(unsigned long x0, unsigned long x1, unsigned long x2,
+ unsigned long x3)
{
- nt_fw_dtb = r2;
+ /* use the ARM64 kernel booting register settings:
+ * x0 = physical address of device tree blob (dtb) in system RAM.
+ * so kernel can replace U-Boot in FIP wihtout BL31 modification
+ * else falback to x2 used in previous TF-A version
+ */
+ if (x0)
+ nt_fw_dtb = x0;
+ else
+ nt_fw_dtb = x2;
save_boot_params_ret();
}