Hi

2009/10/12 akshay ts <taksh...@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.
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to