All of lore.kernel.org
 help / color / mirror / Atom feed
From: Antoine Tenart <antoine.tenart@free-electrons.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4 09/11] sun5/7i: add an implementation of the psci suspend function
Date: Tue, 2 May 2017 09:42:27 +0200	[thread overview]
Message-ID: <20170502074227.g43lqh32cbv2bezy@kwain> (raw)
In-Reply-To: <20170502073347.b5aon4dnubxr4lsc@lukather>

On Tue, May 02, 2017 at 09:33:47AM +0200, Maxime Ripard wrote:
> On Tue, May 02, 2017 at 03:27:41PM +0800, Chen-Yu Tsai wrote:
> > On Tue, May 2, 2017 at 3:23 PM, Antoine Tenart
> > <antoine.tenart@free-electrons.com> wrote:
> > > On Tue, May 02, 2017 at 09:04:18AM +0200, Antoine Tenart wrote:
> > >> On Mon, May 01, 2017 at 11:13:27PM +0200, Maxime Ripard wrote:
> > >> > On Sun, Apr 30, 2017 at 03:29:54PM +0200, Antoine Tenart wrote:
> > >> >
> > >> > > +static void __secure sunxi_clock_leave_idle(struct sunxi_ccm_reg *ccm)
> > >> > > +{
> > >> > > +#ifndef CONFIG_MACH_SUN7I
> > >> > > + /* switch cpuclk to osc24m */
> > >> > > + clrsetbits_le32(&ccm->cpu_ahb_apb0_cfg, 0x3 << CPU_CLK_SRC_SHIFT,
> > >> > > +                 CPU_CLK_SRC_OSC24M << CPU_CLK_SRC_SHIFT);
> > >> > > +#endif
> > >> >
> > >> > Is that really needed? Whatever state we're in at this point, we just
> > >> > want to switch back to the PLL1, right?
> > >>
> > >> I think it wasn't working for some reasons if we didn't switch to osc24m
> > >> first, but that was a while ago. I can test again.
> > >
> > > It seems to work without switching back to osc24m first. I'll remove
> > > this.
> > 
> > This is probably going to work badly with the sunxi-ng clock driver
> > in Linux, which will temporarily switch over to osc24M while changing
> > the clock rate of PLL1, then switch back.
> 
> It doesn't do so for the A20, only the later SoCs.
> 
> I'm not sure whether using cpufreq and cpuidle at the same time is
> valid either.

This is cluster wise, cpuclk with be switched to losc (or osc24m) only
if all CPU are in the idle state. Likewise, the first CPU to leave this
state will switch back cpuclk to pll1. So that shouldn't be an issue for
the sunxi-ng clock driver in Linux.

Antoine

-- 
Antoine Ténart, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170502/c453e0ee/attachment.sig>

  reply	other threads:[~2017-05-02  7:42 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-30 13:29 [U-Boot] [PATCH v4 00/11] sunxi: sun5/7i: add the psci suspend function Antoine Tenart
2017-04-30 13:29 ` [U-Boot] [PATCH v4 01/11] arm: add atomic functions with return support Antoine Tenart
2017-04-30 13:29 ` [U-Boot] [PATCH v4 02/11] arm: add the ARM_GIC configuration option Antoine Tenart
2017-04-30 13:29 ` [U-Boot] [PATCH v4 03/11] sunxi: select ARM_GIC for sun[6789]i Antoine Tenart
2017-04-30 13:29 ` [U-Boot] [PATCH v4 04/11] arm: select ARM_GIC for SoCs having a psci implementation Antoine Tenart
2017-05-11  8:00   ` Masahiro Yamada
2017-04-30 13:29 ` [U-Boot] [PATCH v4 05/11] tegra: select ARM_GIC for Tegra SoCs Antoine Tenart
2017-05-01 15:12   ` Tom Warren
2017-05-01 15:34     ` Stephen Warren
2017-05-02  6:51       ` Antoine Tenart
2017-05-02 14:58         ` Stephen Warren
2017-05-02  6:39     ` Antoine Tenart
2017-05-02  6:40       ` Antoine Tenart
2017-04-30 13:29 ` [U-Boot] [PATCH v4 06/11] mx7: select ARM_GIC Antoine Tenart
2017-04-30 13:29 ` [U-Boot] [PATCH v4 07/11] uniphier: " Antoine Tenart
2017-04-30 13:29 ` [U-Boot] [PATCH v4 08/11] arm: psci: protect GIC specific code with ARM_GIC Antoine Tenart
2017-04-30 13:29 ` [U-Boot] [PATCH v4 09/11] sun5/7i: add an implementation of the psci suspend function Antoine Tenart
2017-05-01 21:13   ` Maxime Ripard
2017-05-02  7:04     ` Antoine Tenart
2017-05-02  7:23       ` Antoine Tenart
2017-05-02  7:27         ` Chen-Yu Tsai
2017-05-02  7:33           ` Maxime Ripard
2017-05-02  7:42             ` Antoine Tenart [this message]
2017-05-02  7:56       ` Maxime Ripard
2017-05-02  8:06         ` Antoine Tenart
2017-04-30 13:29 ` [U-Boot] [PATCH v4 10/11] sun5i: add defines used by the PSCI code Antoine Tenart
2017-04-30 13:29 ` [U-Boot] [PATCH v4 11/11] sun5i: boot in non-secure mode by default Antoine Tenart
2017-05-01 21:14   ` Maxime Ripard
2017-05-02  6:54     ` Antoine Tenart
2017-05-02  7:34       ` Maxime Ripard
2017-04-30 16:26 ` [U-Boot] [PATCH v4 00/11] sunxi: sun5/7i: add the psci suspend function Angus Ainslie
2017-04-30 16:49   ` Antoine Tenart
2017-04-30 23:26     ` Angus Ainslie
2017-05-02  7:14       ` Antoine Tenart

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=20170502074227.g43lqh32cbv2bezy@kwain \
    --to=antoine.tenart@free-electrons.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.