public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 0/6] sunxi: sun5/7i: add the psci suspend function
Date: Thu, 1 Sep 2016 10:43:28 +0200	[thread overview]
Message-ID: <27f6879e-be0a-9280-710e-dcabe307be87@redhat.com> (raw)
In-Reply-To: <20160901075746.28564-1-antoine.tenart@free-electrons.com>

Hi,

On 01-09-16 09:57, Antoine Tenart wrote:
> 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.

Cool stuff. I've some minor remarks to some of the patches I'll reply
to them separately. I also hope someone who knows this stuff better
then me can also take a look, but if not then I'm just going to take
it for the next u-boot cycle (with the remarks fixed).

Regards,

Hans


>
> 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
>

      parent reply	other threads:[~2016-09-01  8:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Hans de Goede [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=27f6879e-be0a-9280-710e-dcabe307be87@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox