Root/nandprog/include/nand_ecc.h

1#ifndef __NAND_ECC_H__
2#define __NAND_ECC_H__
3
4#include "include.h"
5
6// This head file define these ecc position and ecc types
7struct nand_oobinfo oob_64[] =
8{
9{
10    .eccname = JZ4730CPU,
11    .eccbytes = 24,
12    .eccpos =
13    {
14        4, 5, 6,
15        8, 9, 10,
16        12,13,14,
17        16,17,18,
18        20,21,22,
19        24,25,26,
20        28,29,30,
21        32,33,34,
22    },
23},
24{
25    .eccname = LINUXHM,
26    .eccbytes = 24,
27    .eccpos =
28    {
29        41, 40, 42,
30        44, 43, 45,
31        47, 46, 48,
32        50, 49, 51,
33        53, 52, 54,
34        56, 55, 57,
35        59, 58, 60,
36        62, 61, 63
37
38/* old need change position
39        40, 41, 42,
40        43, 44, 45,
41        46, 47, 48,
42        49, 50, 51,
43        52, 53, 54,
44        55, 56, 57,
45        58, 59, 60,
46        61, 62, 63
47
48 */
49    },
50},
51{
52    .eccname = JZ4740CPU,
53    .eccbytes = 36,
54    .eccpos =
55    {
56        6, 7, 8, 9, 10,11,12,13,14,
57        15,16,17,18,19,20,21,22,23,
58        24,25,26,27,28,29,30,31,32,
59        33,34,35,36,37,38,39,40,41
60    },
61
62},
63{
64    .eccname = LINUXRS,
65    .eccbytes = 36,
66    .eccpos =
67    {
68        28, 29, 30, 31,
69        32, 33, 34, 35, 36, 37, 38, 39,
70        40, 41, 42, 43, 44, 45, 46, 47,
71        48, 49, 50, 51, 52, 53, 54, 55,
72        56, 57, 58, 59, 60, 61, 62, 63
73    },
74
75},
76
77{ //this one must update by config file
78    .eccname = USERSPEC,
79    .eccbytes = 64,
80    .eccpos =
81    {
82        0, 0, 0, 0,
83    },
84    
85},
86
87};
88
89#endif
90

Archive Download this file



interactive