public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 0/6] sunxi: sun5/7i: add the psci suspend function
@ 2016-09-01  7:57 Antoine Tenart
  2016-09-01  7:57 ` [U-Boot] [PATCH 1/6] ARM: add the ARM_GIC configuration option Antoine Tenart
                   ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: Antoine Tenart @ 2016-09-01  7:57 UTC (permalink / raw)
  To: u-boot

Hi all,

This series adds an implementation of the psci suspend function for both
sun5i and sun7i. This was tested on Nextthing's CHIP and on a A20, using
cpuidle in Linux. My tests showed a power consumption reduced by a factor
2 on the CHIP when the system was idle. It went from ~1W without cpuidle
enabled to ~0.45W.

The idea of this suspend function is to put the dram into self-refresh,
cut off some plls and to switch cpuclk to a source with a lower
frequency. Please note the sun7i implementation lacks some parts as
putting the ram into self-refresh and coming back from this state seems
a bit tricky. I made some tests but did not managed yet to have a stable
solution.

As the sun5i does not have a GIC, I needed to remove some code from the
generic psci code. To do this I added an ARM_GIC Kconfig option which
needs to be selected by each SoC having a GIC. I already added the
relevant lines regarding sunXi SoCs. As this Kconfig option is currently
only used in the psci code, it should be safe to add it even of all the
SoCs having a GIC do not select it, as long as they don't have psci
functions.

Finally the series has a patch to enable the psci support for sun5i
SoCs, and another patch to let sun5i SoCs boot the kernel in non-secure
mode so that it can call psci functions.

Thanks!

Antoine

Antoine Tenart (6):
  ARM: add the ARM_GIC configuration option
  sunxi: select ARM_GIC for sun[6789]i
  ARM: PSCI: protect GIC specific code with ARM_GIC
  sun5/7i: add an implementation of the psci suspend function
  sun5i: enable PSCI
  sun5i: boot in HYP mode by default

 arch/arm/Kconfig                              |   3 +
 arch/arm/cpu/armv7/nonsec_virt.S              |   6 +
 arch/arm/cpu/armv7/sunxi/Makefile             |   9 +-
 arch/arm/cpu/armv7/sunxi/psci_suspend.c       | 175 ++++++++++++++++++++++++++
 arch/arm/cpu/armv7/virt-v7.c                  |  38 +++---
 arch/arm/include/asm/arch-sunxi/clock_sun4i.h |   7 ++
 arch/arm/include/asm/arch-sunxi/dram_sun4i.h  |  11 ++
 board/sunxi/Kconfig                           |   9 ++
 include/configs/sun5i.h                       |   5 +
 9 files changed, 248 insertions(+), 15 deletions(-)
 create mode 100644 arch/arm/cpu/armv7/sunxi/psci_suspend.c

-- 
2.9.3

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2016-09-01  8:51 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-01  7:57 [U-Boot] [PATCH 0/6] sunxi: sun5/7i: add the psci suspend function Antoine Tenart
2016-09-01  7:57 ` [U-Boot] [PATCH 1/6] ARM: add the ARM_GIC configuration option Antoine Tenart
2016-09-01  7:57 ` [U-Boot] [PATCH 2/6] sunxi: select ARM_GIC for sun[6789]i Antoine Tenart
2016-09-01  7:57 ` [U-Boot] [PATCH 3/6] ARM: PSCI: protect GIC specific code with ARM_GIC Antoine Tenart
2016-09-01  8:44   ` Hans de Goede
2016-09-01  8:50     ` Antoine Tenart
2016-09-01  7:57 ` [U-Boot] [PATCH 4/6] sun5/7i: add an implementation of the psci suspend function Antoine Tenart
2016-09-01  7:57 ` [U-Boot] [PATCH 5/6] sun5i: enable PSCI Antoine Tenart
2016-09-01  7:57 ` [U-Boot] [PATCH 6/6] sun5i: boot in HYP mode by default Antoine Tenart
2016-09-01  8:47   ` Hans de Goede
2016-09-01  8:51     ` Antoine Tenart
2016-09-01  8:43 ` [U-Boot] [PATCH 0/6] sunxi: sun5/7i: add the psci suspend function Hans de Goede

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox