Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Idle processing for ARMv7-based Qualcomm SoCs. |
| 3 | * |
| 4 | * Copyright (C) 2007 Google, Inc. |
Pratik Patel | 17f3b82 | 2011-11-21 12:41:47 -0800 | [diff] [blame] | 5 | * Copyright (c) 2007-2009, 2011-2012 Code Aurora Forum. All rights reserved. |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 6 | * |
| 7 | * This software is licensed under the terms of the GNU General Public |
| 8 | * License version 2, as published by the Free Software Foundation, and |
| 9 | * may be copied, distributed, and modified under those terms. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
| 15 | * |
| 16 | */ |
| 17 | |
| 18 | #include <linux/linkage.h> |
| 19 | #include <linux/threads.h> |
| 20 | #include <asm/assembler.h> |
| 21 | |
Steve Muckle | fcece05 | 2012-02-18 20:09:58 -0800 | [diff] [blame] | 22 | #include "idle.h" |
Murali Nalajala | 73c1333 | 2012-05-15 11:30:59 +0530 | [diff] [blame] | 23 | #include "idle-macros.S" |
Steve Muckle | fcece05 | 2012-02-18 20:09:58 -0800 | [diff] [blame] | 24 | |
Maheshkumar Sivasubramanian | fa1d0dd | 2011-07-26 16:02:55 -0600 | [diff] [blame] | 25 | #ifdef CONFIG_ARCH_MSM_KRAIT |
| 26 | #define SCM_SVC_BOOT 0x1 |
| 27 | #define SCM_CMD_TERMINATE_PC 0x2 |
| 28 | #endif |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 29 | |
| 30 | ENTRY(msm_arch_idle) |
Stepan Moskovchenko | ae920e7 | 2012-07-03 19:10:44 -0700 | [diff] [blame] | 31 | #ifdef CONFIG_ARCH_MSM_KRAIT |
| 32 | mrc p15, 0, r0, c0, c0, 0 |
| 33 | bic r1, r0, #0xff |
| 34 | movw r2, #0x0400 |
| 35 | movt r2, #0x511F |
| 36 | movw r3, #0x0600 |
| 37 | movt r3, #0x510F |
| 38 | cmp r2, r1 |
| 39 | cmpne r3, r1 |
| 40 | bne go_wfi |
| 41 | |
| 42 | mrs r0, cpsr |
| 43 | cpsid if |
| 44 | |
| 45 | mrc p15, 7, r1, c15, c0, 5 |
| 46 | bic r2, r1, #0x20000 |
| 47 | mcr p15, 7, r2, c15, c0, 5 |
| 48 | isb |
| 49 | |
| 50 | go_wfi: |
| 51 | wfi |
| 52 | bne wfi_done |
| 53 | mcr p15, 7, r1, c15, c0, 5 |
| 54 | isb |
| 55 | msr cpsr_c, r0 |
| 56 | |
| 57 | wfi_done: |
| 58 | bx lr |
| 59 | #else |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 60 | wfi |
Pratik Patel | cbcc1f0 | 2011-11-08 12:58:00 -0800 | [diff] [blame] | 61 | #ifdef CONFIG_ARCH_MSM8X60 |
| 62 | mrc p14, 1, r1, c1, c5, 4 /* read ETM PDSR to clear sticky bit */ |
| 63 | mrc p14, 0, r1, c1, c5, 4 /* read DBG PRSR to clear sticky bit */ |
| 64 | isb |
| 65 | #endif |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 66 | bx lr |
Stepan Moskovchenko | ae920e7 | 2012-07-03 19:10:44 -0700 | [diff] [blame] | 67 | #endif |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 68 | |
| 69 | ENTRY(msm_pm_collapse) |
| 70 | #if defined(CONFIG_MSM_FIQ_SUPPORT) |
| 71 | cpsid f |
| 72 | #endif |
| 73 | |
Steve Muckle | fcece05 | 2012-02-18 20:09:58 -0800 | [diff] [blame] | 74 | ldr r0, =msm_saved_state /* address of msm_saved_state ptr */ |
| 75 | ldr r0, [r0] /* load ptr */ |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 76 | #if (NR_CPUS >= 2) |
| 77 | mrc p15, 0, r1, c0, c0, 5 /* MPIDR */ |
| 78 | ands r1, r1, #15 /* What CPU am I */ |
Mahesh Sivasubramanian | 0ff37e7 | 2011-12-15 14:12:31 -0700 | [diff] [blame] | 79 | mov r2, #CPU_SAVED_STATE_SIZE |
| 80 | mul r1, r1, r2 |
| 81 | add r0, r0, r1 |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 82 | #endif |
| 83 | |
| 84 | stmia r0!, {r4-r14} |
| 85 | mrc p15, 0, r1, c1, c0, 0 /* MMU control */ |
| 86 | mrc p15, 0, r2, c2, c0, 0 /* TTBR0 */ |
| 87 | mrc p15, 0, r3, c3, c0, 0 /* dacr */ |
| 88 | #ifdef CONFIG_ARCH_MSM_SCORPION |
| 89 | /* This instruction is not valid for non scorpion processors */ |
| 90 | mrc p15, 3, r4, c15, c0, 3 /* L2CR1 is the L2 cache control reg 1 */ |
| 91 | #endif |
| 92 | mrc p15, 0, r5, c10, c2, 0 /* PRRR */ |
| 93 | mrc p15, 0, r6, c10, c2, 1 /* NMRR */ |
| 94 | mrc p15, 0, r7, c1, c0, 1 /* ACTLR */ |
| 95 | mrc p15, 0, r8, c2, c0, 1 /* TTBR1 */ |
| 96 | mrc p15, 0, r9, c13, c0, 3 /* TPIDRURO */ |
| 97 | mrc p15, 0, ip, c13, c0, 1 /* context ID */ |
| 98 | stmia r0!, {r1-r9, ip} |
| 99 | #ifdef CONFIG_MSM_CPU_AVS |
| 100 | mrc p15, 7, r1, c15, c1, 7 /* AVSCSR is the Adaptive Voltage Scaling |
| 101 | * Control and Status Register */ |
| 102 | mrc p15, 7, r2, c15, c0, 6 /* AVSDSCR is the Adaptive Voltage |
| 103 | * Scaling Delay Synthesizer Control |
| 104 | * Register */ |
| 105 | #ifndef CONFIG_ARCH_MSM_KRAIT |
| 106 | mrc p15, 7, r3, c15, c1, 0 /* TSCSR is the Temperature Status and |
| 107 | * Control Register |
| 108 | */ |
| 109 | #endif |
| 110 | |
| 111 | stmia r0!, {r1-r3} |
| 112 | #endif |
| 113 | |
Pratik Patel | 17f3b82 | 2011-11-21 12:41:47 -0800 | [diff] [blame] | 114 | #ifdef CONFIG_MSM_JTAG |
| 115 | bl msm_jtag_save_state |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 116 | #endif |
Maheshkumar Sivasubramanian | a012e09 | 2011-08-18 10:13:03 -0600 | [diff] [blame] | 117 | |
| 118 | ldr r0, =msm_pm_flush_l2_flag |
| 119 | ldr r0, [r0] |
| 120 | mov r1, #0 |
| 121 | mcr p15, 2, r1, c0, c0, 0 /*CCSELR*/ |
Maheshkumar Sivasubramanian | 1d2b69c | 2011-11-17 10:26:09 -0700 | [diff] [blame] | 122 | isb |
Maheshkumar Sivasubramanian | a012e09 | 2011-08-18 10:13:03 -0600 | [diff] [blame] | 123 | mrc p15, 1, r1, c0, c0, 0 /*CCSIDR*/ |
| 124 | mov r2, #1 |
| 125 | and r1, r2, r1, ASR #30 /* Check if the cache is write back */ |
| 126 | orr r1, r0, r1 |
| 127 | cmp r1, #1 |
| 128 | bne skip |
| 129 | bl v7_flush_dcache_all |
Steve Muckle | fcece05 | 2012-02-18 20:09:58 -0800 | [diff] [blame] | 130 | skip: |
Maheshkumar Sivasubramanian | fa1d0dd | 2011-07-26 16:02:55 -0600 | [diff] [blame] | 131 | #ifdef CONFIG_ARCH_MSM_KRAIT |
| 132 | ldr r0, =SCM_SVC_BOOT |
| 133 | ldr r1, =SCM_CMD_TERMINATE_PC |
Maheshkumar Sivasubramanian | 1658841 | 2011-10-13 12:16:23 -0600 | [diff] [blame] | 134 | ldr r2, =msm_pm_flush_l2_flag |
| 135 | ldr r2, [r2] |
Maheshkumar Sivasubramanian | fa1d0dd | 2011-07-26 16:02:55 -0600 | [diff] [blame] | 136 | bl scm_call_atomic1 |
| 137 | #else |
Stepan Moskovchenko | 34dc00f | 2012-01-28 19:31:41 -0800 | [diff] [blame] | 138 | mrc p15, 0, r4, c1, c0, 0 /* read current CR */ |
| 139 | bic r0, r4, #(1 << 2) /* clear dcache bit */ |
| 140 | bic r0, r0, #(1 << 12) /* clear icache bit */ |
| 141 | mcr p15, 0, r0, c1, c0, 0 /* disable d/i cache */ |
Murali Nalajala | 73c1333 | 2012-05-15 11:30:59 +0530 | [diff] [blame] | 142 | isb |
Stepan Moskovchenko | 34dc00f | 2012-01-28 19:31:41 -0800 | [diff] [blame] | 143 | |
Murali Nalajala | 73c1333 | 2012-05-15 11:30:59 +0530 | [diff] [blame] | 144 | SUSPEND_8x25_L2 |
Murali Nalajala | 93f2999 | 2012-03-21 15:59:27 +0530 | [diff] [blame] | 145 | SET_SMP_COHERENCY OFF |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 146 | wfi |
Murali Nalajala | 3a6de24 | 2012-05-11 15:05:35 +0530 | [diff] [blame] | 147 | DELAY_8x25 300 |
Stepan Moskovchenko | 34dc00f | 2012-01-28 19:31:41 -0800 | [diff] [blame] | 148 | |
Maheshkumar Sivasubramanian | fa1d0dd | 2011-07-26 16:02:55 -0600 | [diff] [blame] | 149 | mcr p15, 0, r4, c1, c0, 0 /* restore d/i cache */ |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 150 | isb |
Murali Nalajala | 73c1333 | 2012-05-15 11:30:59 +0530 | [diff] [blame] | 151 | ENABLE_8x25_L2 /* enable only l2, no need to restore the reg back */ |
Murali Nalajala | 93f2999 | 2012-03-21 15:59:27 +0530 | [diff] [blame] | 152 | SET_SMP_COHERENCY ON |
Murali Nalajala | 73c1333 | 2012-05-15 11:30:59 +0530 | [diff] [blame] | 153 | #endif |
| 154 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 155 | #if defined(CONFIG_MSM_FIQ_SUPPORT) |
| 156 | cpsie f |
| 157 | #endif |
Pratik Patel | 17f3b82 | 2011-11-21 12:41:47 -0800 | [diff] [blame] | 158 | #ifdef CONFIG_MSM_JTAG |
| 159 | bl msm_jtag_restore_state |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 160 | #endif |
Steve Muckle | fcece05 | 2012-02-18 20:09:58 -0800 | [diff] [blame] | 161 | ldr r0, =msm_saved_state /* address of msm_saved_state ptr */ |
| 162 | ldr r0, [r0] /* load ptr */ |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 163 | #if (NR_CPUS >= 2) |
| 164 | mrc p15, 0, r1, c0, c0, 5 /* MPIDR */ |
| 165 | ands r1, r1, #15 /* What CPU am I */ |
Praveen Chidambaram | 4b1e6f0 | 2012-02-11 16:17:30 -0700 | [diff] [blame] | 166 | mov r2, #CPU_SAVED_STATE_SIZE |
| 167 | mul r2, r2, r1 |
| 168 | add r0, r0, r2 |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 169 | #endif |
Steve Muckle | fcece05 | 2012-02-18 20:09:58 -0800 | [diff] [blame] | 170 | ldmfd r0, {r4-r14} /* restore registers */ |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 171 | mov r0, #0 /* return power collapse failed */ |
| 172 | bx lr |
| 173 | |
| 174 | ENTRY(msm_pm_collapse_exit) |
| 175 | #if 0 /* serial debug */ |
| 176 | mov r0, #0x80000016 |
| 177 | mcr p15, 0, r0, c15, c2, 4 |
| 178 | mov r0, #0xA9000000 |
| 179 | add r0, r0, #0x00A00000 /* UART1 */ |
| 180 | /*add r0, r0, #0x00C00000*/ /* UART3 */ |
| 181 | mov r1, #'A' |
| 182 | str r1, [r0, #0x00C] |
| 183 | #endif |
Steve Muckle | fcece05 | 2012-02-18 20:09:58 -0800 | [diff] [blame] | 184 | ldr r1, =msm_saved_state_phys |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 185 | ldr r2, =msm_pm_collapse_exit |
| 186 | adr r3, msm_pm_collapse_exit |
| 187 | add r1, r1, r3 |
| 188 | sub r1, r1, r2 |
Steve Muckle | fcece05 | 2012-02-18 20:09:58 -0800 | [diff] [blame] | 189 | ldr r1, [r1] |
Mahesh Sivasubramanian | 0ff37e7 | 2011-12-15 14:12:31 -0700 | [diff] [blame] | 190 | add r1, r1, #CPU_SAVED_STATE_SIZE |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 191 | #if (NR_CPUS >= 2) |
| 192 | mrc p15, 0, r2, c0, c0, 5 /* MPIDR */ |
| 193 | ands r2, r2, #15 /* What CPU am I */ |
Mahesh Sivasubramanian | 0ff37e7 | 2011-12-15 14:12:31 -0700 | [diff] [blame] | 194 | mov r3, #CPU_SAVED_STATE_SIZE |
| 195 | mul r2, r2, r3 |
| 196 | add r1, r1, r2 |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 197 | #endif |
| 198 | |
| 199 | #ifdef CONFIG_MSM_CPU_AVS |
| 200 | ldmdb r1!, {r2-r4} |
| 201 | #ifndef CONFIG_ARCH_MSM_KRAIT |
| 202 | mcr p15, 7, r4, c15, c1, 0 /* TSCSR */ |
| 203 | #endif |
| 204 | mcr p15, 7, r3, c15, c0, 6 /* AVSDSCR */ |
| 205 | mcr p15, 7, r2, c15, c1, 7 /* AVSCSR */ |
| 206 | #endif |
| 207 | ldmdb r1!, {r2-r11} |
| 208 | mcr p15, 0, r4, c3, c0, 0 /* dacr */ |
| 209 | mcr p15, 0, r3, c2, c0, 0 /* TTBR0 */ |
| 210 | #ifdef CONFIG_ARCH_MSM_SCORPION |
| 211 | /* This instruction is not valid for non scorpion processors */ |
| 212 | mcr p15, 3, r5, c15, c0, 3 /* L2CR1 */ |
| 213 | #endif |
| 214 | mcr p15, 0, r6, c10, c2, 0 /* PRRR */ |
| 215 | mcr p15, 0, r7, c10, c2, 1 /* NMRR */ |
| 216 | mcr p15, 0, r8, c1, c0, 1 /* ACTLR */ |
| 217 | mcr p15, 0, r9, c2, c0, 1 /* TTBR1 */ |
| 218 | mcr p15, 0, r10, c13, c0, 3 /* TPIDRURO */ |
| 219 | mcr p15, 0, r11, c13, c0, 1 /* context ID */ |
| 220 | isb |
| 221 | ldmdb r1!, {r4-r14} |
| 222 | ldr r0, =msm_pm_pc_pgd |
| 223 | ldr r1, =msm_pm_collapse_exit |
| 224 | adr r3, msm_pm_collapse_exit |
| 225 | add r0, r0, r3 |
| 226 | sub r0, r0, r1 |
| 227 | ldr r0, [r0] |
| 228 | mrc p15, 0, r1, c2, c0, 0 /* save current TTBR0 */ |
| 229 | and r3, r1, #0x7f /* mask to get TTB flags */ |
| 230 | orr r0, r0, r3 /* add TTB flags to switch TTBR value */ |
| 231 | mcr p15, 0, r0, c2, c0, 0 /* temporary switch TTBR0 */ |
| 232 | isb |
| 233 | mcr p15, 0, r2, c1, c0, 0 /* MMU control */ |
| 234 | isb |
| 235 | msm_pm_mapped_pa: |
| 236 | /* Switch to virtual */ |
| 237 | ldr r0, =msm_pm_pa_to_va |
| 238 | mov pc, r0 |
| 239 | msm_pm_pa_to_va: |
| 240 | mcr p15, 0, r1, c2, c0, 0 /* restore TTBR0 */ |
| 241 | isb |
| 242 | mcr p15, 0, r3, c8, c7, 0 /* UTLBIALL */ |
| 243 | mcr p15, 0, r3, c7, c5, 6 /* BPIALL */ |
| 244 | dsb |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 245 | isb |
Murali Nalajala | 93f2999 | 2012-03-21 15:59:27 +0530 | [diff] [blame] | 246 | |
Stepan Moskovchenko | 6fd9c92 | 2011-12-08 18:15:05 -0800 | [diff] [blame] | 247 | #ifdef CONFIG_ARCH_MSM_KRAIT |
| 248 | mrc p15, 0, r1, c0, c0, 0 |
| 249 | ldr r3, =0xff00fc00 |
| 250 | and r3, r1, r3 |
| 251 | ldr r1, =0x51000400 |
| 252 | cmp r3, r1 |
| 253 | mrceq p15, 7, r3, c15, c0, 2 |
| 254 | biceq r3, r3, #0x400 |
| 255 | mcreq p15, 7, r3, c15, c0, 2 |
Murali Nalajala | 73c1333 | 2012-05-15 11:30:59 +0530 | [diff] [blame] | 256 | #else |
| 257 | RESUME_8x25_L2 |
| 258 | SET_SMP_COHERENCY ON |
Stepan Moskovchenko | 6fd9c92 | 2011-12-08 18:15:05 -0800 | [diff] [blame] | 259 | #endif |
Murali Nalajala | 73c1333 | 2012-05-15 11:30:59 +0530 | [diff] [blame] | 260 | |
Pratik Patel | 17f3b82 | 2011-11-21 12:41:47 -0800 | [diff] [blame] | 261 | #ifdef CONFIG_MSM_JTAG |
Steve Muckle | c1421e3 | 2012-03-26 11:05:06 -0700 | [diff] [blame] | 262 | stmfd sp!, {lr} |
Pratik Patel | 17f3b82 | 2011-11-21 12:41:47 -0800 | [diff] [blame] | 263 | bl msm_jtag_restore_state |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 264 | ldmfd sp!, {lr} |
Steve Muckle | c1421e3 | 2012-03-26 11:05:06 -0700 | [diff] [blame] | 265 | #endif |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 266 | mov r0, #1 |
| 267 | bx lr |
| 268 | nop |
| 269 | nop |
| 270 | nop |
| 271 | nop |
| 272 | nop |
| 273 | 1: b 1b |
| 274 | |
| 275 | ENTRY(msm_pm_boot_entry) |
| 276 | mrc p15, 0, r0, c0, c0, 5 /* MPIDR */ |
| 277 | and r0, r0, #15 /* what CPU am I */ |
| 278 | |
| 279 | ldr r1, =msm_pm_boot_vector |
| 280 | ldr r2, =msm_pm_boot_entry |
| 281 | adr r3, msm_pm_boot_entry |
| 282 | add r1, r1, r3 /* translate virt to phys addr */ |
| 283 | sub r1, r1, r2 |
| 284 | |
| 285 | add r1, r1, r0, LSL #2 /* locate boot vector for our cpu */ |
| 286 | ldr pc, [r1] /* jump */ |
| 287 | |
Maheshkumar Sivasubramanian | a012e09 | 2011-08-18 10:13:03 -0600 | [diff] [blame] | 288 | ENTRY(msm_pm_set_l2_flush_flag) |
| 289 | ldr r1, =msm_pm_flush_l2_flag |
| 290 | str r0, [r1] |
| 291 | bx lr |
| 292 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 293 | .data |
| 294 | |
| 295 | .globl msm_pm_pc_pgd |
| 296 | msm_pm_pc_pgd: |
| 297 | .long 0x0 |
| 298 | |
Steve Muckle | fcece05 | 2012-02-18 20:09:58 -0800 | [diff] [blame] | 299 | .globl msm_saved_state |
| 300 | msm_saved_state: |
| 301 | .long 0x0 |
| 302 | |
| 303 | .globl msm_saved_state_phys |
| 304 | msm_saved_state_phys: |
| 305 | .long 0x0 |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 306 | |
Steve Muckle | c25a936 | 2012-03-22 16:40:01 -0700 | [diff] [blame] | 307 | .globl msm_pm_boot_vector |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 308 | msm_pm_boot_vector: |
| 309 | .space 4 * NR_CPUS |
Maheshkumar Sivasubramanian | a012e09 | 2011-08-18 10:13:03 -0600 | [diff] [blame] | 310 | |
Murali Nalajala | 93f2999 | 2012-03-21 15:59:27 +0530 | [diff] [blame] | 311 | .globl target_type |
| 312 | target_type: |
| 313 | .long 0x0 |
| 314 | |
Murali Nalajala | 73c1333 | 2012-05-15 11:30:59 +0530 | [diff] [blame] | 315 | .globl apps_power_collapse |
| 316 | apps_power_collapse: |
| 317 | .long 0x0 |
| 318 | |
| 319 | .globl l2x0_base_addr |
| 320 | l2x0_base_addr: |
| 321 | .long 0x0 |
| 322 | |
Maheshkumar Sivasubramanian | a012e09 | 2011-08-18 10:13:03 -0600 | [diff] [blame] | 323 | /* |
| 324 | * Default the l2 flush flag to 1 so that caches are flushed during power |
| 325 | * collapse unless the L2 driver decides to flush them only during L2 |
| 326 | * Power collapse. |
| 327 | */ |
| 328 | msm_pm_flush_l2_flag: |
| 329 | .long 0x1 |
Murali Nalajala | 73c1333 | 2012-05-15 11:30:59 +0530 | [diff] [blame] | 330 | |
| 331 | /* |
| 332 | * Save & restore l2x0 registers while system is entering and resuming |
| 333 | * from Power Collapse. |
| 334 | * 1. aux_ctrl_save (0x0) |
| 335 | * 2. data_latency_ctrl (0x4) |
| 336 | * 3. prefetch control (0x8) |
| 337 | */ |
| 338 | l2x0_saved_ctrl_reg_val: |
| 339 | .space 4 * 3 |