From a8d5341db78d741be03d682ac4d97b9c1905623f Mon Sep 17 00:00:00 2001 From: Rudi Heitbaum Date: Tue, 7 Jan 2025 12:57:52 +0000 Subject: [PATCH] u-boot (Allwinner H3): rebase patch for 2025.01 arm: Implement read_mpidr on armv7 - https://github.com/u-boot/u-boot/commit/080be069f5fc4cd0f5a9fbf3e697e0a9ba3ca992#diff-6e85273234514abfd8dd6193db1e9c0aa87531146b27098bc70e8010fa914079R396 --- ...MERGE-sunxi-psci-Delegate-PSCI-to-SCPI.patch | 17 ++++------------- ...E-sunxi-Enable-SCP-SCPI-on-A33-as-well.patch | 2 +- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/projects/Allwinner/devices/H3/patches/u-boot/0012-DO-NOT-MERGE-sunxi-psci-Delegate-PSCI-to-SCPI.patch b/projects/Allwinner/devices/H3/patches/u-boot/0012-DO-NOT-MERGE-sunxi-psci-Delegate-PSCI-to-SCPI.patch index 49e49b7172..17529961fb 100644 --- a/projects/Allwinner/devices/H3/patches/u-boot/0012-DO-NOT-MERGE-sunxi-psci-Delegate-PSCI-to-SCPI.patch +++ b/projects/Allwinner/devices/H3/patches/u-boot/0012-DO-NOT-MERGE-sunxi-psci-Delegate-PSCI-to-SCPI.patch @@ -12,7 +12,7 @@ Signed-off-by: Samuel Holland --- arch/arm/cpu/armv7/Kconfig | 1 + arch/arm/cpu/armv7/sunxi/Makefile | 4 + - arch/arm/cpu/armv7/sunxi/psci-scpi.c | 463 +++++++++++++++++++++++++++ + arch/arm/cpu/armv7/sunxi/psci-scpi.c | 453 +++++++++++++++++++++++++++ 3 files changed, 468 insertions(+) create mode 100644 arch/arm/cpu/armv7/sunxi/psci-scpi.c @@ -35,7 +35,7 @@ index 3e975b366c..6473b9acbd 100644 @@ -13,8 +13,12 @@ obj-$(CONFIG_MACH_SUN6I) += sram.o obj-$(CONFIG_MACH_SUN8I) += sram.o - ifndef CONFIG_SPL_BUILD + ifndef CONFIG_XPL_BUILD +ifdef CONFIG_MACH_SUN8I_H3 +obj-$(CONFIG_ARMV7_PSCI) += psci-scpi.o +else @@ -43,14 +43,14 @@ index 3e975b366c..6473b9acbd 100644 endif +endif - ifdef CONFIG_SPL_BUILD + ifdef CONFIG_XPL_BUILD obj-y += fel_utils.o diff --git a/arch/arm/cpu/armv7/sunxi/psci-scpi.c b/arch/arm/cpu/armv7/sunxi/psci-scpi.c new file mode 100644 index 0000000000..fea51eb456 --- /dev/null +++ b/arch/arm/cpu/armv7/sunxi/psci-scpi.c -@@ -0,0 +1,462 @@ +@@ -0,0 +1,453 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2016 Chen-Yu Tsai @@ -172,15 +172,6 @@ index 0000000000..fea51eb456 + +static u32 __secure_data lock; + -+static inline u32 __secure read_mpidr(void) -+{ -+ u32 val; -+ -+ asm volatile ("mrc p15, 0, %0, c0, c0, 5" : "=r" (val)); -+ -+ return val; -+} -+ +static void __secure scpi_begin_command(void) +{ + u32 mpidr = read_mpidr(); diff --git a/projects/Allwinner/devices/H3/patches/u-boot/0013-DO-NOT-MERGE-sunxi-Enable-SCP-SCPI-on-A33-as-well.patch b/projects/Allwinner/devices/H3/patches/u-boot/0013-DO-NOT-MERGE-sunxi-Enable-SCP-SCPI-on-A33-as-well.patch index 33a0bd7b2c..c259bba6af 100644 --- a/projects/Allwinner/devices/H3/patches/u-boot/0013-DO-NOT-MERGE-sunxi-Enable-SCP-SCPI-on-A33-as-well.patch +++ b/projects/Allwinner/devices/H3/patches/u-boot/0013-DO-NOT-MERGE-sunxi-Enable-SCP-SCPI-on-A33-as-well.patch @@ -32,7 +32,7 @@ index 6473b9acbd..033042666f 100644 @@ -13,7 +13,7 @@ obj-$(CONFIG_MACH_SUN6I) += sram.o obj-$(CONFIG_MACH_SUN8I) += sram.o - ifndef CONFIG_SPL_BUILD + ifndef CONFIG_XPL_BUILD -ifdef CONFIG_MACH_SUN8I_H3 +ifneq ($(CONFIG_MACH_SUN8I_A33)$(CONFIG_MACH_SUN8I_H3),) obj-$(CONFIG_ARMV7_PSCI) += psci-scpi.o