Skip to contentSkip to conversation

PSCI backend for sun7i

PATCH New Ian Campbell 1 participant 3 messages Jul 18, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

v5 cover PSCI backend for sun7i

Hi Albert,

This is a followup to my reposting of Marc's PSCI series
http://lists.denx.de/pipermail/u-boot/2014-July/183610.html containing more of Marc's patches with the sunxi bits which make use of that new functionality. It is based on those patches.

Both sets of patches are also at:

        git://gitorious.org/ijc/u-boot.git psci-a20-v5

Ian.

#1 lore raw

PATCH v5 1/2 sunxi: HYP/non-sec: add sun7i PSCI backend

From: Marc Zyngier <[email protected]>

So far, only supporting the CPU_ON method.
Other functions can be added later.

---
 arch/arm/cpu/armv7/sunxi/Makefile |   3 +
 arch/arm/cpu/armv7/sunxi/psci.S   | 162 ++++++++++++++++++++++++++++++++++++++
 include/configs/sun7i.h           |   6 ++
 3 files changed, 171 insertions(+)
 create mode 100644 arch/arm/cpu/armv7/sunxi/psci.S
arch/arm/cpu/armv7/sunxi/Makefile +3 -0
index a64bfa1..bcc5353 100644
@@ -15,6 +15,9 @@ obj-$(CONFIG_SUN7I)	+= clock_sun4i.o
 
 ifndef CONFIG_SPL_BUILD
 obj-y	+= cpu_info.o
+ifdef CONFIG_ARMV7_PSCI
+obj-y	+= psci.o
+endif
 endif
 
 ifdef CONFIG_SPL_BUILD
arch/arm/cpu/armv7/sunxi/psci.S new file +162 -0

162 lines not on this page · raw message

include/configs/sun7i.h +6 -0
index 9b693f7..5b5801d 100644
@@ -16,6 +16,12 @@
 
 #define CONFIG_SYS_PROMPT		"sun7i# "
 
+#define CONFIG_ARMV7_VIRT		1
+#define CONFIG_ARMV7_NONSEC		1
+#define CONFIG_ARMV7_PSCI		1
+#define CONFIG_ARMV7_PSCI_NR_CPUS	2
+#define CONFIG_ARMV7_SECURE_BASE	SUNXI_SRAM_B_BASE
+
 /*
  * Include common sunxi configuration where most the settings are
  */
Signature · 1 line
2.0.1
#2 lore raw

PATCH v5 2/2 sunxi: HYP/non-sec: configure CNTFRQ on all CPUs

In reply to Ian Campbell

From: Marc Zyngier <[email protected]>

CNTFRQ needs to be properly configured on all CPUs. Otherwise, virtual machines hoping to find valuable information on secondary CPUs will be disapointed...

---
 include/configs/sun7i.h | 1 +
 1 file changed, 1 insertion(+)
include/configs/sun7i.h +1 -0
index 5b5801d..f82431c 100644
@@ -21,6 +21,7 @@
 #define CONFIG_ARMV7_PSCI		1
 #define CONFIG_ARMV7_PSCI_NR_CPUS	2
 #define CONFIG_ARMV7_SECURE_BASE	SUNXI_SRAM_B_BASE
+#define CONFIG_SYS_CLK_FREQ		24000000
 
 /*
  * Include common sunxi configuration where most the settings are
Signature · 1 line
2.0.1