All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maxime Ripard <maxime.ripard@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:56:19 +0200	[thread overview]
Message-ID: <20170502075619.gwkyfb6qtjwqoeyv@lukather> (raw)
In-Reply-To: <20170502070418.i4rgphoqfx46dhrz@kwain>

On Tue, May 02, 2017 at 09:04:18AM +0200, Antoine Tenart wrote:
> Hi Maxime,
> 
> 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_enter_idle(struct sunxi_ccm_reg *ccm)
> > > +{
> > > +	/* switch cpuclk to osc24m */
> > > +	clrsetbits_le32(&ccm->cpu_ahb_apb0_cfg, 0x3 << CPU_CLK_SRC_SHIFT,
> > > +			CPU_CLK_SRC_OSC24M << CPU_CLK_SRC_SHIFT);
> > > +
> > > +	/* disable pll1 */
> > > +	clrbits_le32(&ccm->pll1_cfg, CCM_PLL1_CTRL_EN);
> > > +
> > > +#ifndef CONFIG_MACH_SUN7I
> > > +	/*
> > > +	 * Switch cpuclk to losc. Based on my experience this didn't worked for
> > > +	 * sun7i, hence the ifndef.
> > > +	 */
> > > +	clrbits_le32(&ccm->cpu_ahb_apb0_cfg, 0x3 << CPU_CLK_SRC_SHIFT);
> > > +#endif
> > 
> > Do we enter idle per-core, or is it a cluster-wide state?
> 
> This is cluster-wise, as sunxi_clock_enter_idle() is only called when
> all CPU are in IDLE state (called the PSCI suspend function). See
> psci_cpu_suspend().

Hmm, ok. That's still a bit weird. The clock documentation says that
you should wait 8 cycles when you reparent, which is something you're
not doing. Maybe that can be the issue.

Maxime

-- 
Maxime Ripard, 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/035c13eb/attachment.sig>

  parent reply	other threads:[~2017-05-02  7:56 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
2017-05-02  7:56       ` Maxime Ripard [this message]
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=20170502075619.gwkyfb6qtjwqoeyv@lukather \
    --to=maxime.ripard@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.