ARM: pm: omap34xx: remove misleading comment and use of r9
[pandora-kernel.git] / arch / arm / mach-omap2 / sleep34xx.S
index 63f1066..12e9da2 100644 (file)
@@ -133,7 +133,7 @@ ENDPROC(enable_omap3630_toggle_l2_on_restore)
 /* Function to call rom code to save secure ram context */
        .align  3
 ENTRY(save_secure_ram_context)
-       stmfd   sp!, {r1-r12, lr}       @ save registers on stack
+       stmfd   sp!, {r4 - r11, lr}     @ save registers on stack
        adr     r3, api_params          @ r3 points to parameters
        str     r0, [r3,#0x4]           @ r0 has sdram address
        ldr     r12, high_mask
@@ -152,7 +152,7 @@ ENTRY(save_secure_ram_context)
        nop
        nop
        nop
-       ldmfd   sp!, {r1-r12, pc}
+       ldmfd   sp!, {r4 - r11, pc}
        .align
 sram_phy_addr_mask:
        .word   SRAM_BASE_P
@@ -187,7 +187,7 @@ ENTRY(save_secure_ram_context_sz)
  */
        .align  3
 ENTRY(omap34xx_cpu_suspend)
-       stmfd   sp!, {r0-r12, lr}       @ save registers on stack
+       stmfd   sp!, {r4 - r11, lr}     @ save registers on stack
 
        /*
         * r0 contains CPU context save/restore pointer in sdram
@@ -329,7 +329,7 @@ omap3_do_wfi:
  * == Exit point from non-OFF modes ==
  * ===================================
  */
-       ldmfd   sp!, {r0-r12, pc}       @ restore regs and return
+       ldmfd   sp!, {r4 - r11, pc}     @ restore regs and return
 
 
 /*
@@ -381,18 +381,13 @@ restore_3630:
 
 restore:
        /*
-        * Check what was the reason for mpu reset and store the reason in r9:
-        *  0 - No context lost
-        *  1 - Only L1 and logic lost
-        *  2 - Only L2 lost - In this case, we wont be here
-        *  3 - Both L1 and L2 lost
+        * Read the pwstctrl register to check the reason for mpu reset.
+        * This tells us what was lost.
         */
        ldr     r1, pm_pwstctrl_mpu
        ldr     r2, [r1]
        and     r2, r2, #0x3
        cmp     r2, #0x0        @ Check if target power state was OFF or RET
-       moveq   r9, #0x3        @ MPU OFF => L1 and L2 lost
-       movne   r9, #0x1        @ Only L1 and L2 lost => avoid L2 invalidation
        bne     logic_l1_restore
 
        ldr     r0, l2dis_3630
@@ -572,7 +567,7 @@ usettbr0:
  * ==============================
  */
 restoremmu_on:
-       ldmfd   sp!, {r0-r12, pc}       @ restore regs and return
+       ldmfd   sp!, {r4 - r11, pc}     @ restore regs and return
 
 
 /*