[PATCH 3/4] at91 : remove wait_for_interrupt definition
From: Russell King - ARM Linux <hidden>
Date: 2012-01-25 00:18:58
On Wed, Jan 25, 2012 at 12:56:07AM +0100, Daniel Lezcano wrote:
All the "wait_for_interrupt" definition are aliases to cpu_do_idle.
Only the rm9200 has an asm routine to switch to wfi. But the cpu_do_idle
for this platform has exactly the same asm routine.
arch/arm/mm/proc-arm920.S
...
ENTRY(cpu_arm920_do_idle)
mcr p15, 0, r0, c7, c0, 4 @ Wait for interrupt
...
Then it is safe to invoke cpu_do_idle for this platform.No it is not. Please read Nicolas' post: http://lists.arm.linux.org.uk/lurker/message/20120112.144129.827ae490.en.html and think about what "DWB is needed before putting SDRAM into self-refresh because any subsequent access to SDRAM will force it to resume from self-refresh state" means. Consider that if you _branch_ somewhere else, you _could_ cause a cache line fetch, which will have to come from SDRAM.
From Nicolas' post, it's pretty clear to me that the AT91RM9200 requires
carefully crafted assembly which can't be separated in this way to work, which I mostly supplied in this mail: http://lists.arm.linux.org.uk/lurker/message/20120109.144443.3626e5a6.en.html