[PATCH 10/10] ARM: Layerscape: LS1028a: fixup psci node

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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");
+
+	return 0;
+}
+
 static int ls1028a_init(void)
 {
 	if (!IS_ENABLED(CONFIG_ARCH_LS1028))
@@ -91,6 +106,7 @@ static int ls1028a_init(void)
 
 	layerscape_register_pbl_image_handler();
 	ls1028a_setup_icids();
+	of_register_fixup(ls1028a_psci_fixup, NULL);
 
 	reserve_sdram_region("tfa", LS1028A_TFA_RESERVED_START, LS1028A_TFA_RESERVED_SIZE);
 
-- 
2.39.2





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux