From: Santosh Shilimkar <santosh.shilimkar-l0cyMroinI0@public.gmane.org>
To: Andrew Lunn <andrew-g2DYL2Zd6BY@public.gmane.org>
Cc: len.brown-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
Jason Cooper <jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org>,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
rafael.j.wysocki-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
linux ARM
<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>
Subject: Re: [PATCH] cpuidle: kirkwood: Move out of mach directory, add DT.
Date: Fri, 28 Dec 2012 23:20:35 +0530 [thread overview]
Message-ID: <50DDDBEB.3000002@ti.com> (raw)
In-Reply-To: <20121228172807.GA7578-g2DYL2Zd6BY@public.gmane.org>
On Friday 28 December 2012 10:58 PM, Andrew Lunn wrote:
>> Putting DDR/SDRAM into self refresh means, you no longer have RAM
>> available to execute and any code CPU needs to execute after that has
>> to be executed either from lock down cache with no cache evictions or
>> from some internal on chip memory with caches disabled to avoid accesses
>> to DDR. Not sure how below code works if the first writel puts DDR into
>> self refresh. Is cpu_do_idle() code copied to some internal memory ?
>>
>> + writel(0x7, ddr_operation_base);
>> + cpu_do_idle();
>>
>> May be I am missing something but i have worked on such a code for OMAP3
>> kind of devices and seen major issues with DDR self refresh and CPU
>> entering into idle state.
>
> Quoting the datasheet:
>
> To place the SDRAM into self refresh set the <Cmd> field in the
> SDRAM Operation Register (Table 174 p. 400) to 0x7. The SDRAM
> controller waits for 256 cycles and then generates a self refresh
> command to SDRAM, and clears the SDRAM Operation register.
>
Thanks for additional info.
> I assume we always manage to execute the WFI within these 256 cycles.
>
> There is also some text about handling new pending transactions, so
> even if it does not WFI, e.g. because of an interrupts, it seems to do
> the right thing.
>
Is this single CPU or multi-cpu machine ? Even though the cpu_do_idle()
has just couple of instructions, there can be lot more happening in
background especially with multi masters system. It might be safe if the
single CPU is the only master accessing DDR. In multi-master, multi-CPU
scenario though it can't work reliably.
Regards
Santosh
next prev parent reply other threads:[~2012-12-28 17:50 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-28 12:47 [PATCH] cpuidle: kirkwood: Move out of mach directory, add DT Andrew Lunn
[not found] ` <1356698844-4220-1-git-send-email-andrew-g2DYL2Zd6BY@public.gmane.org>
2012-12-28 14:18 ` Rob Herring
[not found] ` <50DDAA42.2020101-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-12-28 14:35 ` Andrew Lunn
[not found] ` <20121228143517.GA5172-g2DYL2Zd6BY@public.gmane.org>
2012-12-28 14:55 ` Rob Herring
[not found] ` <50DDB2E3.103-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-12-28 15:49 ` Andrew Lunn
[not found] ` <20121228154927.GC5172-g2DYL2Zd6BY@public.gmane.org>
2012-12-28 16:14 ` Rob Herring
[not found] ` <50DDC54A.3020509-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-12-28 16:38 ` Andrew Lunn
[not found] ` <20121228163815.GD5172-g2DYL2Zd6BY@public.gmane.org>
2012-12-28 16:59 ` Rob Herring
2012-12-28 16:56 ` Santosh Shilimkar
[not found] ` <50DDCF47.1030305-l0cyMroinI0@public.gmane.org>
2012-12-28 17:28 ` Andrew Lunn
[not found] ` <20121228172807.GA7578-g2DYL2Zd6BY@public.gmane.org>
2012-12-28 17:50 ` Santosh Shilimkar [this message]
[not found] ` <50DDDBEB.3000002-l0cyMroinI0@public.gmane.org>
2012-12-28 17:56 ` Andrew Lunn
[not found] ` <20121228175618.GC7578-g2DYL2Zd6BY@public.gmane.org>
2012-12-28 18:02 ` Santosh Shilimkar
2013-02-08 21:34 ` Grant Likely
2013-02-10 18:58 ` Andrew Lunn
2013-02-11 11:41 ` Grant Likely
2012-12-28 14:32 ` Florian Fainelli
[not found] ` <50DDAD68.4090704-p3rKhJxN3npAfugRpC6u6w@public.gmane.org>
2012-12-28 14:37 ` Andrew Lunn
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=50DDDBEB.3000002@ti.com \
--to=santosh.shilimkar-l0cymroini0@public.gmane.org \
--cc=andrew-g2DYL2Zd6BY@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org \
--cc=len.brown-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=rafael.j.wysocki-ral2JQCrhuEAvxtiuMwx3w@public.gmane.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;
as well as URLs for NNTP newsgroup(s).