diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-08-18 16:54:26 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-08-18 16:54:26 -0400 |
commit | b9d030a123b6b7fbf262c995455197ea5184b497 (patch) | |
tree | 9e98829c9c79b4085c762fe6fa00c6bb6f49e8f6 /arch | |
parent | 435a71d9ef68b03343949c814986e01dae849763 (diff) | |
parent | 237674e050ae8ea40a432412df6c15d60b7ae8a6 (diff) |
Merge branch 'sh/for-2.6.31' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
* 'sh/for-2.6.31' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
sh: sh7724 ddr self-refresh changes
sh: use in-soc KEYSC on se7724
sh: CMT suspend/resume
sh: skip disabled LCDC channels
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sh/boards/mach-se/7724/setup.c | 9 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/shmobile/sleep.S | 70 |
2 files changed, 73 insertions, 6 deletions
diff --git a/arch/sh/boards/mach-se/7724/setup.c b/arch/sh/boards/mach-se/7724/setup.c index 8fed45a2fb85..15456a0773bf 100644 --- a/arch/sh/boards/mach-se/7724/setup.c +++ b/arch/sh/boards/mach-se/7724/setup.c | |||
@@ -238,7 +238,7 @@ static struct platform_device ceu1_device = { | |||
238 | }, | 238 | }, |
239 | }; | 239 | }; |
240 | 240 | ||
241 | /* KEYSC */ | 241 | /* KEYSC in SoC (Needs SW33-2 set to ON) */ |
242 | static struct sh_keysc_info keysc_info = { | 242 | static struct sh_keysc_info keysc_info = { |
243 | .mode = SH_KEYSC_MODE_1, | 243 | .mode = SH_KEYSC_MODE_1, |
244 | .scan_timing = 10, | 244 | .scan_timing = 10, |
@@ -255,12 +255,13 @@ static struct sh_keysc_info keysc_info = { | |||
255 | 255 | ||
256 | static struct resource keysc_resources[] = { | 256 | static struct resource keysc_resources[] = { |
257 | [0] = { | 257 | [0] = { |
258 | .start = 0x1a204000, | 258 | .name = "KEYSC", |
259 | .end = 0x1a20400f, | 259 | .start = 0x044b0000, |
260 | .end = 0x044b000f, | ||
260 | .flags = IORESOURCE_MEM, | 261 | .flags = IORESOURCE_MEM, |
261 | }, | 262 | }, |
262 | [1] = { | 263 | [1] = { |
263 | .start = IRQ0_KEY, | 264 | .start = 79, |
264 | .flags = IORESOURCE_IRQ, | 265 | .flags = IORESOURCE_IRQ, |
265 | }, | 266 | }, |
266 | }; | 267 | }; |
diff --git a/arch/sh/kernel/cpu/shmobile/sleep.S b/arch/sh/kernel/cpu/shmobile/sleep.S index 5d888ef53d82..baf2d7d46b05 100644 --- a/arch/sh/kernel/cpu/shmobile/sleep.S +++ b/arch/sh/kernel/cpu/shmobile/sleep.S | |||
@@ -26,8 +26,30 @@ ENTRY(sh_mobile_standby) | |||
26 | 26 | ||
27 | tst #SUSP_SH_SF, r0 | 27 | tst #SUSP_SH_SF, r0 |
28 | bt skip_set_sf | 28 | bt skip_set_sf |
29 | #ifdef CONFIG_CPU_SUBTYPE_SH7724 | ||
30 | /* DBSC: put memory in self-refresh mode */ | ||
29 | 31 | ||
30 | /* SDRAM: disable power down and put in self-refresh mode */ | 32 | mov.l dben_reg, r4 |
33 | mov.l dben_data0, r1 | ||
34 | mov.l r1, @r4 | ||
35 | |||
36 | mov.l dbrfpdn0_reg, r4 | ||
37 | mov.l dbrfpdn0_data0, r1 | ||
38 | mov.l r1, @r4 | ||
39 | |||
40 | mov.l dbcmdcnt_reg, r4 | ||
41 | mov.l dbcmdcnt_data0, r1 | ||
42 | mov.l r1, @r4 | ||
43 | |||
44 | mov.l dbcmdcnt_reg, r4 | ||
45 | mov.l dbcmdcnt_data1, r1 | ||
46 | mov.l r1, @r4 | ||
47 | |||
48 | mov.l dbrfpdn0_reg, r4 | ||
49 | mov.l dbrfpdn0_data1, r1 | ||
50 | mov.l r1, @r4 | ||
51 | #else | ||
52 | /* SBSC: disable power down and put in self-refresh mode */ | ||
31 | mov.l 1f, r4 | 53 | mov.l 1f, r4 |
32 | mov.l 2f, r1 | 54 | mov.l 2f, r1 |
33 | mov.l @r4, r2 | 55 | mov.l @r4, r2 |
@@ -35,6 +57,7 @@ ENTRY(sh_mobile_standby) | |||
35 | mov.l 3f, r3 | 57 | mov.l 3f, r3 |
36 | and r3, r2 | 58 | and r3, r2 |
37 | mov.l r2, @r4 | 59 | mov.l r2, @r4 |
60 | #endif | ||
38 | 61 | ||
39 | skip_set_sf: | 62 | skip_set_sf: |
40 | tst #SUSP_SH_SLEEP, r0 | 63 | tst #SUSP_SH_SLEEP, r0 |
@@ -84,7 +107,36 @@ done_sleep: | |||
84 | tst #SUSP_SH_SF, r0 | 107 | tst #SUSP_SH_SF, r0 |
85 | bt skip_restore_sf | 108 | bt skip_restore_sf |
86 | 109 | ||
87 | /* SDRAM: set auto-refresh mode */ | 110 | #ifdef CONFIG_CPU_SUBTYPE_SH7724 |
111 | /* DBSC: put memory in auto-refresh mode */ | ||
112 | |||
113 | mov.l dbrfpdn0_reg, r4 | ||
114 | mov.l dbrfpdn0_data0, r1 | ||
115 | mov.l r1, @r4 | ||
116 | |||
117 | /* sleep 140 ns */ | ||
118 | nop | ||
119 | nop | ||
120 | nop | ||
121 | nop | ||
122 | |||
123 | mov.l dbcmdcnt_reg, r4 | ||
124 | mov.l dbcmdcnt_data0, r1 | ||
125 | mov.l r1, @r4 | ||
126 | |||
127 | mov.l dbcmdcnt_reg, r4 | ||
128 | mov.l dbcmdcnt_data1, r1 | ||
129 | mov.l r1, @r4 | ||
130 | |||
131 | mov.l dben_reg, r4 | ||
132 | mov.l dben_data1, r1 | ||
133 | mov.l r1, @r4 | ||
134 | |||
135 | mov.l dbrfpdn0_reg, r4 | ||
136 | mov.l dbrfpdn0_data2, r1 | ||
137 | mov.l r1, @r4 | ||
138 | #else | ||
139 | /* SBSC: set auto-refresh mode */ | ||
88 | mov.l 1f, r4 | 140 | mov.l 1f, r4 |
89 | mov.l @r4, r2 | 141 | mov.l @r4, r2 |
90 | mov.l 4f, r3 | 142 | mov.l 4f, r3 |
@@ -98,15 +150,29 @@ done_sleep: | |||
98 | add r4, r3 | 150 | add r4, r3 |
99 | or r2, r3 | 151 | or r2, r3 |
100 | mov.l r3, @r1 | 152 | mov.l r3, @r1 |
153 | #endif | ||
101 | skip_restore_sf: | 154 | skip_restore_sf: |
102 | rts | 155 | rts |
103 | nop | 156 | nop |
104 | 157 | ||
105 | .balign 4 | 158 | .balign 4 |
159 | #ifdef CONFIG_CPU_SUBTYPE_SH7724 | ||
160 | dben_reg: .long 0xfd000010 /* DBEN */ | ||
161 | dben_data0: .long 0 | ||
162 | dben_data1: .long 1 | ||
163 | dbrfpdn0_reg: .long 0xfd000040 /* DBRFPDN0 */ | ||
164 | dbrfpdn0_data0: .long 0 | ||
165 | dbrfpdn0_data1: .long 1 | ||
166 | dbrfpdn0_data2: .long 0x00010000 | ||
167 | dbcmdcnt_reg: .long 0xfd000014 /* DBCMDCNT */ | ||
168 | dbcmdcnt_data0: .long 2 | ||
169 | dbcmdcnt_data1: .long 4 | ||
170 | #else | ||
106 | 1: .long 0xfe400008 /* SDCR0 */ | 171 | 1: .long 0xfe400008 /* SDCR0 */ |
107 | 2: .long 0x00000400 | 172 | 2: .long 0x00000400 |
108 | 3: .long 0xffff7fff | 173 | 3: .long 0xffff7fff |
109 | 4: .long 0xfffffbff | 174 | 4: .long 0xfffffbff |
175 | #endif | ||
110 | 5: .long 0xa4150020 /* STBCR */ | 176 | 5: .long 0xa4150020 /* STBCR */ |
111 | 6: .long 0xfe40001c /* RTCOR */ | 177 | 6: .long 0xfe40001c /* RTCOR */ |
112 | 7: .long 0xfe400018 /* RTCNT */ | 178 | 7: .long 0xfe400018 /* RTCNT */ |