[PATCH] cpuidle: kirkwood: Move out of mach directory, add DT.
Andrew Lunn
andrew at lunn.ch
Fri Dec 28 12:28:07 EST 2012
> 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.
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.
Andrew
More information about the linux-arm-kernel
mailing list