diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-16 22:03:06 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-16 22:03:06 -0400 |
commit | 16d8775700f1815076f879719ce14b33f50a3171 (patch) | |
tree | 8525e6e6f12b6acf7cf2746853cc65549f3dbf4c /arch/arm/plat-s3c24xx | |
parent | e34551339a195aa548eaf698523714a8fe7f1984 (diff) | |
parent | 05e34754518b6a90d5c392790c032575fab12d66 (diff) |
Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (91 commits)
ARM: 6806/1: irq: introduce entry and exit functions for chained handlers
ARM: 6781/1: Thumb-2: Work around buggy Thumb-2 short branch relocations in gas
ARM: 6747/1: P2V: Thumb2 support
ARM: 6798/1: aout-core: zero thread debug registers in a.out core dump
ARM: 6796/1: Footbridge: Fix I/O mappings for NOMMU mode
ARM: 6784/1: errata: no automatic Store Buffer drain on Cortex-A9
ARM: 6772/1: errata: possible fault MMU translations following an ASID switch
ARM: 6776/1: mach-ux500: activate fix for errata 753970
ARM: 6794/1: SPEAr: Append UL to device address macros.
ARM: 6793/1: SPEAr: Remove unused *_SIZE macros from spear*.h files
ARM: 6792/1: SPEAr: Replace SIZE macro's with SZ_4K macros
ARM: 6791/1: SPEAr3xx: Declare device structures after shirq code
ARM: 6790/1: SPEAr: Clock Framework: Rename usbd clock and align apb_clk entry
ARM: 6789/1: SPEAr3xx: Rename sdio to sdhci
ARM: 6788/1: SPEAr: Include mach/hardware.h instead of mach/spear.h
ARM: 6787/1: SPEAr: Reorder #includes in .h & .c files.
ARM: 6681/1: SPEAr: add debugfs support to clk API
ARM: 6703/1: SPEAr: update clk API support
ARM: 6679/1: SPEAr: make clk API functions more generic
ARM: 6737/1: SPEAr: formalized timer support
...
Diffstat (limited to 'arch/arm/plat-s3c24xx')
-rw-r--r-- | arch/arm/plat-s3c24xx/sleep.S | 57 |
1 files changed, 4 insertions, 53 deletions
diff --git a/arch/arm/plat-s3c24xx/sleep.S b/arch/arm/plat-s3c24xx/sleep.S index e73e3b6e88d2..fd7032f84ae7 100644 --- a/arch/arm/plat-s3c24xx/sleep.S +++ b/arch/arm/plat-s3c24xx/sleep.S | |||
@@ -44,23 +44,13 @@ | |||
44 | /* s3c_cpu_save | 44 | /* s3c_cpu_save |
45 | * | 45 | * |
46 | * entry: | 46 | * entry: |
47 | * r0 = save address (virtual addr of s3c_sleep_save_phys) | 47 | * r1 = v:p offset |
48 | */ | 48 | */ |
49 | 49 | ||
50 | ENTRY(s3c_cpu_save) | 50 | ENTRY(s3c_cpu_save) |
51 | stmfd sp!, { r4 - r12, lr } | 51 | stmfd sp!, { r4 - r12, lr } |
52 | 52 | ldr r3, =resume_with_mmu | |
53 | @@ store co-processor registers | 53 | bl cpu_suspend |
54 | |||
55 | mrc p15, 0, r4, c13, c0, 0 @ PID | ||
56 | mrc p15, 0, r5, c3, c0, 0 @ Domain ID | ||
57 | mrc p15, 0, r6, c2, c0, 0 @ translation table base address | ||
58 | mrc p15, 0, r7, c1, c0, 0 @ control register | ||
59 | |||
60 | stmia r0, { r4 - r13 } | ||
61 | |||
62 | @@ write our state back to RAM | ||
63 | bl s3c_pm_cb_flushcache | ||
64 | 54 | ||
65 | @@ jump to final code to send system to sleep | 55 | @@ jump to final code to send system to sleep |
66 | ldr r0, =pm_cpu_sleep | 56 | ldr r0, =pm_cpu_sleep |
@@ -76,20 +66,6 @@ resume_with_mmu: | |||
76 | 66 | ||
77 | .ltorg | 67 | .ltorg |
78 | 68 | ||
79 | @@ the next bits sit in the .data segment, even though they | ||
80 | @@ happen to be code... the s3c_sleep_save_phys needs to be | ||
81 | @@ accessed by the resume code before it can restore the MMU. | ||
82 | @@ This means that the variable has to be close enough for the | ||
83 | @@ code to read it... since the .text segment needs to be RO, | ||
84 | @@ the data segment can be the only place to put this code. | ||
85 | |||
86 | .data | ||
87 | |||
88 | .global s3c_sleep_save_phys | ||
89 | s3c_sleep_save_phys: | ||
90 | .word 0 | ||
91 | |||
92 | |||
93 | /* sleep magic, to allow the bootloader to check for an valid | 69 | /* sleep magic, to allow the bootloader to check for an valid |
94 | * image to resume to. Must be the first word before the | 70 | * image to resume to. Must be the first word before the |
95 | * s3c_cpu_resume entry. | 71 | * s3c_cpu_resume entry. |
@@ -100,10 +76,6 @@ s3c_sleep_save_phys: | |||
100 | /* s3c_cpu_resume | 76 | /* s3c_cpu_resume |
101 | * | 77 | * |
102 | * resume code entry for bootloader to call | 78 | * resume code entry for bootloader to call |
103 | * | ||
104 | * we must put this code here in the data segment as we have no | ||
105 | * other way of restoring the stack pointer after sleep, and we | ||
106 | * must not write to the code segment (code is read-only) | ||
107 | */ | 79 | */ |
108 | 80 | ||
109 | ENTRY(s3c_cpu_resume) | 81 | ENTRY(s3c_cpu_resume) |
@@ -134,25 +106,4 @@ ENTRY(s3c_cpu_resume) | |||
134 | beq 1001b | 106 | beq 1001b |
135 | #endif /* CONFIG_DEBUG_RESUME */ | 107 | #endif /* CONFIG_DEBUG_RESUME */ |
136 | 108 | ||
137 | mov r1, #0 | 109 | b cpu_resume |
138 | mcr p15, 0, r1, c8, c7, 0 @@ invalidate I & D TLBs | ||
139 | mcr p15, 0, r1, c7, c7, 0 @@ invalidate I & D caches | ||
140 | |||
141 | ldr r0, s3c_sleep_save_phys @ address of restore block | ||
142 | ldmia r0, { r4 - r13 } | ||
143 | |||
144 | mcr p15, 0, r4, c13, c0, 0 @ PID | ||
145 | mcr p15, 0, r5, c3, c0, 0 @ Domain ID | ||
146 | mcr p15, 0, r6, c2, c0, 0 @ translation table base | ||
147 | |||
148 | #ifdef CONFIG_DEBUG_RESUME | ||
149 | mov r3, #'R' | ||
150 | strb r3, [ r2, #S3C2410_UTXH ] | ||
151 | #endif | ||
152 | |||
153 | ldr r2, =resume_with_mmu | ||
154 | mcr p15, 0, r7, c1, c0, 0 @ turn on MMU, etc | ||
155 | nop @ second-to-last before mmu | ||
156 | mov pc, r2 @ go back to virtual address | ||
157 | |||
158 | .ltorg | ||