FreeCalypso > hg > ffs-editor
comparison src/cs/drivers/drv_app/ffs/board/dev.c @ 0:92470e5d0b9e
src: partial import from FC Selenite
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Fri, 15 May 2020 01:28:16 +0000 |
parents | |
children | 3ca9a198c6ee |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:92470e5d0b9e |
---|---|
1 /****************************************************************************** | |
2 * Flash File System (ffs) | |
3 * Idea, design and coding by Mads Meisner-Jensen, mmj@ti.com | |
4 * | |
5 * ffs flash device definitions | |
6 * | |
7 * $Id: dev.c 1.34.1.25 Thu, 18 Dec 2003 10:50:52 +0100 tsj $ | |
8 * | |
9 ******************************************************************************/ | |
10 | |
11 #include "ffs/ffs.h" | |
12 #include "ffs/board/drv.h" | |
13 #include "config/board.cfg" | |
14 #include "config/rf.cfg" | |
15 #include "config/fc-target.h" | |
16 | |
17 /****************************************************************************** | |
18 | |
19 Flash memories supported: | |
20 | |
21 The real flash device names are listed in the Device column. The names of | |
22 compatible/similar devices are listed in the "aliases" column. | |
23 Compatible/similar devices are e.g. combo devices using that particular | |
24 flash device. | |
25 | |
26 The size column denotes the full device memory size in megabits (Mb). For | |
27 dual and multi-bank devices, two or more numbers indicate the sizes of the | |
28 respective banks, starting from the lowest address. | |
29 | |
30 ---------------+--------+------------------------------------------------- | |
31 Device | Size| Aliases and Notes | |
32 ---------------+--------+----------------------------------------------------- | |
33 AMD | | | |
34 29DL161T |15.5+0.5| | |
35 29DL162T |14.0+2.0| | |
36 29DL163T |12.0+4.0| | |
37 29DL164T | 8.0+8.0| | |
38 29DL322T |28.0+4.0| | |
39 29DL323T |24.0+8.0| | |
40 ---------------+--------+----------------------------------------------------- | |
41 Fujitsu | | | |
42 29DL161T |15.5+0.5| (Am29DL161) | |
43 29DL162T |14.0+2.0| (Am29DL162) | |
44 29DL163T |12.0+4.0| (Am29DL163) | |
45 29DL164T | 8.0+8.0| (Am29DL164) | |
46 29DL321TD | | (Am29DL321), MB84VD22181, MB84VD22081, MB84VD22191 | |
47 29DL322TD |28.0+4.0| (Am29DL322), MB84VD22182, MB84VD22082, MB84VD22192 | |
48 29DL323TD |24.0+8.0| (Am29DL323), MB84VD22183, MB84VD22083, MB84VD22193, | |
49 | | BSample device | |
50 ---------------+--------+----------------------------------------------------- | |
51 Samsung | | | |
52 K5A3240YT |24+8 | | |
53 K5A3240YB | 8+24 | | |
54 K5A3340YT |16+16 | | |
55 K5A3340YB |14+18 | (!?) | |
56 ---------------+--------+----------------------------------------------------- | |
57 SST | | | |
58 SST36VF1601 | | | |
59 ---------------+--------+----------------------------------------------------- | |
60 Toshiba | | | |
61 ? | | TH50VSF2581AASB | |
62 ---------------+--------+----------------------------------------------------- | |
63 Intel | | | |
64 28F160C3 | 16.0| Both Top and Bottom boot | |
65 28F320C3 | 32.0| Both Top and Bottom boot | |
66 28F640C3 | 64.0| Both Top and Bottom boot | |
67 28F640W30 | 64.0| Both Top and Bottom boot, DSample device | |
68 ---------------+--------+----------------------------------------------------- | |
69 Test | | | |
70 | | | |
71 ---------------+--------+----------------------------------------------------- | |
72 | |
73 ******************************************************************************/ | |
74 | |
75 | |
76 /****************************************************************************** | |
77 * Flash Device Memory Maps | |
78 ******************************************************************************/ | |
79 | |
80 // The memory map, flash_AAxBB[], used by each flash device definition in | |
81 // the flash_info[] array below can be either one of the pre-defined ones | |
82 // below or a custom-defined one. Each line in the memory map represents one | |
83 // physical device sector. The columns in the memory map has the following | |
84 // meaning: | |
85 // | |
86 // 1. Relative address offset of sector. | |
87 // 2. Base 2 logarithm of sector byte size, e.g. 64kB ~ 2^16. | |
88 // | |
89 // Note that does NOT support a flash definition with different sized blocks | |
90 // so all blocks contained in the device definition MUST be the same size! | |
91 | |
92 #if defined(CONFIG_TARGET_PIRELLI) || defined(CONFIG_TARGET_FCFAM) | |
93 // 256 KiB sectors | |
94 static const struct block_info_s flash_32x256[] = | |
95 { | |
96 { 0x000000, 18 }, | |
97 { 0x040000, 18 }, | |
98 { 0x080000, 18 }, | |
99 { 0x0C0000, 18 }, | |
100 { 0x100000, 18 }, | |
101 { 0x140000, 18 }, | |
102 { 0x180000, 18 }, | |
103 { 0x1C0000, 18 }, | |
104 { 0x200000, 18 }, | |
105 { 0x240000, 18 }, | |
106 { 0x280000, 18 }, | |
107 { 0x2C0000, 18 }, | |
108 { 0x300000, 18 }, | |
109 { 0x340000, 18 }, | |
110 { 0x380000, 18 }, | |
111 { 0x3C0000, 18 }, | |
112 { 0x400000, 18 }, | |
113 { 0x440000, 18 }, | |
114 { 0x480000, 18 }, | |
115 { 0x4C0000, 18 }, | |
116 { 0x500000, 18 }, | |
117 { 0x540000, 18 }, | |
118 { 0x580000, 18 }, | |
119 { 0x5C0000, 18 }, | |
120 { 0x600000, 18 }, | |
121 { 0x640000, 18 }, | |
122 { 0x680000, 18 }, | |
123 { 0x6C0000, 18 }, | |
124 { 0x700000, 18 }, | |
125 { 0x740000, 18 }, | |
126 { 0x780000, 18 }, | |
127 { 0x7C0000, 18 } | |
128 }; | |
129 | |
130 // 128x64kb | |
131 static const struct block_info_s flash_128x64[] = | |
132 { | |
133 { 0x00000, 16 }, | |
134 { 0x10000, 16 }, | |
135 { 0x20000, 16 }, | |
136 { 0x30000, 16 }, | |
137 { 0x40000, 16 }, | |
138 { 0x50000, 16 }, | |
139 { 0x60000, 16 }, | |
140 { 0x70000, 16 }, | |
141 { 0x80000, 16 }, | |
142 { 0x90000, 16 }, | |
143 { 0xa0000, 16 }, | |
144 { 0xb0000, 16 }, | |
145 { 0xc0000, 16 }, | |
146 { 0xd0000, 16 }, | |
147 { 0xe0000, 16 }, | |
148 { 0xf0000, 16 }, | |
149 { 0x100000, 16 }, | |
150 { 0x110000, 16 }, | |
151 { 0x120000, 16 }, | |
152 { 0x130000, 16 }, | |
153 { 0x140000, 16 }, | |
154 { 0x150000, 16 }, | |
155 { 0x160000, 16 }, | |
156 { 0x170000, 16 }, | |
157 { 0x180000, 16 }, | |
158 { 0x190000, 16 }, | |
159 { 0x1a0000, 16 }, | |
160 { 0x1b0000, 16 }, | |
161 { 0x1c0000, 16 }, | |
162 { 0x1d0000, 16 }, | |
163 { 0x1e0000, 16 }, | |
164 { 0x1f0000, 16 }, | |
165 { 0x200000, 16 }, | |
166 { 0x210000, 16 }, | |
167 { 0x220000, 16 }, | |
168 { 0x230000, 16 }, | |
169 { 0x240000, 16 }, | |
170 { 0x250000, 16 }, | |
171 { 0x260000, 16 }, | |
172 { 0x270000, 16 }, | |
173 { 0x280000, 16 }, | |
174 { 0x290000, 16 }, | |
175 { 0x2a0000, 16 }, | |
176 { 0x2b0000, 16 }, | |
177 { 0x2c0000, 16 }, | |
178 { 0x2d0000, 16 }, | |
179 { 0x2e0000, 16 }, | |
180 { 0x2f0000, 16 }, | |
181 { 0x300000, 16 }, | |
182 { 0x310000, 16 }, | |
183 { 0x320000, 16 }, | |
184 { 0x330000, 16 }, | |
185 { 0x340000, 16 }, | |
186 { 0x350000, 16 }, | |
187 { 0x360000, 16 }, | |
188 { 0x370000, 16 }, | |
189 { 0x380000, 16 }, | |
190 { 0x390000, 16 }, | |
191 { 0x3a0000, 16 }, | |
192 { 0x3b0000, 16 }, | |
193 { 0x3c0000, 16 }, | |
194 { 0x3d0000, 16 }, | |
195 { 0x3e0000, 16 }, | |
196 { 0x3f0000, 16 }, | |
197 { 0x400000, 16 }, | |
198 { 0x410000, 16 }, | |
199 { 0x420000, 16 }, | |
200 { 0x430000, 16 }, | |
201 { 0x440000, 16 }, | |
202 { 0x450000, 16 }, | |
203 { 0x460000, 16 }, | |
204 { 0x470000, 16 }, | |
205 { 0x480000, 16 }, | |
206 { 0x490000, 16 }, | |
207 { 0x4a0000, 16 }, | |
208 { 0x4b0000, 16 }, | |
209 { 0x4c0000, 16 }, | |
210 { 0x4d0000, 16 }, | |
211 { 0x4e0000, 16 }, | |
212 { 0x4f0000, 16 }, | |
213 { 0x500000, 16 }, | |
214 { 0x510000, 16 }, | |
215 { 0x520000, 16 }, | |
216 { 0x530000, 16 }, | |
217 { 0x540000, 16 }, | |
218 { 0x550000, 16 }, | |
219 { 0x560000, 16 }, | |
220 { 0x570000, 16 }, | |
221 { 0x580000, 16 }, | |
222 { 0x590000, 16 }, | |
223 { 0x5a0000, 16 }, | |
224 { 0x5b0000, 16 }, | |
225 { 0x5c0000, 16 }, | |
226 { 0x5d0000, 16 }, | |
227 { 0x5e0000, 16 }, | |
228 { 0x5f0000, 16 }, | |
229 { 0x600000, 16 }, | |
230 { 0x610000, 16 }, | |
231 { 0x620000, 16 }, | |
232 { 0x630000, 16 }, | |
233 { 0x640000, 16 }, | |
234 { 0x650000, 16 }, | |
235 { 0x660000, 16 }, | |
236 { 0x670000, 16 }, | |
237 { 0x680000, 16 }, | |
238 { 0x690000, 16 }, | |
239 { 0x6a0000, 16 }, | |
240 { 0x6b0000, 16 }, | |
241 { 0x6c0000, 16 }, | |
242 { 0x6d0000, 16 }, | |
243 { 0x6e0000, 16 }, | |
244 { 0x6f0000, 16 }, | |
245 { 0x700000, 16 }, | |
246 { 0x710000, 16 }, | |
247 { 0x720000, 16 }, | |
248 { 0x730000, 16 }, | |
249 { 0x740000, 16 }, | |
250 { 0x750000, 16 }, | |
251 { 0x760000, 16 }, | |
252 { 0x770000, 16 }, | |
253 { 0x780000, 16 }, | |
254 { 0x790000, 16 }, | |
255 { 0x7a0000, 16 }, | |
256 { 0x7b0000, 16 }, | |
257 { 0x7c0000, 16 }, | |
258 { 0x7d0000, 16 }, | |
259 { 0x7e0000, 16 }, | |
260 { 0x7f0000, 16 } | |
261 }; | |
262 #endif | |
263 | |
264 // 16x64kB | |
265 static const struct block_info_s flash_16x64[] = | |
266 { | |
267 { 0x00000, 16 }, | |
268 { 0x10000, 16 }, | |
269 { 0x20000, 16 }, | |
270 { 0x30000, 16 }, | |
271 { 0x40000, 16 }, | |
272 { 0x50000, 16 }, | |
273 { 0x60000, 16 }, | |
274 { 0x70000, 16 }, | |
275 { 0x80000, 16 }, | |
276 { 0x90000, 16 }, | |
277 { 0xA0000, 16 }, | |
278 { 0xB0000, 16 }, | |
279 { 0xC0000, 16 }, | |
280 { 0xD0000, 16 }, | |
281 { 0xE0000, 16 }, | |
282 { 0xF0000, 16 } | |
283 }; | |
284 | |
285 | |
286 // 8x8kB | |
287 static const struct block_info_s flash_8x8[] = | |
288 { | |
289 { 0x0000, 13 }, | |
290 { 0x2000, 13 }, | |
291 { 0x4000, 13 }, | |
292 { 0x6000, 13 }, | |
293 { 0x8000, 13 }, | |
294 { 0xa000, 13 }, | |
295 { 0xc000, 13 }, | |
296 { 0xe000, 13 } | |
297 }; | |
298 | |
299 | |
300 // 4x4kB | |
301 static const struct block_info_s flash_4x4[] = | |
302 { | |
303 { 0x0000, 12 }, | |
304 { 0x1000, 12 }, | |
305 { 0x2000, 12 }, | |
306 { 0x3000, 12 } | |
307 }; | |
308 | |
309 | |
310 /****************************************************************************** | |
311 * Flash Device Info Array | |
312 ******************************************************************************/ | |
313 | |
314 // Each entry in the array below represents one flash device definition as | |
315 // FFS needs it. The columns have the following meaning: | |
316 // | |
317 // 1. Device memory map. | |
318 // 2. Absolute address of the first sector to be used by/for FFS. | |
319 // 3. Manufacturer code. Values are from FFS_MANUFACTURER enumeration | |
320 // in drv.h | |
321 // 4. Device code. Available from device datasheet. | |
322 // 5. FFS device driver to use. Values are from FFS_DRIVER enumeration | |
323 // in drv.h | |
324 // 6. Number of sectors to use, starting from the address given in | |
325 // column 2. | |
326 | |
327 /********** RAM configuration ************************************************* | |
328 * Note it is necessary to hardwire the configuration of the ram driver | |
329 * in cfgffs.c. The ram driver is configured like and pseudo flash | |
330 * device with only a few exceptions: Field 2 which is the absolute | |
331 * address of the first sector MUST be set to zero, instead the address | |
332 * is configured in cfgffs.c. Field 4 'Device code' is an arbitrary | |
333 * value and not a real device code. | |
334 ******************************************************************************/ | |
335 | |
336 /********** Multi-id configuration ******************************************** | |
337 * When 227Eh is output, it indicates that two additional codes, called | |
338 * Extended Device Codes, will be required. The two additional codes will be | |
339 * read and the lower byte of each code will be combined into one id, which | |
340 * is used for auto-detection of the flash configuration. The device code | |
341 * format for the multi-id devices is as follow: 0x227E, 0x22YY, 0x22ZZ -> | |
342 * 0xYYZZ. | |
343 ******************************************************************************/ | |
344 | |
345 const struct flash_info_s flash_info[] = | |
346 { | |
347 #if 0 | |
348 //BOARD 34. Ram device 4x4kB. Note it is necessary to hardwire the conf | |
349 //in cfgffs.c | |
350 { &flash_4x4[0], 0, MANUFACT_RAM, 0x0404, | |
351 FFS_DRIVER_RAM, 4}, | |
352 | |
353 // Ram device 8x8kB. Note it is necessary to hardwire the conf in cfgffs.c | |
354 { &flash_8x8[0], 0, MANUFACT_RAM, 0x080D, | |
355 FFS_DRIVER_RAM, 8}, | |
356 #endif | |
357 | |
358 #ifdef CONFIG_TARGET_PIRELLI | |
359 | |
360 /* | |
361 * Our familiar version of the Pirelli DP-L10 hw features Spansion | |
362 * S71PL129NC0HFW4B flash (N version, 256 KiB sectors), but apparently | |
363 * an earlier hw version had S71PL129J flash with 64 KiB sectors, | |
364 * and Pirelli's official fw supports both. They have modified | |
365 * TI's flash ID code to generate device ID 0x2100 for the J version | |
366 * or 0x2101 for the N version. We have now replicated this ID logic | |
367 * in our FreeCalypso code base, and we can now support both flash | |
368 * chip versions as well. | |
369 * | |
370 * Our FFS configuration for the Pirelli target is aftermarket. | |
371 */ | |
372 | |
373 /* J flash */ | |
374 { &flash_128x64[0], (char *) 0x02480000, MANUFACT_AMD, 0x2100, | |
375 FFS_DRIVER_AMD, 24 }, | |
376 | |
377 /* N flash */ | |
378 { &flash_32x256[0], (char *) 0x02480000, MANUFACT_AMD, 0x2101, | |
379 FFS_DRIVER_AMD, 6 }, | |
380 | |
381 #elif defined(CONFIG_TARGET_FCFAM) | |
382 | |
383 /* | |
384 * This table of flash devices covers those possibilities that may occur | |
385 * on FreeCalypso-branded hardware; we use a new table separate from the | |
386 * one we inherited from TI/Openmoko. Originally we had no choice because | |
387 * we had no working autodetection for our new S71PL129N flash; we now have | |
388 * working autodetection, but we still use a separate device table for a | |
389 * few reasons: | |
390 * | |
391 * 1) Our 16 MiB flash options (S71PL129N and S71PL129J) are specific | |
392 * to CONFIG_TARGET_FCFAM; | |
393 * | |
394 * 2) We gain additional freedoms like having a different FFS config | |
395 * for K5A32xxCTM flash in FCFAM vs. Openmoko; | |
396 * | |
397 * 3) Less clutter is always good. | |
398 */ | |
399 | |
400 /* S71PL129N, current FCDEV3B hw, FFS in the first 2 MiB of the 2nd bank */ | |
401 { &flash_32x256[0], (char *) 0x01800000, MANUFACT_AMD, 0x2101, | |
402 FFS_DRIVER_AMD, 8 }, | |
403 | |
404 /* S71PL129J, currently only theoretical */ | |
405 { &flash_128x64[0], (char *) 0x01800000, MANUFACT_AMD, 0x2100, | |
406 FFS_DRIVER_AMD, 32 }, | |
407 | |
408 /* S71PL064J, 7x9 mm, attractive option for tight physical form factors */ | |
409 { &flash_16x64[0], (char *) 0x700000, MANUFACT_AMD, 0x0201, | |
410 FFS_DRIVER_AMD, 15 }, | |
411 | |
412 /* S71PL032J, 7x9 mm, smaller capacity, footprint same as S71PL064J */ | |
413 { &flash_16x64[0], (char *) 0x380000, MANUFACT_AMD, 0x0A01, | |
414 FFS_DRIVER_AMD, 7 }, | |
415 | |
416 /* | |
417 * Prior to the discovery of S71PL064J as a superior alternative, we were | |
418 * thinking about using Samsung K5A32xx from Openmoko in embedded modem | |
419 * products that have no need for huge flash and XRAM. Now that we have | |
420 * discovered S71PL064J which is both physically smaller and friendlier in | |
421 * terms of BGA footprint, it is unlikely that we will go back to K5A32xx. | |
422 * However, we do have one FCDEV3B board on which we populated a K5A3281CTM | |
423 * chip, so we are keeping firmware support for it. | |
424 * | |
425 * Note that the FFS configuration is different from Openmoko's: the | |
426 * thinking was that if we were going to use this chip, let's use it | |
427 * efficiently. | |
428 */ | |
429 { &flash_16x64[0], (char *) 0x300000, MANUFACT_SAMSUNG, 0x22A0, | |
430 FFS_DRIVER_AMD, 15 }, | |
431 | |
432 #elif defined(CONFIG_TARGET_COMPAL) | |
433 | |
434 /* aftermarket FFS configurations for FreeCalypso on Mot C1xx phones */ | |
435 | |
436 // Intel 28F160C3-T 16Mb. Using top-most 8x8kB (parameter) sectors. | |
437 // Changed for C11x aftermarket FFS config: 64x3 at 0x1C0000 | |
438 { &flash_16x64[0], (char *) 0x1C0000, MANUFACT_INTEL, 0x88C2, | |
439 FFS_DRIVER_INTEL_SB, 3 }, | |
440 | |
441 /* ST equivalent of 28F160C3T found in some Mot C11x phones */ | |
442 { &flash_16x64[0], (char *) 0x1C0000, 0x20, 0x88CE, | |
443 FFS_DRIVER_INTEL_SB, 3 }, | |
444 | |
445 // Intel 28F320C3-T, 32Mb. Using top-most 8x8kB (parameter) sectors. | |
446 // Changed for C139 aftermarket FFS config: 64x3 at 0x3C0000 | |
447 { &flash_16x64[0], (char *) 0x3C0000, MANUFACT_INTEL, 0x88C4, | |
448 FFS_DRIVER_INTEL_SB, 3 }, | |
449 | |
450 /* ST equivalent of 28F320C3T found in some Mot C139 phones */ | |
451 { &flash_16x64[0], (char *) 0x3C0000, 0x20, 0x88BA, | |
452 FFS_DRIVER_INTEL_SB, 3 }, | |
453 | |
454 // Intel 28F640C3-B, 64Mb. Using top-most 16x64kB sectors | |
455 // Changed for C155 aftermarket FFS config: 64x13 at 0x700000 | |
456 { &flash_16x64[0], (char *) 0x700000, MANUFACT_INTEL, 0x88CD, | |
457 FFS_DRIVER_INTEL_SB, 13 }, | |
458 | |
459 // Intel 28F640W30-B, 64Mb. (DSample). Using top-most 15x64kB sectors | |
460 // Changed for C155 aftermarket FFS config: 64x13 at 0x700000 | |
461 { &flash_16x64[0], (char *) 0x700000, MANUFACT_INTEL, 0x8855, | |
462 FFS_DRIVER_INTEL, 13 }, | |
463 | |
464 #else | |
465 | |
466 /* original table from TI/Openmoko, used on TI and Openmoko targets */ | |
467 /* also used on the newly discovered GTM900 and Tango modem targets */ | |
468 | |
469 /********** AMD Devices ***********************************************/ | |
470 | |
471 #ifdef CONFIG_TARGET_LEONARDO | |
472 // AMD Am29DL640F. Ignoring the 8kB sectors | |
473 // Multi-id device: 0x227E, 0x2221, 0x2200. Converted to 0x2100 | |
474 { &flash_16x64[0], (char *) 0x01800000, MANUFACT_AMD, 0x2100, | |
475 FFS_DRIVER_AMD, 15 }, | |
476 #endif | |
477 | |
478 // AMD Am29DL640G. Ignoring the 8kB sectors | |
479 // Multi-id device: 0x227E, 0x2202, 0x2201. Converted to 0x0201 | |
480 { &flash_16x64[0], (char *) 0x700000, MANUFACT_AMD, 0x0201, | |
481 FFS_DRIVER_AMD, 15 }, | |
482 | |
483 // AMD Am29DL321DT does not exist as of 2000-0217 | |
484 | |
485 // AMD Am29DL322DT. Ignoring the 8kB sectors | |
486 { &flash_16x64[0], (char *) 0x380000, MANUFACT_AMD, 0x2255, | |
487 FFS_DRIVER_AMD_SB, 7 }, | |
488 | |
489 // AMD Am29DL323DT. Ignoring the 8kB sectors | |
490 { &flash_16x64[0], (char *) 0x300000, MANUFACT_AMD, 0x2250, | |
491 FFS_DRIVER_AMD, 15 }, | |
492 | |
493 // AMD Am29DL161DT. Using 8x8kB sectors. | |
494 { &flash_8x8[0], (char *) 0x1F0000, MANUFACT_AMD, 0x2236, | |
495 FFS_DRIVER_AMD, 8 }, | |
496 | |
497 // AMD Am29DL162DT. Ignoring the 8kB sectors | |
498 { &flash_16x64[0], (char *) 0x1C0000, MANUFACT_AMD, 0x222D, | |
499 FFS_DRIVER_AMD, 3 }, | |
500 | |
501 // AMD Am29DL163DT. Ignoring the 8kB sectors | |
502 { &flash_16x64[0], (char *) 0x180000, MANUFACT_AMD, 0x2228, | |
503 FFS_DRIVER_AMD, 7 }, | |
504 | |
505 // AMD Am29DL164DT. Ignoring the 8kB sectors | |
506 { &flash_16x64[0], (char *) 0x100000, MANUFACT_AMD, 0x2233, | |
507 FFS_DRIVER_AMD, 15 }, | |
508 | |
509 /* newer Spansion devices in AMD ID code space */ | |
510 | |
511 // Spansion S29/S71PL032J. Ignoring the 8kB sectors | |
512 // Multi-id device: 0x227E, 0x220A, 0x2201. Converted to 0x0A01 | |
513 { &flash_16x64[0], (char *) 0x380000, MANUFACT_AMD, 0x0A01, | |
514 FFS_DRIVER_AMD, 7 }, | |
515 | |
516 /********** Fujitsu Devices *******************************************/ | |
517 | |
518 // Fujitsu MBM29DL321TD. Using 8x8kB sectors. | |
519 { &flash_8x8[0], (char *) 0x3f0000, MANUFACT_FUJITSU, 0x2259, | |
520 FFS_DRIVER_AMD, 8 }, | |
521 | |
522 // Fujitsu MBM29DL322TD. Ignoring all the 8kB sectors | |
523 { &flash_16x64[0], (char *) 0x380000, MANUFACT_FUJITSU, 0x2255, | |
524 FFS_DRIVER_AMD, 7 }, | |
525 | |
526 // Fujitsu MBM29DL323TD (BSample). Dual bank device definition. | |
527 { &flash_16x64[0], (char *) 0x300000, MANUFACT_FUJITSU, 0x2250, | |
528 FFS_DRIVER_AMD, 15 }, | |
529 | |
530 // Fujitsu MBM29DL161DT (similar to Am29DL161T). | |
531 { &flash_8x8[0], (char *) 0x1F0000, MANUFACT_FUJITSU, 0x2236, | |
532 FFS_DRIVER_AMD, 8 }, | |
533 | |
534 // Fujitsu MBM29DL162DT (similar to Am29DL162T). | |
535 { &flash_16x64[0], (char *) 0x1C0000, MANUFACT_FUJITSU, 0x222D, | |
536 FFS_DRIVER_AMD, 3 }, | |
537 | |
538 // Fujitsu MBM29DL163DT (similar to Am29DL163T). | |
539 { &flash_16x64[0], (char *) 0x180000, MANUFACT_FUJITSU, 0x2228, | |
540 FFS_DRIVER_AMD, 7 }, | |
541 | |
542 // Fujitsu MBM29DL164DT (similar to Am29DL164T). | |
543 { &flash_16x64[0], (char *) 0x100000, MANUFACT_FUJITSU, 0x2233, | |
544 FFS_DRIVER_AMD, 15 }, | |
545 | |
546 /* This is the RITA flash configuration */ | |
547 // Fujitsu MBM29DL320FB | |
548 // Multi-id device: 0x227E, 0x220A, 0x2200. Converted to 0x0A00 | |
549 { &flash_16x64[0], (char *) 0x320000, MANUFACT_FUJITSU, 0x0A00, | |
550 FFS_DRIVER_AMD_SB, 13 }, | |
551 | |
552 // Fujitsu MBM29DL320FT | |
553 // Multi-id device: 0x227E, 0x220A, 0x2201. Converted to 0x0A01 | |
554 { &flash_16x64[0], (char *) 0x320000, MANUFACT_FUJITSU, 0x0A01, | |
555 FFS_DRIVER_AMD_SB, 13 }, | |
556 | |
557 // Fujitsu MBM29DL640F, | |
558 // Multi-id device: 0x227E, 0x2221, 0x2200. Converted to 0x2100 | |
559 { &flash_16x64[0], (char *) 0x700000, MANUFACT_FUJITSU, 0x2100, | |
560 FFS_DRIVER_AMD_SB, 15 }, | |
561 | |
562 // Fujitsu 84VF5F5F4J2, | |
563 // Multi-id device: 0x227E, 0x2202, 0x2201. Converted to 0x0201 | |
564 { &flash_16x64[0], (char *) 0x700000, MANUFACT_FUJITSU, 0x0201, | |
565 FFS_DRIVER_AMD_SB, 15 }, | |
566 | |
567 #if 0 | |
568 // Fujitsu MB84VF5F5F4J2 stacked device. Using the 2nd sub device | |
569 // The 8x8 are located both in top and bottom, thus only 126 | |
570 // blocks are used. | |
571 { &flash_128x64[0], (char *) 0x1810000, MANUFACT_FUJITSU, 0xB496, | |
572 FFS_DRIVER_AMD_SB, 126 }, | |
573 #endif | |
574 | |
575 /********** Intel Devices *********************************************/ | |
576 | |
577 // Intel 28F160C3-T 16Mb. Using top-most 8x8kB (parameter) sectors. | |
578 { &flash_8x8[0], (char *) 0x1F0000, MANUFACT_INTEL, 0x88C2, | |
579 FFS_DRIVER_INTEL_SB, 8 }, | |
580 | |
581 // Intel 28F160C3-B, 16Mb. Using top-most 6x64kB sectors | |
582 { &flash_16x64[0], (char *) 0x1A0000, MANUFACT_INTEL, 0x88C3, | |
583 FFS_DRIVER_INTEL_SB, 6 }, | |
584 | |
585 // Intel 28F320C3-T, 32Mb. Using top-most 8x8kB (parameter) sectors. | |
586 { &flash_8x8[0], (char *) 0x3F0000, MANUFACT_INTEL, 0x88C4, | |
587 FFS_DRIVER_INTEL_SB, 8 }, | |
588 | |
589 // Intel 28F320C3-B, 32Mb. Using top-most 8x64kB sectors | |
590 { &flash_16x64[0], (char *) 0x380000, MANUFACT_INTEL, 0x88C5, | |
591 FFS_DRIVER_INTEL_SB, 8 }, | |
592 | |
593 // Intel 28F640C3-T, 64Mb. Using top-most 8x8kB (parameter) sectors. | |
594 { &flash_8x8[0], (char *) 0x7F0000, MANUFACT_INTEL, 0x88CC, | |
595 FFS_DRIVER_INTEL_SB, 8 }, | |
596 | |
597 // Intel 28F640C3-B, 64Mb. Using top-most 16x64kB sectors | |
598 { &flash_16x64[0], (char *) 0x700000, MANUFACT_INTEL, 0x88CD, | |
599 FFS_DRIVER_INTEL_SB, 15 }, | |
600 | |
601 // Intel 28F640W30-T, 64Mb. Using top-most 8x8kB sectors | |
602 { &flash_8x8[0], (char *) 0x7F0000, MANUFACT_INTEL, 0x8854, | |
603 FFS_DRIVER_INTEL_SB, 8 }, | |
604 | |
605 // Intel 28F640W30-B, 64Mb. (DSample). Using top-most 47x64kB sectors | |
606 // { &flash_128x64[0], (char *) 0x500000, MANUFACT_INTEL, 0x8855, | |
607 // FFS_DRIVER_INTEL_SB, 47 }, | |
608 | |
609 // Intel 28F640W30-B, 64Mb. (DSample). Using top-most 15x64kB sectors | |
610 { &flash_16x64[0], (char *) 0x700000, MANUFACT_INTEL, 0x8855, | |
611 FFS_DRIVER_INTEL, 15 }, | |
612 | |
613 // Intel 28F640W30-B, 64Mb. (DSample). Using top-most 15x64kB sectors | |
614 { &flash_16x64[0], (char *) 0x700000, MANUFACT_INTEL, 0x88FF, | |
615 FFS_DRIVER_INTEL_SB, 15 }, | |
616 | |
617 /********** MXIC Devices *******************************************/ | |
618 | |
619 // Intel 28F640W30-T, 64Mb. Using top-most 8x8kB sectors | |
620 { &flash_8x8[0], (char *) 0x3F0000, MANUFACT_MXIC, 0x0024, | |
621 FFS_DRIVER_INTEL_SB, 8 }, | |
622 | |
623 | |
624 /********** Samsung Devices *******************************************/ | |
625 | |
626 // Samsung K5A3240YT Top boot, 24Mb + 8Mb | |
627 { &flash_16x64[0], (char *) 0x380000, MANUFACT_SAMSUNG, 0x22B7, | |
628 FFS_DRIVER_AMD_SB, 7 }, | |
629 | |
630 // Samsung K5A3340YT Top boot, 16Mb + 16Mb | |
631 { &flash_16x64[0], (char *) 0x380000, MANUFACT_SAMSUNG, 0x22BA, | |
632 FFS_DRIVER_AMD_SB, 7 }, | |
633 | |
634 // Samsung K5A3240YB Bottom boot, 8Mb + 24Mb | |
635 { &flash_16x64[0], (char *) 0x380000, MANUFACT_SAMSUNG, 0x223F, | |
636 FFS_DRIVER_AMD_SB, 8 }, | |
637 | |
638 // Samsung K5A3340YB Bottom boot, 14Mb + 18Mb (!?) | |
639 { &flash_16x64[0], (char *) 0x380000, MANUFACT_SAMSUNG, 0x223D, | |
640 FFS_DRIVER_AMD_SB, 8 }, | |
641 | |
642 /* post-TI additions */ | |
643 | |
644 // Samsung K5A32xxCTM (Openmoko) | |
645 { &flash_16x64[0], (char *) 0x380000, MANUFACT_SAMSUNG, 0x22A0, | |
646 FFS_DRIVER_AMD_SB, 7 }, | |
647 | |
648 // Samsung K5L33xxCAM (Huawei GTM900) | |
649 // Multi-id device: 0x257E, 0x2503, 0x2501. Converted to 0x0301 | |
650 { &flash_16x64[0], (char *) 0x380000, MANUFACT_SAMSUNG, 0x0301, | |
651 FFS_DRIVER_AMD_SB, 7 }, | |
652 | |
653 // Samsung K5L6331CAA-D270 ?? (stanza came with moko10/11 source) | |
654 // Multi-id device: 0x257E, 0x2506, 0x2501. Converted to 0x0601 | |
655 { &flash_16x64[0], (char *) 0x380000, MANUFACT_SAMSUNG, 0x0601, | |
656 FFS_DRIVER_AMD_SB, 15 }, | |
657 | |
658 /********** SST Devices ***********************************************/ | |
659 | |
660 // SST SST36VF1601 | |
661 { &flash_16x64[0], (char *) 0x180000, MANUFACT_SST, 0x2761, | |
662 FFS_DRIVER_SST, 8 }, | |
663 | |
664 /********** Toshiba Devices *******************************************/ | |
665 | |
666 // Toshiba TH50VSF2581AASB Bottom boot combo device | |
667 { &flash_16x64[0], (char *) 0x380000, MANUFACT_TOSHIBA, 0x009C, | |
668 FFS_DRIVER_AMD, 8 }, | |
669 | |
670 #endif | |
671 | |
672 #if 0 | |
673 /********** Special/Test Devices **************************************/ | |
674 | |
675 // Intel 28F160C3-B, 16Mb. Single bank driver | |
676 // Note that device ID is bogus! | |
677 { &flash_16x64[0], (char *) 0x1A0000, MANUFACT_INTEL, 0x01C3, | |
678 FFS_DRIVER_INTEL_SB, 6 }, | |
679 | |
680 // Fujitsu MBM29DL323TD (BSample). Single bank device definition. | |
681 // Note that device ID is bogus! | |
682 { &flash_16x64[0], (char *) 0x300000, MANUFACT_FUJITSU, 0x0150, | |
683 FFS_DRIVER_AMD_SB, 15 }, | |
684 | |
685 // Fujitsu MBM29DL323TD (BSample). Pseudo single bank device definition. | |
686 // Note that device ID is bogus! | |
687 { &flash_16x64[0], (char *) 0x300000, MANUFACT_FUJITSU, 0x0250, | |
688 FFS_DRIVER_AMD_PSEUDO_SB, 15 }, | |
689 | |
690 // Fujitsu MBM29DL323TD (BSample). "True" single bank device definition | |
691 // within first flash device bank! | |
692 // Note that device ID is bogus! | |
693 { &flash_16x64[0], (char *) 0x280000, MANUFACT_FUJITSU, 0x0350, | |
694 FFS_DRIVER_AMD_SB, 8 }, | |
695 | |
696 // AMD Am29DL323DT on EVA4 (base address = 0x200000) | |
697 { &flash_16x64[0], (char *) 0x500000, MANUFACT_AMD, 0xF250, | |
698 FFS_DRIVER_AMD, 15 }, | |
699 | |
700 // PC Test/Simulation flash 128x64kb | |
701 { &flash_128x64[0], (char *) 0x000000, MANUFACT_TEST, 0x0F12, | |
702 FFS_DRIVER_TEST, 127 }, | |
703 | |
704 // PC Test/Simulation flash 16x64kB | |
705 { &flash_16x64[0], (char *) 0x000000, MANUFACT_TEST, 0x0F10, | |
706 FFS_DRIVER_TEST, 15 }, | |
707 | |
708 // PC Test/Simulation flash 8x8kB | |
709 { &flash_8x8[0], (char *) 0x000000, MANUFACT_TEST, 0x080D, | |
710 FFS_DRIVER_TEST, 8 }, | |
711 | |
712 // PC Test/Simulation flash 4x4kB | |
713 { &flash_4x4[0], (char *) 0x000000, MANUFACT_TEST, 0x0404, | |
714 FFS_DRIVER_TEST, 4 }, | |
715 #endif | |
716 | |
717 // terminator | |
718 { 0, 0, 0, 0 } | |
719 }; | |
720 |