[U-Boot] CPU Sleep in ARM Cortex A8

Magnus Lilja lilja.magnus at gmail.com
Mon Oct 12 14:28:17 CEST 2009


Hi

2009/10/12 akshay ts <takshays at yahoo.co.in>:
> Hi,
> I want to know what is the instruction for sleeping in ARM Cortex A8.
> I did execute a WFI instruction seems to be a NOP.
> void cpu_idle()
> {
>    unsigned long tmp = 0;
>    asm("b 1f\n\t"
>            ".align 5\n\t"
>            "1:\n\t"
>            "mcr p15, 0, %0, c7, c10, 5\n\t"
>            "mcr p15, 0, %0, c7, c10, 4\n\t"
>            "mcr p15, 0, %0, c7, c0, 4" :: "r" (tmp));
>    return;
> }
> The above function doesnt seem to work.
> Please let me know exact instructions to follow.

Well, the idle-code in Linux looks like:
/*
 *      cpu_v7_do_idle()
 *
 *      Idle the processor (eg, wait for interrupt).
 *
 *      IRQs are already disabled.
 */
ENTRY(cpu_v7_do_idle)
        dsb                                     @ WFI may enter a low-power mode
        wfi
        mov     pc, lr
ENDPROC(cpu_v7_do_idle)

So you may want to try that instead.


More information about the U-Boot mailing list