aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorJean Pihet <j-pihet@ti.com>2010-12-18 10:44:41 -0500
committerKevin Hilman <khilman@deeprootsystems.com>2010-12-21 17:45:54 -0500
commitd3cdfd2a15d87d040a5f553231b979fbc28b98e7 (patch)
tree1c1208e8e15a782768170766b23d9276c6141699 /arch/arm
parentcc1b6028878646a2419b27e5f590b5e9fe01dc3d (diff)
OMAP3: remove unused code from the ASM sleep code
Remove unused code: - macros, - variables, - unused semaphore locking API. This API shall be added back when needed, - infinite loops for debug. Tested on N900 and Beagleboard with full RET and OFF modes, using cpuidle and suspend. Signed-off-by: Jean Pihet <j-pihet@ti.com> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Reviewed-by: Nishanth Menon <nm@ti.com> Tested-by: Nishanth Menon<nm@ti.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-omap2/pm.h1
-rw-r--r--arch/arm/mach-omap2/sleep34xx.S58
2 files changed, 6 insertions, 53 deletions
diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h
index b4e66f9e1945..c04f7b50e26f 100644
--- a/arch/arm/mach-omap2/pm.h
+++ b/arch/arm/mach-omap2/pm.h
@@ -80,7 +80,6 @@ extern void save_secure_ram_context(u32 *addr);
80extern void omap3_save_scratchpad_contents(void); 80extern void omap3_save_scratchpad_contents(void);
81 81
82extern unsigned int omap24xx_idle_loop_suspend_sz; 82extern unsigned int omap24xx_idle_loop_suspend_sz;
83extern unsigned int omap34xx_suspend_sz;
84extern unsigned int save_secure_ram_context_sz; 83extern unsigned int save_secure_ram_context_sz;
85extern unsigned int omap24xx_cpu_suspend_sz; 84extern unsigned int omap24xx_cpu_suspend_sz;
86extern unsigned int omap34xx_cpu_suspend_sz; 85extern unsigned int omap34xx_cpu_suspend_sz;
diff --git a/arch/arm/mach-omap2/sleep34xx.S b/arch/arm/mach-omap2/sleep34xx.S
index 50887c75a3b8..8fa9dfe813ed 100644
--- a/arch/arm/mach-omap2/sleep34xx.S
+++ b/arch/arm/mach-omap2/sleep34xx.S
@@ -35,11 +35,7 @@
35 35
36#define SDRC_SCRATCHPAD_SEM_V 0xfa00291c 36#define SDRC_SCRATCHPAD_SEM_V 0xfa00291c
37 37
38#define PM_PREPWSTST_CORE_V OMAP34XX_PRM_REGADDR(CORE_MOD, \
39 OMAP3430_PM_PREPWSTST)
40#define PM_PREPWSTST_CORE_P 0x48306AE8 38#define PM_PREPWSTST_CORE_P 0x48306AE8
41#define PM_PREPWSTST_MPU_V OMAP34XX_PRM_REGADDR(MPU_MOD, \
42 OMAP3430_PM_PREPWSTST)
43#define PM_PWSTCTRL_MPU_P OMAP3430_PRM_BASE + MPU_MOD + OMAP2_PM_PWSTCTRL 39#define PM_PWSTCTRL_MPU_P OMAP3430_PRM_BASE + MPU_MOD + OMAP2_PM_PWSTCTRL
44#define CM_IDLEST1_CORE_V OMAP34XX_CM_REGADDR(CORE_MOD, CM_IDLEST1) 40#define CM_IDLEST1_CORE_V OMAP34XX_CM_REGADDR(CORE_MOD, CM_IDLEST1)
45#define CM_IDLEST_CKGEN_V OMAP34XX_CM_REGADDR(PLL_MOD, CM_IDLEST) 41#define CM_IDLEST_CKGEN_V OMAP34XX_CM_REGADDR(PLL_MOD, CM_IDLEST)
@@ -62,36 +58,10 @@
62#define SDRC_DLLA_STATUS_V OMAP34XX_SDRC_REGADDR(SDRC_DLLA_STATUS) 58#define SDRC_DLLA_STATUS_V OMAP34XX_SDRC_REGADDR(SDRC_DLLA_STATUS)
63#define SDRC_DLLA_CTRL_V OMAP34XX_SDRC_REGADDR(SDRC_DLLA_CTRL) 59#define SDRC_DLLA_CTRL_V OMAP34XX_SDRC_REGADDR(SDRC_DLLA_CTRL)
64 60
65 .text 61
66/* Function to acquire the semaphore in scratchpad */ 62/*
67ENTRY(lock_scratchpad_sem) 63 * API functions
68 stmfd sp!, {lr} @ save registers on stack 64 */
69wait_sem:
70 mov r0,#1
71 ldr r1, sdrc_scratchpad_sem
72wait_loop:
73 ldr r2, [r1] @ load the lock value
74 cmp r2, r0 @ is the lock free ?
75 beq wait_loop @ not free...
76 swp r2, r0, [r1] @ semaphore free so lock it and proceed
77 cmp r2, r0 @ did we succeed ?
78 beq wait_sem @ no - try again
79 ldmfd sp!, {pc} @ restore regs and return
80sdrc_scratchpad_sem:
81 .word SDRC_SCRATCHPAD_SEM_V
82ENTRY(lock_scratchpad_sem_sz)
83 .word . - lock_scratchpad_sem
84
85 .text
86/* Function to release the scratchpad semaphore */
87ENTRY(unlock_scratchpad_sem)
88 stmfd sp!, {lr} @ save registers on stack
89 ldr r3, sdrc_scratchpad_sem
90 mov r2,#0
91 str r2,[r3]
92 ldmfd sp!, {pc} @ restore regs and return
93ENTRY(unlock_scratchpad_sem_sz)
94 .word . - unlock_scratchpad_sem
95 65
96 .text 66 .text
97/* Function call to get the restore pointer for resume from OFF */ 67/* Function call to get the restore pointer for resume from OFF */
@@ -178,8 +148,7 @@ ENTRY(es3_sdrc_fix_sz)
178/* Function to call rom code to save secure ram context */ 148/* Function to call rom code to save secure ram context */
179ENTRY(save_secure_ram_context) 149ENTRY(save_secure_ram_context)
180 stmfd sp!, {r1-r12, lr} @ save registers on stack 150 stmfd sp!, {r1-r12, lr} @ save registers on stack
181save_secure_ram_debug: 151
182 /* b save_secure_ram_debug */ @ enable to debug save code
183 adr r3, api_params @ r3 points to parameters 152 adr r3, api_params @ r3 points to parameters
184 str r0, [r3,#0x4] @ r0 has sdram address 153 str r0, [r3,#0x4] @ r0 has sdram address
185 ldr r12, high_mask 154 ldr r12, high_mask
@@ -219,8 +188,7 @@ ENTRY(save_secure_ram_context_sz)
219 */ 188 */
220ENTRY(omap34xx_cpu_suspend) 189ENTRY(omap34xx_cpu_suspend)
221 stmfd sp!, {r0-r12, lr} @ save registers on stack 190 stmfd sp!, {r0-r12, lr} @ save registers on stack
222loop: 191
223 /*b loop*/ @Enable to debug by stepping through code
224 /* r0 contains restore pointer in sdram */ 192 /* r0 contains restore pointer in sdram */
225 /* r1 contains information about saving context */ 193 /* r1 contains information about saving context */
226 ldr r4, sdrc_power @ read the SDRC_POWER register 194 ldr r4, sdrc_power @ read the SDRC_POWER register
@@ -252,7 +220,6 @@ loop:
252 220
253 ldmfd sp!, {r0-r12, pc} @ restore regs and return 221 ldmfd sp!, {r0-r12, pc} @ restore regs and return
254restore_es3: 222restore_es3:
255 /*b restore_es3*/ @ Enable to debug restore code
256 ldr r5, pm_prepwstst_core_p 223 ldr r5, pm_prepwstst_core_p
257 ldr r4, [r5] 224 ldr r4, [r5]
258 and r4, r4, #0x3 225 and r4, r4, #0x3
@@ -272,7 +239,6 @@ copy_to_sram:
272 b restore 239 b restore
273 240
274restore_3630: 241restore_3630:
275 /*b restore_es3630*/ @ Enable to debug restore code
276 ldr r1, pm_prepwstst_core_p 242 ldr r1, pm_prepwstst_core_p
277 ldr r2, [r1] 243 ldr r2, [r1]
278 and r2, r2, #0x3 244 and r2, r2, #0x3
@@ -284,7 +250,6 @@ restore_3630:
284 str r2, [r1] 250 str r2, [r1]
285 /* Fall thru for the remaining logic */ 251 /* Fall thru for the remaining logic */
286restore: 252restore:
287 /* b restore*/ @ Enable to debug restore code
288 /* Check what was the reason for mpu reset and store the reason in r9*/ 253 /* Check what was the reason for mpu reset and store the reason in r9*/
289 /* 1 - Only L1 and logic lost */ 254 /* 1 - Only L1 and logic lost */
290 /* 2 - Only L2 lost - In this case, we wont be here */ 255 /* 2 - Only L2 lost - In this case, we wont be here */
@@ -493,7 +458,6 @@ usettbr0:
493 458
494 ldmfd sp!, {r0-r12, pc} @ restore regs and return 459 ldmfd sp!, {r0-r12, pc} @ restore regs and return
495save_context_wfi: 460save_context_wfi:
496 /*b save_context_wfi*/ @ enable to debug save code
497 mov r8, r0 /* Store SDRAM address in r8 */ 461 mov r8, r0 /* Store SDRAM address in r8 */
498 mrc p15, 0, r5, c1, c0, 1 @ Read Auxiliary Control Register 462 mrc p15, 0, r5, c1, c0, 1 @ Read Auxiliary Control Register
499 mov r4, #0x1 @ Number of parameters for restore call 463 mov r4, #0x1 @ Number of parameters for restore call
@@ -673,12 +637,8 @@ sdrc_dlla_status:
673 .word SDRC_DLLA_STATUS_V 637 .word SDRC_DLLA_STATUS_V
674sdrc_dlla_ctrl: 638sdrc_dlla_ctrl:
675 .word SDRC_DLLA_CTRL_V 639 .word SDRC_DLLA_CTRL_V
676pm_prepwstst_core:
677 .word PM_PREPWSTST_CORE_V
678pm_prepwstst_core_p: 640pm_prepwstst_core_p:
679 .word PM_PREPWSTST_CORE_P 641 .word PM_PREPWSTST_CORE_P
680pm_prepwstst_mpu:
681 .word PM_PREPWSTST_MPU_V
682pm_pwstctrl_mpu: 642pm_pwstctrl_mpu:
683 .word PM_PWSTCTRL_MPU_P 643 .word PM_PWSTCTRL_MPU_P
684scratchpad_base: 644scratchpad_base:
@@ -687,12 +647,6 @@ sram_base:
687 .word SRAM_BASE_P + 0x8000 647 .word SRAM_BASE_P + 0x8000
688sdrc_power: 648sdrc_power:
689 .word SDRC_POWER_V 649 .word SDRC_POWER_V
690clk_stabilize_delay:
691 .word 0x000001FF
692assoc_mask:
693 .word 0x3ff
694numset_mask:
695 .word 0x7fff
696ttbrbit_mask: 650ttbrbit_mask:
697 .word 0xFFFFC000 651 .word 0xFFFFC000
698table_index_mask: 652table_index_mask: