On Tue, Jan 09, 2024 at 10:26:28AM +0100, Ahmad Fatoum wrote: > Hello Sascha, > > On 09.01.24 10:16, Sascha Hauer wrote: > > The upstream LS1028a dtsi files do not have a psci node, so add one > > in a fixup. This is necessary to bring up the secondary CPU core. > > > > Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> > > --- > > arch/arm/mach-layerscape/Kconfig | 1 + > > arch/arm/mach-layerscape/soc.c | 16 ++++++++++++++++ > > 2 files changed, 17 insertions(+) > > > > diff --git a/arch/arm/mach-layerscape/Kconfig b/arch/arm/mach-layerscape/Kconfig > > index 5658a63b33..97f2061eee 100644 > > --- a/arch/arm/mach-layerscape/Kconfig > > +++ b/arch/arm/mach-layerscape/Kconfig > > @@ -20,6 +20,7 @@ config ARCH_LS1028 > > select SYS_SUPPORTS_64BIT_KERNEL > > select ARM_ATF > > select FIRMWARE_LS1028A_ATF > > + select ARM_PSCI_OF > > > > config ARCH_LS1046 > > bool > > diff --git a/arch/arm/mach-layerscape/soc.c b/arch/arm/mach-layerscape/soc.c > > index 70c1dedb46..30fbb5d1bf 100644 > > --- a/arch/arm/mach-layerscape/soc.c > > +++ b/arch/arm/mach-layerscape/soc.c > > @@ -3,7 +3,9 @@ > > #include <io.h> > > #include <init.h> > > #include <memory.h> > > +#include <linux/arm-smccc.h> > > #include <linux/bug.h> > > +#include <asm/psci.h> > > #include <mach/layerscape/layerscape.h> > > #include <of.h> > > > > @@ -84,6 +86,19 @@ static int ls1021a_init(void) > > return 0; > > } > > > > +static int ls1028a_psci_fixup(struct device_node *root, void *unused) > > +{ > > + unsigned long psci_version; > > + struct arm_smccc_res res = {}; > > + > > + arm_smccc_smc(ARM_PSCI_0_2_FN_PSCI_VERSION, 0, 0, 0, 0, 0, 0, 0, &res); > > + psci_version = res.a0; > > + > > + of_psci_fixup(root, psci_version, "smc"); > > Do you have a restart handler registered for LS1028A? If not, you may consider > adding the same node to the barebox device tree node too, so it can use PSCI > to reset the system. Will do. This makes this patch unnecessary as the existing PSCI client support will automatically add a PSCI node to the dtb the Kernel is started with. Sascha -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |