diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-05 17:44:13 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-05 17:44:13 -0400 |
commit | 930b440cd8256f3861bdb0a59d26efaadac7941a (patch) | |
tree | 145ac54e152834fed7bce78b3eb33e8ea4d90226 /arch/arm/mach-shmobile/include/mach | |
parent | ff050ad12c551233e546506409c89eb2f640d9f3 (diff) | |
parent | 077492acceeafc0a106f88b0780623d2321a8947 (diff) |
Merge tag 'boards-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC board changes from Arnd Bergmann:
"As we continue to replace board files with device tree descriptions,
this part of the ARM support is getting smaller. We have basically
just defconfig changes here this time, and a significant number of
Renesas shmobile changes, as Renesas is still in the process of
deprecating board file support"
* tag 'boards-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (92 commits)
ARM: enable fhandle in multi_v7_defconfig
ARM: tegra: enable fhandle in tegra_defconfig
ARM: update multi_v7_defconfig for Tegra
ARM: add Marvell Dove and some drivers to multi_v7 defconfig
ARM: fix duplicate symbols in multi_v5_defconfig
ARM: pxa: add gpio keys information
ARM: tegra: defconfig updates
ARM: config: keystone: enable AEMIF/NAND support
ARM: qcom: Enable basic support for Qualcomm platforms in multi_v7_defconfig
ARM: kirkwood: Add HP T5325 devices to {multi|mvebu}_v5_defconfig
ARM: config: Add mvebu_v5_defconfig
ARM: config: Add a multi_v5_defconfig
ARM: shmobile: r7s72100: update defconfig for I2C usage
ARM: shmobile: Remove Lager DT reference legacy clock bits
ARM: shmobile: Remove Koelsch DT reference legacy clock bits
ARM: shmobile: Remove KZM9D board code
ARM: mvebu: update defconfigs for Armada 375 and 38x
ARM: dove: Enable watchdog support in the defconfig
ARM: mvebu: Enable watchdog support in defconfig
ARM: config: keystone: enable led support
...
Diffstat (limited to 'arch/arm/mach-shmobile/include/mach')
-rw-r--r-- | arch/arm/mach-shmobile/include/mach/head-kzm9g.txt | 410 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/include/mach/zboot.h | 3 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/include/mach/zboot_macros.h | 43 |
3 files changed, 456 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/include/mach/head-kzm9g.txt b/arch/arm/mach-shmobile/include/mach/head-kzm9g.txt new file mode 100644 index 000000000000..9531f46a822a --- /dev/null +++ b/arch/arm/mach-shmobile/include/mach/head-kzm9g.txt | |||
@@ -0,0 +1,410 @@ | |||
1 | LIST "KZM9G low-level initialization routine." | ||
2 | LIST "Adapted from u-boot KZM9G support code." | ||
3 | |||
4 | LIST "Copyright (C) 2013 Ulrich Hecht" | ||
5 | |||
6 | LIST "This program is free software; you can redistribute it and/or modify" | ||
7 | LIST "it under the terms of the GNU General Public License version 2 as" | ||
8 | LIST "published by the Free Software Foundation." | ||
9 | |||
10 | LIST "This program is distributed in the hope that it will be useful," | ||
11 | LIST "but WITHOUT ANY WARRANTY; without even the implied warranty of" | ||
12 | LIST "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the" | ||
13 | LIST "GNU General Public License for more details." | ||
14 | |||
15 | |||
16 | LIST "Register definitions:" | ||
17 | |||
18 | LIST "Secure control register" | ||
19 | #define LIFEC_SEC_SRC (0xE6110008) | ||
20 | |||
21 | LIST "RWDT" | ||
22 | #define RWDT_BASE (0xE6020000) | ||
23 | #define RWTCSRA0 (RWDT_BASE + 0x04) | ||
24 | |||
25 | LIST "HPB Semaphore Control Registers" | ||
26 | #define HPBSCR_BASE (0xE6000000) | ||
27 | #define HPBCTRL6 (HPBSCR_BASE + 0x1030) | ||
28 | |||
29 | #define SBSC1_BASE (0xFE400000) | ||
30 | #define SDCR0A (SBSC1_BASE + 0x0008) | ||
31 | #define SDCR1A (SBSC1_BASE + 0x000C) | ||
32 | #define SDPCRA (SBSC1_BASE + 0x0010) | ||
33 | #define SDCR0SA (SBSC1_BASE + 0x0018) | ||
34 | #define SDCR1SA (SBSC1_BASE + 0x001C) | ||
35 | #define RTCSRA (SBSC1_BASE + 0x0020) | ||
36 | #define RTCORA (SBSC1_BASE + 0x0028) | ||
37 | #define RTCORHA (SBSC1_BASE + 0x002C) | ||
38 | #define SDWCRC0A (SBSC1_BASE + 0x0040) | ||
39 | #define SDWCRC1A (SBSC1_BASE + 0x0044) | ||
40 | #define SDWCR00A (SBSC1_BASE + 0x0048) | ||
41 | #define SDWCR01A (SBSC1_BASE + 0x004C) | ||
42 | #define SDWCR10A (SBSC1_BASE + 0x0050) | ||
43 | #define SDWCR11A (SBSC1_BASE + 0x0054) | ||
44 | #define SDWCR2A (SBSC1_BASE + 0x0060) | ||
45 | #define SDWCRC2A (SBSC1_BASE + 0x0064) | ||
46 | #define ZQCCRA (SBSC1_BASE + 0x0068) | ||
47 | #define SDMRACR0A (SBSC1_BASE + 0x0084) | ||
48 | #define SDMRTMPCRA (SBSC1_BASE + 0x008C) | ||
49 | #define SDMRTMPMSKA (SBSC1_BASE + 0x0094) | ||
50 | #define SDGENCNTA (SBSC1_BASE + 0x009C) | ||
51 | #define SDDRVCR0A (SBSC1_BASE + 0x00B4) | ||
52 | #define DLLCNT0A (SBSC1_BASE + 0x0354) | ||
53 | |||
54 | #define SDMRA1 (0xFE500000) | ||
55 | #define SDMRA2 (0xFE5C0000) | ||
56 | #define SDMRA3 (0xFE504000) | ||
57 | |||
58 | #define SBSC2_BASE (0xFB400000) | ||
59 | #define SDCR0B (SBSC2_BASE + 0x0008) | ||
60 | #define SDCR1B (SBSC2_BASE + 0x000C) | ||
61 | #define SDPCRB (SBSC2_BASE + 0x0010) | ||
62 | #define SDCR0SB (SBSC2_BASE + 0x0018) | ||
63 | #define SDCR1SB (SBSC2_BASE + 0x001C) | ||
64 | #define RTCSRB (SBSC2_BASE + 0x0020) | ||
65 | #define RTCORB (SBSC2_BASE + 0x0028) | ||
66 | #define RTCORHB (SBSC2_BASE + 0x002C) | ||
67 | #define SDWCRC0B (SBSC2_BASE + 0x0040) | ||
68 | #define SDWCRC1B (SBSC2_BASE + 0x0044) | ||
69 | #define SDWCR00B (SBSC2_BASE + 0x0048) | ||
70 | #define SDWCR01B (SBSC2_BASE + 0x004C) | ||
71 | #define SDWCR10B (SBSC2_BASE + 0x0050) | ||
72 | #define SDWCR11B (SBSC2_BASE + 0x0054) | ||
73 | #define SDPDCR0B (SBSC2_BASE + 0x0058) | ||
74 | #define SDWCR2B (SBSC2_BASE + 0x0060) | ||
75 | #define SDWCRC2B (SBSC2_BASE + 0x0064) | ||
76 | #define ZQCCRB (SBSC2_BASE + 0x0068) | ||
77 | #define SDMRACR0B (SBSC2_BASE + 0x0084) | ||
78 | #define SDMRTMPCRB (SBSC2_BASE + 0x008C) | ||
79 | #define SDMRTMPMSKB (SBSC2_BASE + 0x0094) | ||
80 | #define SDGENCNTB (SBSC2_BASE + 0x009C) | ||
81 | #define DPHYCNT0B (SBSC2_BASE + 0x00A0) | ||
82 | #define DPHYCNT1B (SBSC2_BASE + 0x00A4) | ||
83 | #define DPHYCNT2B (SBSC2_BASE + 0x00A8) | ||
84 | #define SDDRVCR0B (SBSC2_BASE + 0x00B4) | ||
85 | #define DLLCNT0B (SBSC2_BASE + 0x0354) | ||
86 | |||
87 | #define SDMRB1 (0xFB500000) | ||
88 | #define SDMRB2 (0xFB5C0000) | ||
89 | #define SDMRB3 (0xFB504000) | ||
90 | |||
91 | #define CPG_BASE (0xE6150000) | ||
92 | #define FRQCRA (CPG_BASE + 0x0000) | ||
93 | #define FRQCRB (CPG_BASE + 0x0004) | ||
94 | #define FRQCRD (CPG_BASE + 0x00E4) | ||
95 | #define VCLKCR1 (CPG_BASE + 0x0008) | ||
96 | #define VCLKCR2 (CPG_BASE + 0x000C) | ||
97 | #define VCLKCR3 (CPG_BASE + 0x001C) | ||
98 | #define ZBCKCR (CPG_BASE + 0x0010) | ||
99 | #define FLCKCR (CPG_BASE + 0x0014) | ||
100 | #define SD0CKCR (CPG_BASE + 0x0074) | ||
101 | #define SD1CKCR (CPG_BASE + 0x0078) | ||
102 | #define SD2CKCR (CPG_BASE + 0x007C) | ||
103 | #define FSIACKCR (CPG_BASE + 0x0018) | ||
104 | #define SUBCKCR (CPG_BASE + 0x0080) | ||
105 | #define SPUACKCR (CPG_BASE + 0x0084) | ||
106 | #define SPUVCKCR (CPG_BASE + 0x0094) | ||
107 | #define MSUCKCR (CPG_BASE + 0x0088) | ||
108 | #define HSICKCR (CPG_BASE + 0x008C) | ||
109 | #define FSIBCKCR (CPG_BASE + 0x0090) | ||
110 | #define MFCK1CR (CPG_BASE + 0x0098) | ||
111 | #define MFCK2CR (CPG_BASE + 0x009C) | ||
112 | #define DSITCKCR (CPG_BASE + 0x0060) | ||
113 | #define DSI0PCKCR (CPG_BASE + 0x0064) | ||
114 | #define DSI1PCKCR (CPG_BASE + 0x0068) | ||
115 | #define DSI0PHYCR (CPG_BASE + 0x006C) | ||
116 | #define DVFSCR3 (CPG_BASE + 0x0174) | ||
117 | #define DVFSCR4 (CPG_BASE + 0x0178) | ||
118 | #define DVFSCR5 (CPG_BASE + 0x017C) | ||
119 | #define MPMODE (CPG_BASE + 0x00CC) | ||
120 | |||
121 | #define PLLECR (CPG_BASE + 0x00D0) | ||
122 | #define PLL0CR (CPG_BASE + 0x00D8) | ||
123 | #define PLL1CR (CPG_BASE + 0x0028) | ||
124 | #define PLL2CR (CPG_BASE + 0x002C) | ||
125 | #define PLL3CR (CPG_BASE + 0x00DC) | ||
126 | #define PLL0STPCR (CPG_BASE + 0x00F0) | ||
127 | #define PLL1STPCR (CPG_BASE + 0x00C8) | ||
128 | #define PLL2STPCR (CPG_BASE + 0x00F8) | ||
129 | #define PLL3STPCR (CPG_BASE + 0x00FC) | ||
130 | #define RMSTPCR0 (CPG_BASE + 0x0110) | ||
131 | #define RMSTPCR1 (CPG_BASE + 0x0114) | ||
132 | #define RMSTPCR2 (CPG_BASE + 0x0118) | ||
133 | #define RMSTPCR3 (CPG_BASE + 0x011C) | ||
134 | #define RMSTPCR4 (CPG_BASE + 0x0120) | ||
135 | #define RMSTPCR5 (CPG_BASE + 0x0124) | ||
136 | #define SMSTPCR0 (CPG_BASE + 0x0130) | ||
137 | #define SMSTPCR2 (CPG_BASE + 0x0138) | ||
138 | #define SMSTPCR3 (CPG_BASE + 0x013C) | ||
139 | #define CPGXXCR4 (CPG_BASE + 0x0150) | ||
140 | #define SRCR0 (CPG_BASE + 0x80A0) | ||
141 | #define SRCR2 (CPG_BASE + 0x80B0) | ||
142 | #define SRCR3 (CPG_BASE + 0x80A8) | ||
143 | #define VREFCR (CPG_BASE + 0x00EC) | ||
144 | #define PCLKCR (CPG_BASE + 0x1020) | ||
145 | |||
146 | #define PORT32CR (0xE6051020) | ||
147 | #define PORT33CR (0xE6051021) | ||
148 | #define PORT34CR (0xE6051022) | ||
149 | #define PORT35CR (0xE6051023) | ||
150 | |||
151 | LIST "DRAM initialization code:" | ||
152 | |||
153 | EW RWTCSRA0, 0xA507 | ||
154 | |||
155 | ED_AND LIFEC_SEC_SRC, 0xFFFF7FFF | ||
156 | |||
157 | ED_AND SMSTPCR3,0xFFFF7FFF | ||
158 | ED_AND SRCR3, 0xFFFF7FFF | ||
159 | ED_AND SMSTPCR2,0xFFFBFFFF | ||
160 | ED_AND SRCR2, 0xFFFBFFFF | ||
161 | ED PLLECR, 0x00000000 | ||
162 | |||
163 | WAIT_MASK PLLECR, 0x00000F00, 0x00000000 | ||
164 | WAIT_MASK FRQCRB, 0x80000000, 0x00000000 | ||
165 | |||
166 | ED PLL0CR, 0x2D000000 | ||
167 | ED PLL1CR, 0x17100000 | ||
168 | ED FRQCRB, 0x96235880 | ||
169 | WAIT_MASK FRQCRB, 0x80000000, 0x00000000 | ||
170 | |||
171 | ED FLCKCR, 0x0000000B | ||
172 | ED_AND SMSTPCR0, 0xFFFFFFFD | ||
173 | |||
174 | ED_AND SRCR0, 0xFFFFFFFD | ||
175 | ED 0xE6001628, 0x514 | ||
176 | ED 0xE6001648, 0x514 | ||
177 | ED 0xE6001658, 0x514 | ||
178 | ED 0xE6001678, 0x514 | ||
179 | |||
180 | ED DVFSCR4, 0x00092000 | ||
181 | ED DVFSCR5, 0x000000DC | ||
182 | ED PLLECR, 0x00000000 | ||
183 | WAIT_MASK PLLECR, 0x00000F00, 0x00000000 | ||
184 | |||
185 | ED FRQCRA, 0x0012453C | ||
186 | ED FRQCRB, 0x80431350 | ||
187 | WAIT_MASK FRQCRB, 0x80000000, 0x00000000 | ||
188 | ED FRQCRD, 0x00000B0B | ||
189 | WAIT_MASK FRQCRD, 0x80000000, 0x00000000 | ||
190 | |||
191 | ED PCLKCR, 0x00000003 | ||
192 | ED VCLKCR1, 0x0000012F | ||
193 | ED VCLKCR2, 0x00000119 | ||
194 | ED VCLKCR3, 0x00000119 | ||
195 | ED ZBCKCR, 0x00000002 | ||
196 | ED FLCKCR, 0x00000005 | ||
197 | ED SD0CKCR, 0x00000080 | ||
198 | ED SD1CKCR, 0x00000080 | ||
199 | ED SD2CKCR, 0x00000080 | ||
200 | ED FSIACKCR, 0x0000003F | ||
201 | ED FSIBCKCR, 0x0000003F | ||
202 | ED SUBCKCR, 0x00000080 | ||
203 | ED SPUACKCR, 0x0000000B | ||
204 | ED SPUVCKCR, 0x0000000B | ||
205 | ED MSUCKCR, 0x0000013F | ||
206 | ED HSICKCR, 0x00000080 | ||
207 | ED MFCK1CR, 0x0000003F | ||
208 | ED MFCK2CR, 0x0000003F | ||
209 | ED DSITCKCR, 0x00000107 | ||
210 | ED DSI0PCKCR, 0x00000313 | ||
211 | ED DSI1PCKCR, 0x0000130D | ||
212 | ED DSI0PHYCR, 0x2A800E0E | ||
213 | ED PLL0CR, 0x1E000000 | ||
214 | ED PLL0CR, 0x2D000000 | ||
215 | ED PLL1CR, 0x17100000 | ||
216 | ED PLL2CR, 0x27000080 | ||
217 | ED PLL3CR, 0x1D000000 | ||
218 | ED PLL0STPCR, 0x00080000 | ||
219 | ED PLL1STPCR, 0x000120C0 | ||
220 | ED PLL2STPCR, 0x00012000 | ||
221 | ED PLL3STPCR, 0x00000030 | ||
222 | ED PLLECR, 0x0000000B | ||
223 | WAIT_MASK PLLECR, 0x00000B00, 0x00000B00 | ||
224 | |||
225 | ED DVFSCR3, 0x000120F0 | ||
226 | ED MPMODE, 0x00000020 | ||
227 | ED VREFCR, 0x0000028A | ||
228 | ED RMSTPCR0, 0xE4628087 | ||
229 | ED RMSTPCR1, 0xFFFFFFFF | ||
230 | ED RMSTPCR2, 0x53FFFFFF | ||
231 | ED RMSTPCR3, 0xFFFFFFFF | ||
232 | ED RMSTPCR4, 0x00800D3D | ||
233 | ED RMSTPCR5, 0xFFFFF3FF | ||
234 | ED SMSTPCR2, 0x00000000 | ||
235 | ED SRCR2, 0x00040000 | ||
236 | ED_AND PLLECR, 0xFFFFFFF7 | ||
237 | WAIT_MASK PLLECR, 0x00000800, 0x00000000 | ||
238 | |||
239 | LIST "set SBSC operational" | ||
240 | ED HPBCTRL6, 0x00000001 | ||
241 | WAIT_MASK HPBCTRL6, 0x00000001, 0x00000001 | ||
242 | |||
243 | LIST "set SBSC operating frequency" | ||
244 | ED FRQCRD, 0x00001414 | ||
245 | WAIT_MASK FRQCRD, 0x80000000, 0x00000000 | ||
246 | ED PLL3CR, 0x1D000000 | ||
247 | ED_OR PLLECR, 0x00000008 | ||
248 | WAIT_MASK PLLECR, 0x00000800, 0x00000800 | ||
249 | |||
250 | LIST "enable DLL oscillation in DDRPHY" | ||
251 | ED_OR DLLCNT0A, 0x00000002 | ||
252 | |||
253 | LIST "wait >= 100 ns" | ||
254 | ED SDGENCNTA, 0x00000005 | ||
255 | WAIT_MASK SDGENCNTA, 0xFFFFFFFF, 0x00000000 | ||
256 | |||
257 | LIST "target LPDDR2 device settings" | ||
258 | ED SDCR0A, 0xACC90159 | ||
259 | ED SDCR1A, 0x00010059 | ||
260 | ED SDWCRC0A, 0x50874114 | ||
261 | ED SDWCRC1A, 0x33199B37 | ||
262 | ED SDWCRC2A, 0x008F2313 | ||
263 | ED SDWCR00A, 0x31020707 | ||
264 | ED SDWCR01A, 0x0017040A | ||
265 | ED SDWCR10A, 0x31020707 | ||
266 | ED SDWCR11A, 0x0017040A | ||
267 | |||
268 | ED SDDRVCR0A, 0x055557ff | ||
269 | |||
270 | ED SDWCR2A, 0x30000000 | ||
271 | |||
272 | LIST "drive CKE high" | ||
273 | ED_OR SDPCRA, 0x00000080 | ||
274 | WAIT_MASK SDPCRA, 0x00000080, 0x00000080 | ||
275 | |||
276 | LIST "wait >= 200 us" | ||
277 | ED SDGENCNTA, 0x00002710 | ||
278 | WAIT_MASK SDGENCNTA, 0xFFFFFFFF, 0x00000000 | ||
279 | |||
280 | LIST "issue reset command to LPDDR2 device" | ||
281 | ED SDMRACR0A, 0x0000003F | ||
282 | ED SDMRA1, 0x00000000 | ||
283 | |||
284 | LIST "wait >= 10 (or 1) us (docs inconsistent)" | ||
285 | ED SDGENCNTA, 0x000001F4 | ||
286 | WAIT_MASK SDGENCNTA, 0xFFFFFFFF, 0x00000000 | ||
287 | |||
288 | LIST "MRW ZS initialization calibration command" | ||
289 | ED SDMRACR0A, 0x0000FF0A | ||
290 | ED SDMRA3, 0x00000000 | ||
291 | |||
292 | LIST "wait >= 1 us" | ||
293 | ED SDGENCNTA, 0x00000032 | ||
294 | WAIT_MASK SDGENCNTA, 0xFFFFFFFF, 0x00000000 | ||
295 | |||
296 | LIST "specify operating mode in LPDDR2" | ||
297 | ED SDMRACR0A, 0x00002201 | ||
298 | ED SDMRA1, 0x00000000 | ||
299 | ED SDMRACR0A, 0x00000402 | ||
300 | ED SDMRA1, 0x00000000 | ||
301 | ED SDMRACR0A, 0x00000203 | ||
302 | ED SDMRA1, 0x00000000 | ||
303 | |||
304 | LIST "initialize DDR interface" | ||
305 | ED SDMRA2, 0x00000000 | ||
306 | |||
307 | LIST "temperature sensor control" | ||
308 | ED SDMRTMPCRA, 0x88800004 | ||
309 | ED SDMRTMPMSKA,0x00000004 | ||
310 | |||
311 | LIST "auto-refreshing control" | ||
312 | ED RTCORA, 0xA55A0032 | ||
313 | ED RTCORHA, 0xA55A000C | ||
314 | ED RTCSRA, 0xA55A2048 | ||
315 | |||
316 | ED_OR SDCR0A, 0x00000800 | ||
317 | ED_OR SDCR1A, 0x00000400 | ||
318 | |||
319 | LIST "auto ZQ calibration control" | ||
320 | ED ZQCCRA, 0xFFF20000 | ||
321 | |||
322 | ED_OR DLLCNT0B, 0x00000002 | ||
323 | ED SDGENCNTB, 0x00000005 | ||
324 | WAIT_MASK SDGENCNTB, 0xFFFFFFFF, 0x00000000 | ||
325 | |||
326 | ED SDCR0B, 0xACC90159 | ||
327 | ED SDCR1B, 0x00010059 | ||
328 | ED SDWCRC0B, 0x50874114 | ||
329 | ED SDWCRC1B, 0x33199B37 | ||
330 | ED SDWCRC2B, 0x008F2313 | ||
331 | ED SDWCR00B, 0x31020707 | ||
332 | ED SDWCR01B, 0x0017040A | ||
333 | ED SDWCR10B, 0x31020707 | ||
334 | ED SDWCR11B, 0x0017040A | ||
335 | ED SDDRVCR0B, 0x055557ff | ||
336 | ED SDWCR2B, 0x30000000 | ||
337 | ED_OR SDPCRB, 0x00000080 | ||
338 | WAIT_MASK SDPCRB, 0x00000080, 0x00000080 | ||
339 | |||
340 | ED SDGENCNTB, 0x00002710 | ||
341 | WAIT_MASK SDGENCNTB, 0xFFFFFFFF, 0x00000000 | ||
342 | ED SDMRACR0B, 0x0000003F | ||
343 | |||
344 | LIST "upstream u-boot writes to SDMRA1A for both SBSC 1 and 2, which does" | ||
345 | LIST "not seem to make a lot of sense..." | ||
346 | ED SDMRB1, 0x00000000 | ||
347 | |||
348 | ED SDGENCNTB, 0x000001F4 | ||
349 | WAIT_MASK SDGENCNTB, 0xFFFFFFFF, 0x00000000 | ||
350 | |||
351 | ED SDMRACR0B, 0x0000FF0A | ||
352 | ED SDMRB3, 0x00000000 | ||
353 | ED SDGENCNTB, 0x00000032 | ||
354 | WAIT_MASK SDGENCNTB, 0xFFFFFFFF, 0x00000000 | ||
355 | |||
356 | ED SDMRACR0B, 0x00002201 | ||
357 | ED SDMRB1, 0x00000000 | ||
358 | ED SDMRACR0B, 0x00000402 | ||
359 | ED SDMRB1, 0x00000000 | ||
360 | ED SDMRACR0B, 0x00000203 | ||
361 | ED SDMRB1, 0x00000000 | ||
362 | ED SDMRB2, 0x00000000 | ||
363 | ED SDMRTMPCRB, 0x88800004 | ||
364 | ED SDMRTMPMSKB, 0x00000004 | ||
365 | ED RTCORB, 0xA55A0032 | ||
366 | ED RTCORHB, 0xA55A000C | ||
367 | ED RTCSRB, 0xA55A2048 | ||
368 | ED_OR SDCR0B, 0x00000800 | ||
369 | ED_OR SDCR1B, 0x00000400 | ||
370 | ED ZQCCRB, 0xFFF20000 | ||
371 | ED_OR SDPDCR0B, 0x00030000 | ||
372 | ED DPHYCNT1B, 0xA5390000 | ||
373 | ED DPHYCNT0B, 0x00001200 | ||
374 | ED DPHYCNT1B, 0x07CE0000 | ||
375 | ED DPHYCNT0B, 0x00001247 | ||
376 | WAIT_MASK DPHYCNT2B, 0xFFFFFFFF, 0x07CE0000 | ||
377 | |||
378 | ED_AND SDPDCR0B, 0xFFFCFFFF | ||
379 | |||
380 | ED FRQCRD, 0x00000B0B | ||
381 | WAIT_MASK FRQCRD, 0x80000000, 0x00000000 | ||
382 | |||
383 | ED CPGXXCR4, 0xfffffffc | ||
384 | |||
385 | LIST "Setup SCIF4 / workaround" | ||
386 | EB PORT32CR, 0x12 | ||
387 | EB PORT33CR, 0x22 | ||
388 | EB PORT34CR, 0x12 | ||
389 | EB PORT35CR, 0x22 | ||
390 | |||
391 | EW 0xE6C80000, 0 | ||
392 | EB 0xE6C80004, 0x19 | ||
393 | EW 0xE6C80008, 0x0030 | ||
394 | EW 0xE6C80018, 0 | ||
395 | EW 0xE6C80030, 0x0014 | ||
396 | |||
397 | LIST "Magic to avoid hangs and corruption on DRAM writes." | ||
398 | |||
399 | LIST "It has been observed that the system would most often hang while" | ||
400 | LIST "decompressing the kernel, and if it didn't it would always write" | ||
401 | LIST "a corrupt image to DRAM." | ||
402 | LIST "This problem does not occur in u-boot, and the reason is that" | ||
403 | LIST "u-boot performs an additional cache invalidation after setting up" | ||
404 | LIST "the DRAM controller. Such an invalidation should not be necessary at" | ||
405 | LIST "this point, and attempts at removing parts of the routine to arrive" | ||
406 | LIST "at the minimal snippet of code necessary to avoid the DRAM stability" | ||
407 | LIST "problem yielded the following:" | ||
408 | |||
409 | MRC p15, 0, r0, c1, c0, 0 | ||
410 | MCR p15, 0, r0, c1, c0, 0 | ||
diff --git a/arch/arm/mach-shmobile/include/mach/zboot.h b/arch/arm/mach-shmobile/include/mach/zboot.h index c3c4669a2d72..727cc78ac8ec 100644 --- a/arch/arm/mach-shmobile/include/mach/zboot.h +++ b/arch/arm/mach-shmobile/include/mach/zboot.h | |||
@@ -12,6 +12,9 @@ | |||
12 | #ifdef CONFIG_MACH_MACKEREL | 12 | #ifdef CONFIG_MACH_MACKEREL |
13 | #define MEMORY_START 0x40000000 | 13 | #define MEMORY_START 0x40000000 |
14 | #include "mach/head-mackerel.txt" | 14 | #include "mach/head-mackerel.txt" |
15 | #elif defined(CONFIG_MACH_KZM9G) || defined(CONFIG_MACH_KZM9G_REFERENCE) | ||
16 | #define MEMORY_START 0x43000000 | ||
17 | #include "mach/head-kzm9g.txt" | ||
15 | #else | 18 | #else |
16 | #error "unsupported board." | 19 | #error "unsupported board." |
17 | #endif | 20 | #endif |
diff --git a/arch/arm/mach-shmobile/include/mach/zboot_macros.h b/arch/arm/mach-shmobile/include/mach/zboot_macros.h index aa6111fbc989..14fd3d538e9a 100644 --- a/arch/arm/mach-shmobile/include/mach/zboot_macros.h +++ b/arch/arm/mach-shmobile/include/mach/zboot_macros.h | |||
@@ -62,4 +62,47 @@ | |||
62 | 2 : | 62 | 2 : |
63 | .endm | 63 | .endm |
64 | 64 | ||
65 | /* loop until a given value has been read (with mask) */ | ||
66 | .macro WAIT_MASK, addr, data, cmp | ||
67 | LDR r0, 2f | ||
68 | LDR r1, 3f | ||
69 | LDR r2, 4f | ||
70 | 1: | ||
71 | LDR r3, [r0, #0] | ||
72 | AND r3, r1, r3 | ||
73 | CMP r2, r3 | ||
74 | BNE 1b | ||
75 | B 5f | ||
76 | 2: .long \addr | ||
77 | 3: .long \data | ||
78 | 4: .long \cmp | ||
79 | 5: | ||
80 | .endm | ||
81 | |||
82 | /* read 32-bit value from addr, "or" an immediate and write back */ | ||
83 | .macro ED_OR, addr, data | ||
84 | LDR r4, 1f | ||
85 | LDR r5, 2f | ||
86 | LDR r6, [r4] | ||
87 | ORR r5, r6, r5 | ||
88 | STR r5, [r4] | ||
89 | B 3f | ||
90 | 1: .long \addr | ||
91 | 2: .long \data | ||
92 | 3: | ||
93 | .endm | ||
94 | |||
95 | /* read 32-bit value from addr, "and" an immediate and write back */ | ||
96 | .macro ED_AND, addr, data | ||
97 | LDR r4, 1f | ||
98 | LDR r5, 2f | ||
99 | LDR r6, [r4] | ||
100 | AND r5, r6, r5 | ||
101 | STR r5, [r4] | ||
102 | B 3f | ||
103 | 1: .long \addr | ||
104 | 2: .long \data | ||
105 | 3: | ||
106 | .endm | ||
107 | |||
65 | #endif /* __ZBOOT_MACRO_H */ | 108 | #endif /* __ZBOOT_MACRO_H */ |