public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: alexandre.belloni@free-electrons.com (Alexandre Belloni)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] power/reset: at91-poweroff: timely shitdown LPDDR memories
Date: Thu, 13 Oct 2016 13:03:17 +0200	[thread overview]
Message-ID: <20161013110317.ee6by6njrvs53ztx@piout.net> (raw)
In-Reply-To: <CACh+v5NCxPb_U8HOeczHicCD-Wp8BqBzvc1LtCzmEXZ74Cgshw@mail.gmail.com>

On 12/10/2016 at 14:48:27 +0200, Jean-Jacques Hiblot wrote :
> > +static void at91_lpddr_poweroff(void)
> > +{
> > +       asm volatile(
> > +               /* Align to cache lines */
> > +               ".balign 32\n\t"
> > +
> > +               "       ldr     r6, [%2, #" __stringify(AT91_SHDW_CR) "]\n\t"
> At first sight, it looks useless. I assume it's used to preload the
> TLB before the LPDDR is turned off.
> A comment to explain why this line is useful would prevent its removal.

Yes, this is the case. I can add a comment.

Anyway, I would prefer the whole thing to run from SRAM, as a PIE
instead of relying on the cache.

> > +       ddr_type = readl(mpddrc_base + AT91_DDRSDRC_MDR) & AT91_DDRSDRC_MD;
> > +       if ((ddr_type == AT91_DDRSDRC_MD_LPDDR2) ||
> > +           (ddr_type == AT91_DDRSDRC_MD_LPDDR3))
> Souldn't there be something like "pm_power_off = at91_lpddr_poweroff;" here ?
> 

Indeed


-- 
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

  reply	other threads:[~2016-10-13 11:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-07 16:34 [PATCH 0/2] ARM: at91: properly handle LPDDR poweroff Alexandre Belloni
2016-10-07 16:34 ` [PATCH 1/2] ARM: at91: define LPDDR types Alexandre Belloni
2016-10-07 16:34 ` [PATCH 2/2] power/reset: at91-poweroff: timely shitdown LPDDR memories Alexandre Belloni
2016-10-12 12:48   ` Jean-Jacques Hiblot
2016-10-13 11:03     ` Alexandre Belloni [this message]
2016-10-13 12:27       ` Jean-Jacques Hiblot
2016-10-13 12:39         ` Richard Genoud
2016-10-13 13:47         ` Alexandre Belloni
2016-10-13 15:04           ` Jean-Jacques Hiblot
2016-10-10  6:00 ` [PATCH 0/2] ARM: at91: properly handle LPDDR poweroff Alexander Stein
2016-10-12 11:17   ` Alexandre Belloni

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=20161013110317.ee6by6njrvs53ztx@piout.net \
    --to=alexandre.belloni@free-electrons.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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