diff options
-rw-r--r-- | drivers/mtd/chips/jedec_probe.c | 2 | ||||
-rw-r--r-- | drivers/mtd/devices/doc2000.c | 2 | ||||
-rw-r--r-- | drivers/mtd/devices/doc2001.c | 2 | ||||
-rw-r--r-- | drivers/mtd/devices/doc2001plus.c | 2 | ||||
-rw-r--r-- | drivers/mtd/devices/docecc.c | 2 | ||||
-rw-r--r-- | drivers/mtd/mtdchar.c | 6 | ||||
-rw-r--r-- | drivers/mtd/nand/au1550nd.c | 29 | ||||
-rw-r--r-- | drivers/mtd/nand/cafe_nand.c | 2 | ||||
-rw-r--r-- | drivers/mtd/nand/diskonchip.c | 4 | ||||
-rw-r--r-- | drivers/mtd/nand/nand_base.c | 105 | ||||
-rw-r--r-- | drivers/mtd/nand/nand_bbt.c | 8 | ||||
-rw-r--r-- | drivers/mtd/nand/nand_ecc.c | 10 | ||||
-rw-r--r-- | drivers/mtd/nand/rtc_from4.c | 2 | ||||
-rw-r--r-- | drivers/mtd/onenand/onenand_base.c | 12 | ||||
-rw-r--r-- | drivers/mtd/sm_ftl.c | 2 | ||||
-rw-r--r-- | include/linux/mtd/mtd.h | 2 | ||||
-rw-r--r-- | include/linux/mtd/nand.h | 50 |
17 files changed, 119 insertions, 123 deletions
diff --git a/drivers/mtd/chips/jedec_probe.c b/drivers/mtd/chips/jedec_probe.c index ea832ea0e4aa..d40c410a3241 100644 --- a/drivers/mtd/chips/jedec_probe.c +++ b/drivers/mtd/chips/jedec_probe.c | |||
@@ -1914,7 +1914,7 @@ static void jedec_reset(u32 base, struct map_info *map, struct cfi_private *cfi) | |||
1914 | * (oh and incidentaly the jedec spec - 3.5.3.3) the reset | 1914 | * (oh and incidentaly the jedec spec - 3.5.3.3) the reset |
1915 | * sequence is *supposed* to be 0xaa at 0x5555, 0x55 at | 1915 | * sequence is *supposed* to be 0xaa at 0x5555, 0x55 at |
1916 | * 0x2aaa, 0xF0 at 0x5555 this will not affect the AMD chips | 1916 | * 0x2aaa, 0xF0 at 0x5555 this will not affect the AMD chips |
1917 | * as they will ignore the writes and dont care what address | 1917 | * as they will ignore the writes and don't care what address |
1918 | * the F0 is written to */ | 1918 | * the F0 is written to */ |
1919 | if (cfi->addr_unlock1) { | 1919 | if (cfi->addr_unlock1) { |
1920 | DEBUG( MTD_DEBUG_LEVEL3, | 1920 | DEBUG( MTD_DEBUG_LEVEL3, |
diff --git a/drivers/mtd/devices/doc2000.c b/drivers/mtd/devices/doc2000.c index f7fbf6025ef2..ed15447c392e 100644 --- a/drivers/mtd/devices/doc2000.c +++ b/drivers/mtd/devices/doc2000.c | |||
@@ -699,7 +699,7 @@ static int doc_read(struct mtd_info *mtd, loff_t from, size_t len, | |||
699 | #ifdef ECC_DEBUG | 699 | #ifdef ECC_DEBUG |
700 | printk(KERN_ERR "DiskOnChip ECC Error: Read at %lx\n", (long)from); | 700 | printk(KERN_ERR "DiskOnChip ECC Error: Read at %lx\n", (long)from); |
701 | #endif | 701 | #endif |
702 | /* Read the ECC syndrom through the DiskOnChip ECC | 702 | /* Read the ECC syndrome through the DiskOnChip ECC |
703 | logic. These syndrome will be all ZERO when there | 703 | logic. These syndrome will be all ZERO when there |
704 | is no error */ | 704 | is no error */ |
705 | for (i = 0; i < 6; i++) { | 705 | for (i = 0; i < 6; i++) { |
diff --git a/drivers/mtd/devices/doc2001.c b/drivers/mtd/devices/doc2001.c index 241192f05bc8..c6ea8604a3c3 100644 --- a/drivers/mtd/devices/doc2001.c +++ b/drivers/mtd/devices/doc2001.c | |||
@@ -464,7 +464,7 @@ static int doc_read (struct mtd_info *mtd, loff_t from, size_t len, | |||
464 | #ifdef ECC_DEBUG | 464 | #ifdef ECC_DEBUG |
465 | printk("DiskOnChip ECC Error: Read at %lx\n", (long)from); | 465 | printk("DiskOnChip ECC Error: Read at %lx\n", (long)from); |
466 | #endif | 466 | #endif |
467 | /* Read the ECC syndrom through the DiskOnChip ECC logic. | 467 | /* Read the ECC syndrome through the DiskOnChip ECC logic. |
468 | These syndrome will be all ZERO when there is no error */ | 468 | These syndrome will be all ZERO when there is no error */ |
469 | for (i = 0; i < 6; i++) { | 469 | for (i = 0; i < 6; i++) { |
470 | syndrome[i] = ReadDOC(docptr, ECCSyndrome0 + i); | 470 | syndrome[i] = ReadDOC(docptr, ECCSyndrome0 + i); |
diff --git a/drivers/mtd/devices/doc2001plus.c b/drivers/mtd/devices/doc2001plus.c index 09ae0adc3ad0..fe82fbfa155e 100644 --- a/drivers/mtd/devices/doc2001plus.c +++ b/drivers/mtd/devices/doc2001plus.c | |||
@@ -655,7 +655,7 @@ static int doc_read(struct mtd_info *mtd, loff_t from, size_t len, | |||
655 | #ifdef ECC_DEBUG | 655 | #ifdef ECC_DEBUG |
656 | printk("DiskOnChip ECC Error: Read at %lx\n", (long)from); | 656 | printk("DiskOnChip ECC Error: Read at %lx\n", (long)from); |
657 | #endif | 657 | #endif |
658 | /* Read the ECC syndrom through the DiskOnChip ECC logic. | 658 | /* Read the ECC syndrome through the DiskOnChip ECC logic. |
659 | These syndrome will be all ZERO when there is no error */ | 659 | These syndrome will be all ZERO when there is no error */ |
660 | for (i = 0; i < 6; i++) | 660 | for (i = 0; i < 6; i++) |
661 | syndrome[i] = ReadDOC(docptr, Mplus_ECCSyndrome0 + i); | 661 | syndrome[i] = ReadDOC(docptr, Mplus_ECCSyndrome0 + i); |
diff --git a/drivers/mtd/devices/docecc.c b/drivers/mtd/devices/docecc.c index 37ef29a73ee4..4a1c39b6f37d 100644 --- a/drivers/mtd/devices/docecc.c +++ b/drivers/mtd/devices/docecc.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * ECC algorithm for M-systems disk on chip. We use the excellent Reed | 2 | * ECC algorithm for M-systems disk on chip. We use the excellent Reed |
3 | * Solmon code of Phil Karn (karn@ka9q.ampr.org) available under the | 3 | * Solmon code of Phil Karn (karn@ka9q.ampr.org) available under the |
4 | * GNU GPL License. The rest is simply to convert the disk on chip | 4 | * GNU GPL License. The rest is simply to convert the disk on chip |
5 | * syndrom into a standard syndom. | 5 | * syndrome into a standard syndome. |
6 | * | 6 | * |
7 | * Author: Fabrice Bellard (fabrice.bellard@netgem.com) | 7 | * Author: Fabrice Bellard (fabrice.bellard@netgem.com) |
8 | * Copyright (C) 2000 Netgem S.A. | 8 | * Copyright (C) 2000 Netgem S.A. |
diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c index 49e20a497084..c60067b1f07a 100644 --- a/drivers/mtd/mtdchar.c +++ b/drivers/mtd/mtdchar.c | |||
@@ -233,9 +233,9 @@ static ssize_t mtd_read(struct file *file, char __user *buf, size_t count,loff_t | |||
233 | default: | 233 | default: |
234 | ret = mtd->read(mtd, *ppos, len, &retlen, kbuf); | 234 | ret = mtd->read(mtd, *ppos, len, &retlen, kbuf); |
235 | } | 235 | } |
236 | /* Nand returns -EBADMSG on ecc errors, but it returns | 236 | /* Nand returns -EBADMSG on ECC errors, but it returns |
237 | * the data. For our userspace tools it is important | 237 | * the data. For our userspace tools it is important |
238 | * to dump areas with ecc errors ! | 238 | * to dump areas with ECC errors! |
239 | * For kernel internal usage it also might return -EUCLEAN | 239 | * For kernel internal usage it also might return -EUCLEAN |
240 | * to signal the caller that a bitflip has occurred and has | 240 | * to signal the caller that a bitflip has occurred and has |
241 | * been corrected by the ECC algorithm. | 241 | * been corrected by the ECC algorithm. |
@@ -883,7 +883,7 @@ static int mtd_ioctl(struct file *file, u_int cmd, u_long arg) | |||
883 | } | 883 | } |
884 | #endif | 884 | #endif |
885 | 885 | ||
886 | /* This ioctl is being deprecated - it truncates the ecc layout */ | 886 | /* This ioctl is being deprecated - it truncates the ECC layout */ |
887 | case ECCGETLAYOUT: | 887 | case ECCGETLAYOUT: |
888 | { | 888 | { |
889 | struct nand_ecclayout_user *usrlay; | 889 | struct nand_ecclayout_user *usrlay; |
diff --git a/drivers/mtd/nand/au1550nd.c b/drivers/mtd/nand/au1550nd.c index e7767eef4505..60d58d3f1fcc 100644 --- a/drivers/mtd/nand/au1550nd.c +++ b/drivers/mtd/nand/au1550nd.c | |||
@@ -48,7 +48,7 @@ static const struct mtd_partition partition_info[] = { | |||
48 | * au_read_byte - read one byte from the chip | 48 | * au_read_byte - read one byte from the chip |
49 | * @mtd: MTD device structure | 49 | * @mtd: MTD device structure |
50 | * | 50 | * |
51 | * read function for 8bit buswith | 51 | * read function for 8bit buswidth |
52 | */ | 52 | */ |
53 | static u_char au_read_byte(struct mtd_info *mtd) | 53 | static u_char au_read_byte(struct mtd_info *mtd) |
54 | { | 54 | { |
@@ -63,7 +63,7 @@ static u_char au_read_byte(struct mtd_info *mtd) | |||
63 | * @mtd: MTD device structure | 63 | * @mtd: MTD device structure |
64 | * @byte: pointer to data byte to write | 64 | * @byte: pointer to data byte to write |
65 | * | 65 | * |
66 | * write function for 8it buswith | 66 | * write function for 8it buswidth |
67 | */ | 67 | */ |
68 | static void au_write_byte(struct mtd_info *mtd, u_char byte) | 68 | static void au_write_byte(struct mtd_info *mtd, u_char byte) |
69 | { | 69 | { |
@@ -73,11 +73,10 @@ static void au_write_byte(struct mtd_info *mtd, u_char byte) | |||
73 | } | 73 | } |
74 | 74 | ||
75 | /** | 75 | /** |
76 | * au_read_byte16 - read one byte endianess aware from the chip | 76 | * au_read_byte16 - read one byte endianness aware from the chip |
77 | * @mtd: MTD device structure | 77 | * @mtd: MTD device structure |
78 | * | 78 | * |
79 | * read function for 16bit buswith with | 79 | * read function for 16bit buswidth with endianness conversion |
80 | * endianess conversion | ||
81 | */ | 80 | */ |
82 | static u_char au_read_byte16(struct mtd_info *mtd) | 81 | static u_char au_read_byte16(struct mtd_info *mtd) |
83 | { | 82 | { |
@@ -88,12 +87,11 @@ static u_char au_read_byte16(struct mtd_info *mtd) | |||
88 | } | 87 | } |
89 | 88 | ||
90 | /** | 89 | /** |
91 | * au_write_byte16 - write one byte endianess aware to the chip | 90 | * au_write_byte16 - write one byte endianness aware to the chip |
92 | * @mtd: MTD device structure | 91 | * @mtd: MTD device structure |
93 | * @byte: pointer to data byte to write | 92 | * @byte: pointer to data byte to write |
94 | * | 93 | * |
95 | * write function for 16bit buswith with | 94 | * write function for 16bit buswidth with endianness conversion |
96 | * endianess conversion | ||
97 | */ | 95 | */ |
98 | static void au_write_byte16(struct mtd_info *mtd, u_char byte) | 96 | static void au_write_byte16(struct mtd_info *mtd, u_char byte) |
99 | { | 97 | { |
@@ -106,8 +104,7 @@ static void au_write_byte16(struct mtd_info *mtd, u_char byte) | |||
106 | * au_read_word - read one word from the chip | 104 | * au_read_word - read one word from the chip |
107 | * @mtd: MTD device structure | 105 | * @mtd: MTD device structure |
108 | * | 106 | * |
109 | * read function for 16bit buswith without | 107 | * read function for 16bit buswidth without endianness conversion |
110 | * endianess conversion | ||
111 | */ | 108 | */ |
112 | static u16 au_read_word(struct mtd_info *mtd) | 109 | static u16 au_read_word(struct mtd_info *mtd) |
113 | { | 110 | { |
@@ -123,7 +120,7 @@ static u16 au_read_word(struct mtd_info *mtd) | |||
123 | * @buf: data buffer | 120 | * @buf: data buffer |
124 | * @len: number of bytes to write | 121 | * @len: number of bytes to write |
125 | * | 122 | * |
126 | * write function for 8bit buswith | 123 | * write function for 8bit buswidth |
127 | */ | 124 | */ |
128 | static void au_write_buf(struct mtd_info *mtd, const u_char *buf, int len) | 125 | static void au_write_buf(struct mtd_info *mtd, const u_char *buf, int len) |
129 | { | 126 | { |
@@ -142,7 +139,7 @@ static void au_write_buf(struct mtd_info *mtd, const u_char *buf, int len) | |||
142 | * @buf: buffer to store date | 139 | * @buf: buffer to store date |
143 | * @len: number of bytes to read | 140 | * @len: number of bytes to read |
144 | * | 141 | * |
145 | * read function for 8bit buswith | 142 | * read function for 8bit buswidth |
146 | */ | 143 | */ |
147 | static void au_read_buf(struct mtd_info *mtd, u_char *buf, int len) | 144 | static void au_read_buf(struct mtd_info *mtd, u_char *buf, int len) |
148 | { | 145 | { |
@@ -161,7 +158,7 @@ static void au_read_buf(struct mtd_info *mtd, u_char *buf, int len) | |||
161 | * @buf: buffer containing the data to compare | 158 | * @buf: buffer containing the data to compare |
162 | * @len: number of bytes to compare | 159 | * @len: number of bytes to compare |
163 | * | 160 | * |
164 | * verify function for 8bit buswith | 161 | * verify function for 8bit buswidth |
165 | */ | 162 | */ |
166 | static int au_verify_buf(struct mtd_info *mtd, const u_char *buf, int len) | 163 | static int au_verify_buf(struct mtd_info *mtd, const u_char *buf, int len) |
167 | { | 164 | { |
@@ -183,7 +180,7 @@ static int au_verify_buf(struct mtd_info *mtd, const u_char *buf, int len) | |||
183 | * @buf: data buffer | 180 | * @buf: data buffer |
184 | * @len: number of bytes to write | 181 | * @len: number of bytes to write |
185 | * | 182 | * |
186 | * write function for 16bit buswith | 183 | * write function for 16bit buswidth |
187 | */ | 184 | */ |
188 | static void au_write_buf16(struct mtd_info *mtd, const u_char *buf, int len) | 185 | static void au_write_buf16(struct mtd_info *mtd, const u_char *buf, int len) |
189 | { | 186 | { |
@@ -205,7 +202,7 @@ static void au_write_buf16(struct mtd_info *mtd, const u_char *buf, int len) | |||
205 | * @buf: buffer to store date | 202 | * @buf: buffer to store date |
206 | * @len: number of bytes to read | 203 | * @len: number of bytes to read |
207 | * | 204 | * |
208 | * read function for 16bit buswith | 205 | * read function for 16bit buswidth |
209 | */ | 206 | */ |
210 | static void au_read_buf16(struct mtd_info *mtd, u_char *buf, int len) | 207 | static void au_read_buf16(struct mtd_info *mtd, u_char *buf, int len) |
211 | { | 208 | { |
@@ -226,7 +223,7 @@ static void au_read_buf16(struct mtd_info *mtd, u_char *buf, int len) | |||
226 | * @buf: buffer containing the data to compare | 223 | * @buf: buffer containing the data to compare |
227 | * @len: number of bytes to compare | 224 | * @len: number of bytes to compare |
228 | * | 225 | * |
229 | * verify function for 16bit buswith | 226 | * verify function for 16bit buswidth |
230 | */ | 227 | */ |
231 | static int au_verify_buf16(struct mtd_info *mtd, const u_char *buf, int len) | 228 | static int au_verify_buf16(struct mtd_info *mtd, const u_char *buf, int len) |
232 | { | 229 | { |
diff --git a/drivers/mtd/nand/cafe_nand.c b/drivers/mtd/nand/cafe_nand.c index f6eb66432c81..11a56df89eab 100644 --- a/drivers/mtd/nand/cafe_nand.c +++ b/drivers/mtd/nand/cafe_nand.c | |||
@@ -370,7 +370,7 @@ static int cafe_nand_read_oob(struct mtd_info *mtd, struct nand_chip *chip, | |||
370 | return 1; | 370 | return 1; |
371 | } | 371 | } |
372 | /** | 372 | /** |
373 | * cafe_nand_read_page_syndrome - {REPLACABLE] hardware ecc syndrom based page read | 373 | * cafe_nand_read_page_syndrome - [REPLACEABLE] hardware ecc syndrome based page read |
374 | * @mtd: mtd info structure | 374 | * @mtd: mtd info structure |
375 | * @chip: nand chip info structure | 375 | * @chip: nand chip info structure |
376 | * @buf: buffer to store read data | 376 | * @buf: buffer to store read data |
diff --git a/drivers/mtd/nand/diskonchip.c b/drivers/mtd/nand/diskonchip.c index b657d7f9b05c..de93a989aa54 100644 --- a/drivers/mtd/nand/diskonchip.c +++ b/drivers/mtd/nand/diskonchip.c | |||
@@ -132,7 +132,7 @@ static struct rs_control *rs_decoder; | |||
132 | 132 | ||
133 | /* | 133 | /* |
134 | * The HW decoder in the DoC ASIC's provides us a error syndrome, | 134 | * The HW decoder in the DoC ASIC's provides us a error syndrome, |
135 | * which we must convert to a standard syndrom usable by the generic | 135 | * which we must convert to a standard syndrome usable by the generic |
136 | * Reed-Solomon library code. | 136 | * Reed-Solomon library code. |
137 | * | 137 | * |
138 | * Fabrice Bellard figured this out in the old docecc code. I added | 138 | * Fabrice Bellard figured this out in the old docecc code. I added |
@@ -153,7 +153,7 @@ static int doc_ecc_decode(struct rs_control *rs, uint8_t *data, uint8_t *ecc) | |||
153 | ds[3] = ((ecc[3] & 0xc0) >> 6) | ((ecc[0] & 0xff) << 2); | 153 | ds[3] = ((ecc[3] & 0xc0) >> 6) | ((ecc[0] & 0xff) << 2); |
154 | parity = ecc[1]; | 154 | parity = ecc[1]; |
155 | 155 | ||
156 | /* Initialize the syndrom buffer */ | 156 | /* Initialize the syndrome buffer */ |
157 | for (i = 0; i < NROOTS; i++) | 157 | for (i = 0; i < NROOTS; i++) |
158 | s[i] = ds[0]; | 158 | s[i] = ds[0]; |
159 | /* | 159 | /* |
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index 408e1d0abfd1..237d7daa189c 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c | |||
@@ -21,7 +21,7 @@ | |||
21 | * TODO: | 21 | * TODO: |
22 | * Enable cached programming for 2k page size chips | 22 | * Enable cached programming for 2k page size chips |
23 | * Check, if mtd->ecctype should be set to MTD_ECC_HW | 23 | * Check, if mtd->ecctype should be set to MTD_ECC_HW |
24 | * if we have HW ecc support. | 24 | * if we have HW ECC support. |
25 | * The AG-AND chips have nice features for speed improvement, | 25 | * The AG-AND chips have nice features for speed improvement, |
26 | * which are not supported yet. Read / program 4 pages in one go. | 26 | * which are not supported yet. Read / program 4 pages in one go. |
27 | * BBT table is not serialized, has to be fixed | 27 | * BBT table is not serialized, has to be fixed |
@@ -159,7 +159,7 @@ static void nand_release_device(struct mtd_info *mtd) | |||
159 | * nand_read_byte - [DEFAULT] read one byte from the chip | 159 | * nand_read_byte - [DEFAULT] read one byte from the chip |
160 | * @mtd: MTD device structure | 160 | * @mtd: MTD device structure |
161 | * | 161 | * |
162 | * Default read function for 8bit buswith. | 162 | * Default read function for 8bit buswidth |
163 | */ | 163 | */ |
164 | static uint8_t nand_read_byte(struct mtd_info *mtd) | 164 | static uint8_t nand_read_byte(struct mtd_info *mtd) |
165 | { | 165 | { |
@@ -169,9 +169,11 @@ static uint8_t nand_read_byte(struct mtd_info *mtd) | |||
169 | 169 | ||
170 | /** | 170 | /** |
171 | * nand_read_byte16 - [DEFAULT] read one byte endianess aware from the chip | 171 | * nand_read_byte16 - [DEFAULT] read one byte endianess aware from the chip |
172 | * nand_read_byte16 - [DEFAULT] read one byte endianness aware from the chip | ||
172 | * @mtd: MTD device structure | 173 | * @mtd: MTD device structure |
173 | * | 174 | * |
174 | * Default read function for 16bit buswith with endianess conversion. | 175 | * Default read function for 16bit buswidth with endianness conversion. |
176 | * | ||
175 | */ | 177 | */ |
176 | static uint8_t nand_read_byte16(struct mtd_info *mtd) | 178 | static uint8_t nand_read_byte16(struct mtd_info *mtd) |
177 | { | 179 | { |
@@ -183,7 +185,7 @@ static uint8_t nand_read_byte16(struct mtd_info *mtd) | |||
183 | * nand_read_word - [DEFAULT] read one word from the chip | 185 | * nand_read_word - [DEFAULT] read one word from the chip |
184 | * @mtd: MTD device structure | 186 | * @mtd: MTD device structure |
185 | * | 187 | * |
186 | * Default read function for 16bit buswith without endianess conversion. | 188 | * Default read function for 16bit buswidth without endianness conversion. |
187 | */ | 189 | */ |
188 | static u16 nand_read_word(struct mtd_info *mtd) | 190 | static u16 nand_read_word(struct mtd_info *mtd) |
189 | { | 191 | { |
@@ -220,7 +222,7 @@ static void nand_select_chip(struct mtd_info *mtd, int chipnr) | |||
220 | * @buf: data buffer | 222 | * @buf: data buffer |
221 | * @len: number of bytes to write | 223 | * @len: number of bytes to write |
222 | * | 224 | * |
223 | * Default write function for 8bit buswith. | 225 | * Default write function for 8bit buswidth. |
224 | */ | 226 | */ |
225 | static void nand_write_buf(struct mtd_info *mtd, const uint8_t *buf, int len) | 227 | static void nand_write_buf(struct mtd_info *mtd, const uint8_t *buf, int len) |
226 | { | 228 | { |
@@ -237,7 +239,7 @@ static void nand_write_buf(struct mtd_info *mtd, const uint8_t *buf, int len) | |||
237 | * @buf: buffer to store date | 239 | * @buf: buffer to store date |
238 | * @len: number of bytes to read | 240 | * @len: number of bytes to read |
239 | * | 241 | * |
240 | * Default read function for 8bit buswith. | 242 | * Default read function for 8bit buswidth. |
241 | */ | 243 | */ |
242 | static void nand_read_buf(struct mtd_info *mtd, uint8_t *buf, int len) | 244 | static void nand_read_buf(struct mtd_info *mtd, uint8_t *buf, int len) |
243 | { | 245 | { |
@@ -254,7 +256,7 @@ static void nand_read_buf(struct mtd_info *mtd, uint8_t *buf, int len) | |||
254 | * @buf: buffer containing the data to compare | 256 | * @buf: buffer containing the data to compare |
255 | * @len: number of bytes to compare | 257 | * @len: number of bytes to compare |
256 | * | 258 | * |
257 | * Default verify function for 8bit buswith. | 259 | * Default verify function for 8bit buswidth. |
258 | */ | 260 | */ |
259 | static int nand_verify_buf(struct mtd_info *mtd, const uint8_t *buf, int len) | 261 | static int nand_verify_buf(struct mtd_info *mtd, const uint8_t *buf, int len) |
260 | { | 262 | { |
@@ -273,7 +275,7 @@ static int nand_verify_buf(struct mtd_info *mtd, const uint8_t *buf, int len) | |||
273 | * @buf: data buffer | 275 | * @buf: data buffer |
274 | * @len: number of bytes to write | 276 | * @len: number of bytes to write |
275 | * | 277 | * |
276 | * Default write function for 16bit buswith. | 278 | * Default write function for 16bit buswidth. |
277 | */ | 279 | */ |
278 | static void nand_write_buf16(struct mtd_info *mtd, const uint8_t *buf, int len) | 280 | static void nand_write_buf16(struct mtd_info *mtd, const uint8_t *buf, int len) |
279 | { | 281 | { |
@@ -293,7 +295,7 @@ static void nand_write_buf16(struct mtd_info *mtd, const uint8_t *buf, int len) | |||
293 | * @buf: buffer to store date | 295 | * @buf: buffer to store date |
294 | * @len: number of bytes to read | 296 | * @len: number of bytes to read |
295 | * | 297 | * |
296 | * Default read function for 16bit buswith. | 298 | * Default read function for 16bit buswidth. |
297 | */ | 299 | */ |
298 | static void nand_read_buf16(struct mtd_info *mtd, uint8_t *buf, int len) | 300 | static void nand_read_buf16(struct mtd_info *mtd, uint8_t *buf, int len) |
299 | { | 301 | { |
@@ -312,7 +314,7 @@ static void nand_read_buf16(struct mtd_info *mtd, uint8_t *buf, int len) | |||
312 | * @buf: buffer containing the data to compare | 314 | * @buf: buffer containing the data to compare |
313 | * @len: number of bytes to compare | 315 | * @len: number of bytes to compare |
314 | * | 316 | * |
315 | * Default verify function for 16bit buswith. | 317 | * Default verify function for 16bit buswidth. |
316 | */ | 318 | */ |
317 | static int nand_verify_buf16(struct mtd_info *mtd, const uint8_t *buf, int len) | 319 | static int nand_verify_buf16(struct mtd_info *mtd, const uint8_t *buf, int len) |
318 | { | 320 | { |
@@ -499,7 +501,7 @@ static void panic_nand_wait_ready(struct mtd_info *mtd, unsigned long timeo) | |||
499 | } | 501 | } |
500 | } | 502 | } |
501 | 503 | ||
502 | /* Wait for the ready pin, after a command. The timeout is catched later */ | 504 | /* Wait for the ready pin, after a command. The timeout is caught later. */ |
503 | void nand_wait_ready(struct mtd_info *mtd) | 505 | void nand_wait_ready(struct mtd_info *mtd) |
504 | { | 506 | { |
505 | struct nand_chip *chip = mtd->priv; | 507 | struct nand_chip *chip = mtd->priv; |
@@ -510,7 +512,7 @@ void nand_wait_ready(struct mtd_info *mtd) | |||
510 | return panic_nand_wait_ready(mtd, 400); | 512 | return panic_nand_wait_ready(mtd, 400); |
511 | 513 | ||
512 | led_trigger_event(nand_led_trigger, LED_FULL); | 514 | led_trigger_event(nand_led_trigger, LED_FULL); |
513 | /* Wait until command is processed or timeout occures */ | 515 | /* Wait until command is processed or timeout occurs */ |
514 | do { | 516 | do { |
515 | if (chip->dev_ready(mtd)) | 517 | if (chip->dev_ready(mtd)) |
516 | break; | 518 | break; |
@@ -629,8 +631,8 @@ static void nand_command(struct mtd_info *mtd, unsigned int command, | |||
629 | * @page_addr: the page address for this command, -1 if none | 631 | * @page_addr: the page address for this command, -1 if none |
630 | * | 632 | * |
631 | * Send command to NAND device. This is the version for the new large page | 633 | * Send command to NAND device. This is the version for the new large page |
632 | * devices We dont have the separate regions as we have in the small page | 634 | * devices. We don't have the separate regions as we have in the small page |
633 | * devices. We must emulate NAND_CMD_READOOB to keep the code compatible. | 635 | * devices. We must emulate NAND_CMD_READOOB to keep the code compatible. |
634 | */ | 636 | */ |
635 | static void nand_command_lp(struct mtd_info *mtd, unsigned int command, | 637 | static void nand_command_lp(struct mtd_info *mtd, unsigned int command, |
636 | int column, int page_addr) | 638 | int column, int page_addr) |
@@ -754,7 +756,7 @@ static void nand_command_lp(struct mtd_info *mtd, unsigned int command, | |||
754 | static void panic_nand_get_device(struct nand_chip *chip, | 756 | static void panic_nand_get_device(struct nand_chip *chip, |
755 | struct mtd_info *mtd, int new_state) | 757 | struct mtd_info *mtd, int new_state) |
756 | { | 758 | { |
757 | /* Hardware controller shared among independend devices */ | 759 | /* Hardware controller shared among independent devices */ |
758 | chip->controller->active = chip; | 760 | chip->controller->active = chip; |
759 | chip->state = new_state; | 761 | chip->state = new_state; |
760 | } | 762 | } |
@@ -1032,14 +1034,13 @@ out: | |||
1032 | EXPORT_SYMBOL(nand_lock); | 1034 | EXPORT_SYMBOL(nand_lock); |
1033 | 1035 | ||
1034 | /** | 1036 | /** |
1035 | * nand_read_page_raw - [Intern] read raw page data without ecc | 1037 | * nand_read_page_raw - [INTERN] read raw page data without ecc |
1036 | * @mtd: mtd info structure | 1038 | * @mtd: mtd info structure |
1037 | * @chip: nand chip info structure | 1039 | * @chip: nand chip info structure |
1038 | * @buf: buffer to store read data | 1040 | * @buf: buffer to store read data |
1039 | * @page: page number to read | 1041 | * @page: page number to read |
1040 | * | 1042 | * |
1041 | * Not for syndrome calculating ecc controllers, which use a special oob | 1043 | * Not for syndrome calculating ECC controllers, which use a special oob layout. |
1042 | * layout. | ||
1043 | */ | 1044 | */ |
1044 | static int nand_read_page_raw(struct mtd_info *mtd, struct nand_chip *chip, | 1045 | static int nand_read_page_raw(struct mtd_info *mtd, struct nand_chip *chip, |
1045 | uint8_t *buf, int page) | 1046 | uint8_t *buf, int page) |
@@ -1050,7 +1051,7 @@ static int nand_read_page_raw(struct mtd_info *mtd, struct nand_chip *chip, | |||
1050 | } | 1051 | } |
1051 | 1052 | ||
1052 | /** | 1053 | /** |
1053 | * nand_read_page_raw_syndrome - [Intern] read raw page data without ecc | 1054 | * nand_read_page_raw_syndrome - [INTERN] read raw page data without ecc |
1054 | * @mtd: mtd info structure | 1055 | * @mtd: mtd info structure |
1055 | * @chip: nand chip info structure | 1056 | * @chip: nand chip info structure |
1056 | * @buf: buffer to store read data | 1057 | * @buf: buffer to store read data |
@@ -1093,7 +1094,7 @@ static int nand_read_page_raw_syndrome(struct mtd_info *mtd, | |||
1093 | } | 1094 | } |
1094 | 1095 | ||
1095 | /** | 1096 | /** |
1096 | * nand_read_page_swecc - [REPLACABLE] software ecc based page read function | 1097 | * nand_read_page_swecc - [REPLACEABLE] software ECC based page read function |
1097 | * @mtd: mtd info structure | 1098 | * @mtd: mtd info structure |
1098 | * @chip: nand chip info structure | 1099 | * @chip: nand chip info structure |
1099 | * @buf: buffer to store read data | 1100 | * @buf: buffer to store read data |
@@ -1134,7 +1135,7 @@ static int nand_read_page_swecc(struct mtd_info *mtd, struct nand_chip *chip, | |||
1134 | } | 1135 | } |
1135 | 1136 | ||
1136 | /** | 1137 | /** |
1137 | * nand_read_subpage - [REPLACABLE] software ecc based sub-page read function | 1138 | * nand_read_subpage - [REPLACEABLE] software ECC based sub-page read function |
1138 | * @mtd: mtd info structure | 1139 | * @mtd: mtd info structure |
1139 | * @chip: nand chip info structure | 1140 | * @chip: nand chip info structure |
1140 | * @data_offs: offset of requested data within the page | 1141 | * @data_offs: offset of requested data within the page |
@@ -1152,7 +1153,7 @@ static int nand_read_subpage(struct mtd_info *mtd, struct nand_chip *chip, | |||
1152 | int busw = (chip->options & NAND_BUSWIDTH_16) ? 2 : 1; | 1153 | int busw = (chip->options & NAND_BUSWIDTH_16) ? 2 : 1; |
1153 | int index = 0; | 1154 | int index = 0; |
1154 | 1155 | ||
1155 | /* Column address wihin the page aligned to ECC size (256bytes) */ | 1156 | /* Column address within the page aligned to ECC size (256bytes) */ |
1156 | start_step = data_offs / chip->ecc.size; | 1157 | start_step = data_offs / chip->ecc.size; |
1157 | end_step = (data_offs + readlen - 1) / chip->ecc.size; | 1158 | end_step = (data_offs + readlen - 1) / chip->ecc.size; |
1158 | num_steps = end_step - start_step + 1; | 1159 | num_steps = end_step - start_step + 1; |
@@ -1175,7 +1176,7 @@ static int nand_read_subpage(struct mtd_info *mtd, struct nand_chip *chip, | |||
1175 | 1176 | ||
1176 | /* | 1177 | /* |
1177 | * The performance is faster if we position offsets according to | 1178 | * The performance is faster if we position offsets according to |
1178 | * ecc.pos. Let's make sure that there are no gaps in ecc positions. | 1179 | * ecc.pos. Let's make sure that there are no gaps in ECC positions. |
1179 | */ | 1180 | */ |
1180 | for (i = 0; i < eccfrag_len - 1; i++) { | 1181 | for (i = 0; i < eccfrag_len - 1; i++) { |
1181 | if (eccpos[i + start_step * chip->ecc.bytes] + 1 != | 1182 | if (eccpos[i + start_step * chip->ecc.bytes] + 1 != |
@@ -1189,7 +1190,7 @@ static int nand_read_subpage(struct mtd_info *mtd, struct nand_chip *chip, | |||
1189 | chip->read_buf(mtd, chip->oob_poi, mtd->oobsize); | 1190 | chip->read_buf(mtd, chip->oob_poi, mtd->oobsize); |
1190 | } else { | 1191 | } else { |
1191 | /* | 1192 | /* |
1192 | * Send the command to read the particular ecc bytes take care | 1193 | * Send the command to read the particular ECC bytes take care |
1193 | * about buswidth alignment in read_buf. | 1194 | * about buswidth alignment in read_buf. |
1194 | */ | 1195 | */ |
1195 | index = start_step * chip->ecc.bytes; | 1196 | index = start_step * chip->ecc.bytes; |
@@ -1224,14 +1225,13 @@ static int nand_read_subpage(struct mtd_info *mtd, struct nand_chip *chip, | |||
1224 | } | 1225 | } |
1225 | 1226 | ||
1226 | /** | 1227 | /** |
1227 | * nand_read_page_hwecc - [REPLACABLE] hardware ecc based page read function | 1228 | * nand_read_page_hwecc - [REPLACEABLE] hardware ECC based page read function |
1228 | * @mtd: mtd info structure | 1229 | * @mtd: mtd info structure |
1229 | * @chip: nand chip info structure | 1230 | * @chip: nand chip info structure |
1230 | * @buf: buffer to store read data | 1231 | * @buf: buffer to store read data |
1231 | * @page: page number to read | 1232 | * @page: page number to read |
1232 | * | 1233 | * |
1233 | * Not for syndrome calculating ecc controllers which need a special oob | 1234 | * Not for syndrome calculating ECC controllers which need a special oob layout. |
1234 | * layout. | ||
1235 | */ | 1235 | */ |
1236 | static int nand_read_page_hwecc(struct mtd_info *mtd, struct nand_chip *chip, | 1236 | static int nand_read_page_hwecc(struct mtd_info *mtd, struct nand_chip *chip, |
1237 | uint8_t *buf, int page) | 1237 | uint8_t *buf, int page) |
@@ -1270,7 +1270,7 @@ static int nand_read_page_hwecc(struct mtd_info *mtd, struct nand_chip *chip, | |||
1270 | } | 1270 | } |
1271 | 1271 | ||
1272 | /** | 1272 | /** |
1273 | * nand_read_page_hwecc_oob_first - [REPLACABLE] hw ecc, read oob first | 1273 | * nand_read_page_hwecc_oob_first - [REPLACEABLE] hw ecc, read oob first |
1274 | * @mtd: mtd info structure | 1274 | * @mtd: mtd info structure |
1275 | * @chip: nand chip info structure | 1275 | * @chip: nand chip info structure |
1276 | * @buf: buffer to store read data | 1276 | * @buf: buffer to store read data |
@@ -1318,7 +1318,7 @@ static int nand_read_page_hwecc_oob_first(struct mtd_info *mtd, | |||
1318 | } | 1318 | } |
1319 | 1319 | ||
1320 | /** | 1320 | /** |
1321 | * nand_read_page_syndrome - [REPLACABLE] hardware ecc syndrom based page read | 1321 | * nand_read_page_syndrome - [REPLACEABLE] hardware ECC syndrome based page read |
1322 | * @mtd: mtd info structure | 1322 | * @mtd: mtd info structure |
1323 | * @chip: nand chip info structure | 1323 | * @chip: nand chip info structure |
1324 | * @buf: buffer to store read data | 1324 | * @buf: buffer to store read data |
@@ -1373,7 +1373,7 @@ static int nand_read_page_syndrome(struct mtd_info *mtd, struct nand_chip *chip, | |||
1373 | } | 1373 | } |
1374 | 1374 | ||
1375 | /** | 1375 | /** |
1376 | * nand_transfer_oob - [Internal] Transfer oob to client buffer | 1376 | * nand_transfer_oob - [INTERN] Transfer oob to client buffer |
1377 | * @chip: nand chip structure | 1377 | * @chip: nand chip structure |
1378 | * @oob: oob destination address | 1378 | * @oob: oob destination address |
1379 | * @ops: oob ops structure | 1379 | * @ops: oob ops structure |
@@ -1421,7 +1421,7 @@ static uint8_t *nand_transfer_oob(struct nand_chip *chip, uint8_t *oob, | |||
1421 | } | 1421 | } |
1422 | 1422 | ||
1423 | /** | 1423 | /** |
1424 | * nand_do_read_ops - [Internal] Read data with ECC | 1424 | * nand_do_read_ops - [INTERN] Read data with ECC |
1425 | * @mtd: MTD device structure | 1425 | * @mtd: MTD device structure |
1426 | * @from: offset to read from | 1426 | * @from: offset to read from |
1427 | * @ops: oob ops structure | 1427 | * @ops: oob ops structure |
@@ -1599,7 +1599,7 @@ static int nand_read(struct mtd_info *mtd, loff_t from, size_t len, | |||
1599 | } | 1599 | } |
1600 | 1600 | ||
1601 | /** | 1601 | /** |
1602 | * nand_read_oob_std - [REPLACABLE] the most common OOB data read function | 1602 | * nand_read_oob_std - [REPLACEABLE] the most common OOB data read function |
1603 | * @mtd: mtd info structure | 1603 | * @mtd: mtd info structure |
1604 | * @chip: nand chip info structure | 1604 | * @chip: nand chip info structure |
1605 | * @page: page number to read | 1605 | * @page: page number to read |
@@ -1617,7 +1617,7 @@ static int nand_read_oob_std(struct mtd_info *mtd, struct nand_chip *chip, | |||
1617 | } | 1617 | } |
1618 | 1618 | ||
1619 | /** | 1619 | /** |
1620 | * nand_read_oob_syndrome - [REPLACABLE] OOB data read function for HW ECC | 1620 | * nand_read_oob_syndrome - [REPLACEABLE] OOB data read function for HW ECC |
1621 | * with syndromes | 1621 | * with syndromes |
1622 | * @mtd: mtd info structure | 1622 | * @mtd: mtd info structure |
1623 | * @chip: nand chip info structure | 1623 | * @chip: nand chip info structure |
@@ -1656,7 +1656,7 @@ static int nand_read_oob_syndrome(struct mtd_info *mtd, struct nand_chip *chip, | |||
1656 | } | 1656 | } |
1657 | 1657 | ||
1658 | /** | 1658 | /** |
1659 | * nand_write_oob_std - [REPLACABLE] the most common OOB data write function | 1659 | * nand_write_oob_std - [REPLACEABLE] the most common OOB data write function |
1660 | * @mtd: mtd info structure | 1660 | * @mtd: mtd info structure |
1661 | * @chip: nand chip info structure | 1661 | * @chip: nand chip info structure |
1662 | * @page: page number to write | 1662 | * @page: page number to write |
@@ -1679,7 +1679,7 @@ static int nand_write_oob_std(struct mtd_info *mtd, struct nand_chip *chip, | |||
1679 | } | 1679 | } |
1680 | 1680 | ||
1681 | /** | 1681 | /** |
1682 | * nand_write_oob_syndrome - [REPLACABLE] OOB data write function for HW ECC | 1682 | * nand_write_oob_syndrome - [REPLACEABLE] OOB data write function for HW ECC |
1683 | * with syndrome - only for large page flash | 1683 | * with syndrome - only for large page flash |
1684 | * @mtd: mtd info structure | 1684 | * @mtd: mtd info structure |
1685 | * @chip: nand chip info structure | 1685 | * @chip: nand chip info structure |
@@ -1738,7 +1738,7 @@ static int nand_write_oob_syndrome(struct mtd_info *mtd, | |||
1738 | } | 1738 | } |
1739 | 1739 | ||
1740 | /** | 1740 | /** |
1741 | * nand_do_read_oob - [Intern] NAND read out-of-band | 1741 | * nand_do_read_oob - [INTERN] NAND read out-of-band |
1742 | * @mtd: MTD device structure | 1742 | * @mtd: MTD device structure |
1743 | * @from: offset to read from | 1743 | * @from: offset to read from |
1744 | * @ops: oob operations description structure | 1744 | * @ops: oob operations description structure |
@@ -1878,13 +1878,12 @@ out: | |||
1878 | 1878 | ||
1879 | 1879 | ||
1880 | /** | 1880 | /** |
1881 | * nand_write_page_raw - [Intern] raw page write function | 1881 | * nand_write_page_raw - [INTERN] raw page write function |
1882 | * @mtd: mtd info structure | 1882 | * @mtd: mtd info structure |
1883 | * @chip: nand chip info structure | 1883 | * @chip: nand chip info structure |
1884 | * @buf: data buffer | 1884 | * @buf: data buffer |
1885 | * | 1885 | * |
1886 | * Not for syndrome calculating ecc controllers, which use a special oob | 1886 | * Not for syndrome calculating ECC controllers, which use a special oob layout. |
1887 | * layout. | ||
1888 | */ | 1887 | */ |
1889 | static void nand_write_page_raw(struct mtd_info *mtd, struct nand_chip *chip, | 1888 | static void nand_write_page_raw(struct mtd_info *mtd, struct nand_chip *chip, |
1890 | const uint8_t *buf) | 1889 | const uint8_t *buf) |
@@ -1894,7 +1893,7 @@ static void nand_write_page_raw(struct mtd_info *mtd, struct nand_chip *chip, | |||
1894 | } | 1893 | } |
1895 | 1894 | ||
1896 | /** | 1895 | /** |
1897 | * nand_write_page_raw_syndrome - [Intern] raw page write function | 1896 | * nand_write_page_raw_syndrome - [INTERN] raw page write function |
1898 | * @mtd: mtd info structure | 1897 | * @mtd: mtd info structure |
1899 | * @chip: nand chip info structure | 1898 | * @chip: nand chip info structure |
1900 | * @buf: data buffer | 1899 | * @buf: data buffer |
@@ -1933,7 +1932,7 @@ static void nand_write_page_raw_syndrome(struct mtd_info *mtd, | |||
1933 | chip->write_buf(mtd, oob, size); | 1932 | chip->write_buf(mtd, oob, size); |
1934 | } | 1933 | } |
1935 | /** | 1934 | /** |
1936 | * nand_write_page_swecc - [REPLACABLE] software ecc based page write function | 1935 | * nand_write_page_swecc - [REPLACEABLE] software ECC based page write function |
1937 | * @mtd: mtd info structure | 1936 | * @mtd: mtd info structure |
1938 | * @chip: nand chip info structure | 1937 | * @chip: nand chip info structure |
1939 | * @buf: data buffer | 1938 | * @buf: data buffer |
@@ -1948,7 +1947,7 @@ static void nand_write_page_swecc(struct mtd_info *mtd, struct nand_chip *chip, | |||
1948 | const uint8_t *p = buf; | 1947 | const uint8_t *p = buf; |
1949 | uint32_t *eccpos = chip->ecc.layout->eccpos; | 1948 | uint32_t *eccpos = chip->ecc.layout->eccpos; |
1950 | 1949 | ||
1951 | /* Software ecc calculation */ | 1950 | /* Software ECC calculation */ |
1952 | for (i = 0; eccsteps; eccsteps--, i += eccbytes, p += eccsize) | 1951 | for (i = 0; eccsteps; eccsteps--, i += eccbytes, p += eccsize) |
1953 | chip->ecc.calculate(mtd, p, &ecc_calc[i]); | 1952 | chip->ecc.calculate(mtd, p, &ecc_calc[i]); |
1954 | 1953 | ||
@@ -1959,7 +1958,7 @@ static void nand_write_page_swecc(struct mtd_info *mtd, struct nand_chip *chip, | |||
1959 | } | 1958 | } |
1960 | 1959 | ||
1961 | /** | 1960 | /** |
1962 | * nand_write_page_hwecc - [REPLACABLE] hardware ecc based page write function | 1961 | * nand_write_page_hwecc - [REPLACEABLE] hardware ECC based page write function |
1963 | * @mtd: mtd info structure | 1962 | * @mtd: mtd info structure |
1964 | * @chip: nand chip info structure | 1963 | * @chip: nand chip info structure |
1965 | * @buf: data buffer | 1964 | * @buf: data buffer |
@@ -1987,7 +1986,7 @@ static void nand_write_page_hwecc(struct mtd_info *mtd, struct nand_chip *chip, | |||
1987 | } | 1986 | } |
1988 | 1987 | ||
1989 | /** | 1988 | /** |
1990 | * nand_write_page_syndrome - [REPLACABLE] hardware ecc syndrom based page write | 1989 | * nand_write_page_syndrome - [REPLACEABLE] hardware ECC syndrome based page write |
1991 | * @mtd: mtd info structure | 1990 | * @mtd: mtd info structure |
1992 | * @chip: nand chip info structure | 1991 | * @chip: nand chip info structure |
1993 | * @buf: data buffer | 1992 | * @buf: data buffer |
@@ -2052,7 +2051,7 @@ static int nand_write_page(struct mtd_info *mtd, struct nand_chip *chip, | |||
2052 | chip->ecc.write_page(mtd, chip, buf); | 2051 | chip->ecc.write_page(mtd, chip, buf); |
2053 | 2052 | ||
2054 | /* | 2053 | /* |
2055 | * Cached progamming disabled for now, Not sure if its worth the | 2054 | * Cached progamming disabled for now. Not sure if it's worth the |
2056 | * trouble. The speed gain is not very impressive. (2.3->2.6Mib/s). | 2055 | * trouble. The speed gain is not very impressive. (2.3->2.6Mib/s). |
2057 | */ | 2056 | */ |
2058 | cached = 0; | 2057 | cached = 0; |
@@ -2087,7 +2086,7 @@ static int nand_write_page(struct mtd_info *mtd, struct nand_chip *chip, | |||
2087 | } | 2086 | } |
2088 | 2087 | ||
2089 | /** | 2088 | /** |
2090 | * nand_fill_oob - [Internal] Transfer client buffer to oob | 2089 | * nand_fill_oob - [INTERN] Transfer client buffer to oob |
2091 | * @mtd: MTD device structure | 2090 | * @mtd: MTD device structure |
2092 | * @oob: oob data buffer | 2091 | * @oob: oob data buffer |
2093 | * @len: oob data write length | 2092 | * @len: oob data write length |
@@ -2145,7 +2144,7 @@ static uint8_t *nand_fill_oob(struct mtd_info *mtd, uint8_t *oob, size_t len, | |||
2145 | #define NOTALIGNED(x) ((x & (chip->subpagesize - 1)) != 0) | 2144 | #define NOTALIGNED(x) ((x & (chip->subpagesize - 1)) != 0) |
2146 | 2145 | ||
2147 | /** | 2146 | /** |
2148 | * nand_do_write_ops - [Internal] NAND write with ECC | 2147 | * nand_do_write_ops - [INTERN] NAND write with ECC |
2149 | * @mtd: MTD device structure | 2148 | * @mtd: MTD device structure |
2150 | * @to: offset to write to | 2149 | * @to: offset to write to |
2151 | * @ops: oob operations description structure | 2150 | * @ops: oob operations description structure |
@@ -2454,7 +2453,7 @@ out: | |||
2454 | } | 2453 | } |
2455 | 2454 | ||
2456 | /** | 2455 | /** |
2457 | * single_erease_cmd - [GENERIC] NAND standard block erase command function | 2456 | * single_erase_cmd - [GENERIC] NAND standard block erase command function |
2458 | * @mtd: MTD device structure | 2457 | * @mtd: MTD device structure |
2459 | * @page: the page address of the block which will be erased | 2458 | * @page: the page address of the block which will be erased |
2460 | * | 2459 | * |
@@ -2469,7 +2468,7 @@ static void single_erase_cmd(struct mtd_info *mtd, int page) | |||
2469 | } | 2468 | } |
2470 | 2469 | ||
2471 | /** | 2470 | /** |
2472 | * multi_erease_cmd - [GENERIC] AND specific block erase command function | 2471 | * multi_erase_cmd - [GENERIC] AND specific block erase command function |
2473 | * @mtd: MTD device structure | 2472 | * @mtd: MTD device structure |
2474 | * @page: the page address of the block which will be erased | 2473 | * @page: the page address of the block which will be erased |
2475 | * | 2474 | * |
@@ -2500,7 +2499,7 @@ static int nand_erase(struct mtd_info *mtd, struct erase_info *instr) | |||
2500 | 2499 | ||
2501 | #define BBT_PAGE_MASK 0xffffff3f | 2500 | #define BBT_PAGE_MASK 0xffffff3f |
2502 | /** | 2501 | /** |
2503 | * nand_erase_nand - [Internal] erase block(s) | 2502 | * nand_erase_nand - [INTERN] erase block(s) |
2504 | * @mtd: MTD device structure | 2503 | * @mtd: MTD device structure |
2505 | * @instr: erase instruction | 2504 | * @instr: erase instruction |
2506 | * @allowbbt: allow erasing the bbt area | 2505 | * @allowbbt: allow erasing the bbt area |
@@ -2550,7 +2549,7 @@ int nand_erase_nand(struct mtd_info *mtd, struct erase_info *instr, | |||
2550 | * If BBT requires refresh, set the BBT page mask to see if the BBT | 2549 | * If BBT requires refresh, set the BBT page mask to see if the BBT |
2551 | * should be rewritten. Otherwise the mask is set to 0xffffffff which | 2550 | * should be rewritten. Otherwise the mask is set to 0xffffffff which |
2552 | * can not be matched. This is also done when the bbt is actually | 2551 | * can not be matched. This is also done when the bbt is actually |
2553 | * erased to avoid recusrsive updates. | 2552 | * erased to avoid recursive updates. |
2554 | */ | 2553 | */ |
2555 | if (chip->options & BBT_AUTO_REFRESH && !allowbbt) | 2554 | if (chip->options & BBT_AUTO_REFRESH && !allowbbt) |
2556 | bbt_masked_page = chip->bbt_td->pages[chipnr] & BBT_PAGE_MASK; | 2555 | bbt_masked_page = chip->bbt_td->pages[chipnr] & BBT_PAGE_MASK; |
@@ -2824,7 +2823,7 @@ static int nand_flash_detect_onfi(struct mtd_info *mtd, struct nand_chip *chip, | |||
2824 | int i; | 2823 | int i; |
2825 | int val; | 2824 | int val; |
2826 | 2825 | ||
2827 | /* Try ONFI for unknow chip or LP */ | 2826 | /* Try ONFI for unknown chip or LP */ |
2828 | chip->cmdfunc(mtd, NAND_CMD_READID, 0x20, -1); | 2827 | chip->cmdfunc(mtd, NAND_CMD_READID, 0x20, -1); |
2829 | if (chip->read_byte(mtd) != 'O' || chip->read_byte(mtd) != 'N' || | 2828 | if (chip->read_byte(mtd) != 'O' || chip->read_byte(mtd) != 'N' || |
2830 | chip->read_byte(mtd) != 'F' || chip->read_byte(mtd) != 'I') | 2829 | chip->read_byte(mtd) != 'F' || chip->read_byte(mtd) != 'I') |
@@ -3395,7 +3394,7 @@ int nand_scan_tail(struct mtd_info *mtd) | |||
3395 | */ | 3394 | */ |
3396 | chip->ecc.steps = mtd->writesize / chip->ecc.size; | 3395 | chip->ecc.steps = mtd->writesize / chip->ecc.size; |
3397 | if (chip->ecc.steps * chip->ecc.size != mtd->writesize) { | 3396 | if (chip->ecc.steps * chip->ecc.size != mtd->writesize) { |
3398 | printk(KERN_WARNING "Invalid ecc parameters\n"); | 3397 | printk(KERN_WARNING "Invalid ECC parameters\n"); |
3399 | BUG(); | 3398 | BUG(); |
3400 | } | 3399 | } |
3401 | chip->ecc.total = chip->ecc.steps * chip->ecc.bytes; | 3400 | chip->ecc.total = chip->ecc.steps * chip->ecc.bytes; |
diff --git a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c index 8875d6db2455..f30807c3a48d 100644 --- a/drivers/mtd/nand/nand_bbt.c +++ b/drivers/mtd/nand/nand_bbt.c | |||
@@ -149,7 +149,7 @@ static int check_short_pattern(uint8_t *buf, struct nand_bbt_descr *td) | |||
149 | * add_marker_len - compute the length of the marker in data area | 149 | * add_marker_len - compute the length of the marker in data area |
150 | * @td: BBT descriptor used for computation | 150 | * @td: BBT descriptor used for computation |
151 | * | 151 | * |
152 | * The length will be 0 if the markeris located in OOB area. | 152 | * The length will be 0 if the marker is located in OOB area. |
153 | */ | 153 | */ |
154 | static u32 add_marker_len(struct nand_bbt_descr *td) | 154 | static u32 add_marker_len(struct nand_bbt_descr *td) |
155 | { | 155 | { |
@@ -170,7 +170,7 @@ static u32 add_marker_len(struct nand_bbt_descr *td) | |||
170 | * @buf: temporary buffer | 170 | * @buf: temporary buffer |
171 | * @page: the starting page | 171 | * @page: the starting page |
172 | * @num: the number of bbt descriptors to read | 172 | * @num: the number of bbt descriptors to read |
173 | * @td: the bbt describtion table | 173 | * @td: the bbt describtion table |
174 | * @offs: offset in the memory table | 174 | * @offs: offset in the memory table |
175 | * | 175 | * |
176 | * Read the bad block table starting from page. | 176 | * Read the bad block table starting from page. |
@@ -1241,7 +1241,7 @@ static struct nand_bbt_descr agand_flashbased = { | |||
1241 | .pattern = scan_agand_pattern | 1241 | .pattern = scan_agand_pattern |
1242 | }; | 1242 | }; |
1243 | 1243 | ||
1244 | /* Generic flash bbt decriptors */ | 1244 | /* Generic flash bbt descriptors */ |
1245 | static uint8_t bbt_pattern[] = {'B', 'b', 't', '0' }; | 1245 | static uint8_t bbt_pattern[] = {'B', 'b', 't', '0' }; |
1246 | static uint8_t mirror_pattern[] = {'1', 't', 'b', 'B' }; | 1246 | static uint8_t mirror_pattern[] = {'1', 't', 'b', 'B' }; |
1247 | 1247 | ||
@@ -1286,7 +1286,7 @@ static struct nand_bbt_descr bbt_mirror_no_bbt_descr = { | |||
1286 | }; | 1286 | }; |
1287 | 1287 | ||
1288 | /** | 1288 | /** |
1289 | * nand_create_default_bbt_descr - [Internal] Creates a BBT descriptor structure | 1289 | * nand_create_default_bbt_descr - [INTERN] Creates a BBT descriptor structure |
1290 | * @this: NAND chip to create descriptor for | 1290 | * @this: NAND chip to create descriptor for |
1291 | * | 1291 | * |
1292 | * This function allocates and initializes a nand_bbt_descr for BBM detection | 1292 | * This function allocates and initializes a nand_bbt_descr for BBM detection |
diff --git a/drivers/mtd/nand/nand_ecc.c b/drivers/mtd/nand/nand_ecc.c index 271b8e735e8f..b7cfe0d37121 100644 --- a/drivers/mtd/nand/nand_ecc.c +++ b/drivers/mtd/nand/nand_ecc.c | |||
@@ -110,7 +110,7 @@ static const char bitsperbyte[256] = { | |||
110 | 110 | ||
111 | /* | 111 | /* |
112 | * addressbits is a lookup table to filter out the bits from the xor-ed | 112 | * addressbits is a lookup table to filter out the bits from the xor-ed |
113 | * ecc data that identify the faulty location. | 113 | * ECC data that identify the faulty location. |
114 | * this is only used for repairing parity | 114 | * this is only used for repairing parity |
115 | * see the comments in nand_correct_data for more details | 115 | * see the comments in nand_correct_data for more details |
116 | */ | 116 | */ |
@@ -153,7 +153,7 @@ static const char addressbits[256] = { | |||
153 | * __nand_calculate_ecc - [NAND Interface] Calculate 3-byte ECC for 256/512-byte | 153 | * __nand_calculate_ecc - [NAND Interface] Calculate 3-byte ECC for 256/512-byte |
154 | * block | 154 | * block |
155 | * @buf: input buffer with raw data | 155 | * @buf: input buffer with raw data |
156 | * @eccsize: data bytes per ecc step (256 or 512) | 156 | * @eccsize: data bytes per ECC step (256 or 512) |
157 | * @code: output buffer with ECC | 157 | * @code: output buffer with ECC |
158 | */ | 158 | */ |
159 | void __nand_calculate_ecc(const unsigned char *buf, unsigned int eccsize, | 159 | void __nand_calculate_ecc(const unsigned char *buf, unsigned int eccsize, |
@@ -348,7 +348,7 @@ void __nand_calculate_ecc(const unsigned char *buf, unsigned int eccsize, | |||
348 | rp17 = (par ^ rp16) & 0xff; | 348 | rp17 = (par ^ rp16) & 0xff; |
349 | 349 | ||
350 | /* | 350 | /* |
351 | * Finally calculate the ecc bits. | 351 | * Finally calculate the ECC bits. |
352 | * Again here it might seem that there are performance optimisations | 352 | * Again here it might seem that there are performance optimisations |
353 | * possible, but benchmarks showed that on the system this is developed | 353 | * possible, but benchmarks showed that on the system this is developed |
354 | * the code below is the fastest | 354 | * the code below is the fastest |
@@ -436,7 +436,7 @@ EXPORT_SYMBOL(nand_calculate_ecc); | |||
436 | * @buf: raw data read from the chip | 436 | * @buf: raw data read from the chip |
437 | * @read_ecc: ECC from the chip | 437 | * @read_ecc: ECC from the chip |
438 | * @calc_ecc: the ECC calculated from raw data | 438 | * @calc_ecc: the ECC calculated from raw data |
439 | * @eccsize: data bytes per ecc step (256 or 512) | 439 | * @eccsize: data bytes per ECC step (256 or 512) |
440 | * | 440 | * |
441 | * Detect and correct a 1 bit error for eccsize byte block | 441 | * Detect and correct a 1 bit error for eccsize byte block |
442 | */ | 442 | */ |
@@ -505,7 +505,7 @@ int __nand_correct_data(unsigned char *buf, | |||
505 | } | 505 | } |
506 | /* count nr of bits; use table lookup, faster than calculating it */ | 506 | /* count nr of bits; use table lookup, faster than calculating it */ |
507 | if ((bitsperbyte[b0] + bitsperbyte[b1] + bitsperbyte[b2]) == 1) | 507 | if ((bitsperbyte[b0] + bitsperbyte[b1] + bitsperbyte[b2]) == 1) |
508 | return 1; /* error in ecc data; no action needed */ | 508 | return 1; /* error in ECC data; no action needed */ |
509 | 509 | ||
510 | printk(KERN_ERR "uncorrectable error : "); | 510 | printk(KERN_ERR "uncorrectable error : "); |
511 | return -1; | 511 | return -1; |
diff --git a/drivers/mtd/nand/rtc_from4.c b/drivers/mtd/nand/rtc_from4.c index a07da2a3beee..33fe922b972c 100644 --- a/drivers/mtd/nand/rtc_from4.c +++ b/drivers/mtd/nand/rtc_from4.c | |||
@@ -351,7 +351,7 @@ static int rtc_from4_correct_data(struct mtd_info *mtd, const u_char *buf, u_cha | |||
351 | return 0; | 351 | return 0; |
352 | } | 352 | } |
353 | 353 | ||
354 | /* Read the syndrom pattern from the FPGA and correct the bitorder */ | 354 | /* Read the syndrome pattern from the FPGA and correct the bitorder */ |
355 | rs_ecc = (volatile unsigned short *)(rtc_from4_fio_base + RTC_FROM4_RS_ECC); | 355 | rs_ecc = (volatile unsigned short *)(rtc_from4_fio_base + RTC_FROM4_RS_ECC); |
356 | for (i = 0; i < 8; i++) { | 356 | for (i = 0; i < 8; i++) { |
357 | ecc[i] = bitrev8(*rs_ecc); | 357 | ecc[i] = bitrev8(*rs_ecc); |
diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c index 51800a7ef7f8..30c652c071e8 100644 --- a/drivers/mtd/onenand/onenand_base.c +++ b/drivers/mtd/onenand/onenand_base.c | |||
@@ -1015,7 +1015,7 @@ static void onenand_release_device(struct mtd_info *mtd) | |||
1015 | } | 1015 | } |
1016 | 1016 | ||
1017 | /** | 1017 | /** |
1018 | * onenand_transfer_auto_oob - [Internal] oob auto-placement transfer | 1018 | * onenand_transfer_auto_oob - [INTERN] oob auto-placement transfer |
1019 | * @param mtd MTD device structure | 1019 | * @param mtd MTD device structure |
1020 | * @param buf destination address | 1020 | * @param buf destination address |
1021 | * @param column oob offset to read from | 1021 | * @param column oob offset to read from |
@@ -1821,7 +1821,7 @@ static int onenand_panic_write(struct mtd_info *mtd, loff_t to, size_t len, | |||
1821 | } | 1821 | } |
1822 | 1822 | ||
1823 | /** | 1823 | /** |
1824 | * onenand_fill_auto_oob - [Internal] oob auto-placement transfer | 1824 | * onenand_fill_auto_oob - [INTERN] oob auto-placement transfer |
1825 | * @param mtd MTD device structure | 1825 | * @param mtd MTD device structure |
1826 | * @param oob_buf oob buffer | 1826 | * @param oob_buf oob buffer |
1827 | * @param buf source address | 1827 | * @param buf source address |
@@ -2055,7 +2055,7 @@ static int onenand_write_ops_nolock(struct mtd_info *mtd, loff_t to, | |||
2055 | 2055 | ||
2056 | 2056 | ||
2057 | /** | 2057 | /** |
2058 | * onenand_write_oob_nolock - [Internal] OneNAND write out-of-band | 2058 | * onenand_write_oob_nolock - [INTERN] OneNAND write out-of-band |
2059 | * @param mtd MTD device structure | 2059 | * @param mtd MTD device structure |
2060 | * @param to offset to write to | 2060 | * @param to offset to write to |
2061 | * @param len number of bytes to write | 2061 | * @param len number of bytes to write |
@@ -2281,7 +2281,7 @@ static int onenand_multiblock_erase_verify(struct mtd_info *mtd, | |||
2281 | } | 2281 | } |
2282 | 2282 | ||
2283 | /** | 2283 | /** |
2284 | * onenand_multiblock_erase - [Internal] erase block(s) using multiblock erase | 2284 | * onenand_multiblock_erase - [INTERN] erase block(s) using multiblock erase |
2285 | * @param mtd MTD device structure | 2285 | * @param mtd MTD device structure |
2286 | * @param instr erase instruction | 2286 | * @param instr erase instruction |
2287 | * @param region erase region | 2287 | * @param region erase region |
@@ -2397,7 +2397,7 @@ static int onenand_multiblock_erase(struct mtd_info *mtd, | |||
2397 | 2397 | ||
2398 | 2398 | ||
2399 | /** | 2399 | /** |
2400 | * onenand_block_by_block_erase - [Internal] erase block(s) using regular erase | 2400 | * onenand_block_by_block_erase - [INTERN] erase block(s) using regular erase |
2401 | * @param mtd MTD device structure | 2401 | * @param mtd MTD device structure |
2402 | * @param instr erase instruction | 2402 | * @param instr erase instruction |
2403 | * @param region erase region | 2403 | * @param region erase region |
@@ -2922,7 +2922,7 @@ static int onenand_otp_command(struct mtd_info *mtd, int cmd, loff_t addr, | |||
2922 | } | 2922 | } |
2923 | 2923 | ||
2924 | /** | 2924 | /** |
2925 | * onenand_otp_write_oob_nolock - [Internal] OneNAND write out-of-band, specific to OTP | 2925 | * onenand_otp_write_oob_nolock - [INTERN] OneNAND write out-of-band, specific to OTP |
2926 | * @param mtd MTD device structure | 2926 | * @param mtd MTD device structure |
2927 | * @param to offset to write to | 2927 | * @param to offset to write to |
2928 | * @param len number of bytes to write | 2928 | * @param len number of bytes to write |
diff --git a/drivers/mtd/sm_ftl.c b/drivers/mtd/sm_ftl.c index ed3d6cd2c6dc..a8befde81ce9 100644 --- a/drivers/mtd/sm_ftl.c +++ b/drivers/mtd/sm_ftl.c | |||
@@ -138,7 +138,7 @@ static int sm_get_lba(uint8_t *lba) | |||
138 | if ((lba[0] & 0xF8) != 0x10) | 138 | if ((lba[0] & 0xF8) != 0x10) |
139 | return -2; | 139 | return -2; |
140 | 140 | ||
141 | /* check parity - endianess doesn't matter */ | 141 | /* check parity - endianness doesn't matter */ |
142 | if (hweight16(*(uint16_t *)lba) & 1) | 142 | if (hweight16(*(uint16_t *)lba) & 1) |
143 | return -2; | 143 | return -2; |
144 | 144 | ||
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index 67774f9d57cc..62d56f933b87 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h | |||
@@ -172,7 +172,7 @@ struct mtd_info { | |||
172 | const char *name; | 172 | const char *name; |
173 | int index; | 173 | int index; |
174 | 174 | ||
175 | /* ecc layout structure pointer - read only ! */ | 175 | /* ECC layout structure pointer - read only! */ |
176 | struct nand_ecclayout *ecclayout; | 176 | struct nand_ecclayout *ecclayout; |
177 | 177 | ||
178 | /* Data for variable erase regions. If numeraseregions is zero, | 178 | /* Data for variable erase regions. If numeraseregions is zero, |
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index 0f239e714219..877fbbda02cd 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h | |||
@@ -42,10 +42,10 @@ extern void nand_release(struct mtd_info *mtd); | |||
42 | /* Internal helper for board drivers which need to override command function */ | 42 | /* Internal helper for board drivers which need to override command function */ |
43 | extern void nand_wait_ready(struct mtd_info *mtd); | 43 | extern void nand_wait_ready(struct mtd_info *mtd); |
44 | 44 | ||
45 | /* locks all blockes present in the device */ | 45 | /* locks all blocks present in the device */ |
46 | extern int nand_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len); | 46 | extern int nand_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len); |
47 | 47 | ||
48 | /* unlocks specified locked blockes */ | 48 | /* unlocks specified locked blocks */ |
49 | extern int nand_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len); | 49 | extern int nand_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len); |
50 | 50 | ||
51 | /* The maximum number of NAND chips in an array */ | 51 | /* The maximum number of NAND chips in an array */ |
@@ -150,7 +150,7 @@ typedef enum { | |||
150 | #define NAND_ECC_READ 0 | 150 | #define NAND_ECC_READ 0 |
151 | /* Reset Hardware ECC for write */ | 151 | /* Reset Hardware ECC for write */ |
152 | #define NAND_ECC_WRITE 1 | 152 | #define NAND_ECC_WRITE 1 |
153 | /* Enable Hardware ECC before syndrom is read back from flash */ | 153 | /* Enable Hardware ECC before syndrome is read back from flash */ |
154 | #define NAND_ECC_READSYN 2 | 154 | #define NAND_ECC_READSYN 2 |
155 | 155 | ||
156 | /* Bit mask for flags passed to do_nand_read_ecc */ | 156 | /* Bit mask for flags passed to do_nand_read_ecc */ |
@@ -163,7 +163,7 @@ typedef enum { | |||
163 | */ | 163 | */ |
164 | /* Chip can not auto increment pages */ | 164 | /* Chip can not auto increment pages */ |
165 | #define NAND_NO_AUTOINCR 0x00000001 | 165 | #define NAND_NO_AUTOINCR 0x00000001 |
166 | /* Buswitdh is 16 bit */ | 166 | /* Buswidth is 16 bit */ |
167 | #define NAND_BUSWIDTH_16 0x00000002 | 167 | #define NAND_BUSWIDTH_16 0x00000002 |
168 | /* Device supports partial programming without padding */ | 168 | /* Device supports partial programming without padding */ |
169 | #define NAND_NO_PADDING 0x00000004 | 169 | #define NAND_NO_PADDING 0x00000004 |
@@ -319,26 +319,26 @@ struct nand_hw_control { | |||
319 | }; | 319 | }; |
320 | 320 | ||
321 | /** | 321 | /** |
322 | * struct nand_ecc_ctrl - Control structure for ecc | 322 | * struct nand_ecc_ctrl - Control structure for ECC |
323 | * @mode: ecc mode | 323 | * @mode: ECC mode |
324 | * @steps: number of ecc steps per page | 324 | * @steps: number of ECC steps per page |
325 | * @size: data bytes per ecc step | 325 | * @size: data bytes per ECC step |
326 | * @bytes: ecc bytes per step | 326 | * @bytes: ECC bytes per step |
327 | * @total: total number of ecc bytes per page | 327 | * @total: total number of ECC bytes per page |
328 | * @prepad: padding information for syndrome based ecc generators | 328 | * @prepad: padding information for syndrome based ECC generators |
329 | * @postpad: padding information for syndrome based ecc generators | 329 | * @postpad: padding information for syndrome based ECC generators |
330 | * @layout: ECC layout control struct pointer | 330 | * @layout: ECC layout control struct pointer |
331 | * @priv: pointer to private ecc control data | 331 | * @priv: pointer to private ECC control data |
332 | * @hwctl: function to control hardware ecc generator. Must only | 332 | * @hwctl: function to control hardware ECC generator. Must only |
333 | * be provided if an hardware ECC is available | 333 | * be provided if an hardware ECC is available |
334 | * @calculate: function for ecc calculation or readback from ecc hardware | 334 | * @calculate: function for ECC calculation or readback from ECC hardware |
335 | * @correct: function for ecc correction, matching to ecc generator (sw/hw) | 335 | * @correct: function for ECC correction, matching to ECC generator (sw/hw) |
336 | * @read_page_raw: function to read a raw page without ECC | 336 | * @read_page_raw: function to read a raw page without ECC |
337 | * @write_page_raw: function to write a raw page without ECC | 337 | * @write_page_raw: function to write a raw page without ECC |
338 | * @read_page: function to read a page according to the ecc generator | 338 | * @read_page: function to read a page according to the ECC generator |
339 | * requirements. | 339 | * requirements. |
340 | * @read_subpage: function to read parts of the page covered by ECC. | 340 | * @read_subpage: function to read parts of the page covered by ECC. |
341 | * @write_page: function to write a page according to the ecc generator | 341 | * @write_page: function to write a page according to the ECC generator |
342 | * requirements. | 342 | * requirements. |
343 | * @read_oob: function to read chip OOB data | 343 | * @read_oob: function to read chip OOB data |
344 | * @write_oob: function to write chip OOB data | 344 | * @write_oob: function to write chip OOB data |
@@ -376,8 +376,8 @@ struct nand_ecc_ctrl { | |||
376 | 376 | ||
377 | /** | 377 | /** |
378 | * struct nand_buffers - buffer structure for read/write | 378 | * struct nand_buffers - buffer structure for read/write |
379 | * @ecccalc: buffer for calculated ecc | 379 | * @ecccalc: buffer for calculated ECC |
380 | * @ecccode: buffer for ecc read from flash | 380 | * @ecccode: buffer for ECC read from flash |
381 | * @databuf: buffer for data - dynamically sized | 381 | * @databuf: buffer for data - dynamically sized |
382 | * | 382 | * |
383 | * Do not change the order of buffers. databuf and oobrbuf must be in | 383 | * Do not change the order of buffers. databuf and oobrbuf must be in |
@@ -410,7 +410,7 @@ struct nand_buffers { | |||
410 | * mtd->oobsize, mtd->writesize and so on. | 410 | * mtd->oobsize, mtd->writesize and so on. |
411 | * @id_data contains the 8 bytes values of NAND_CMD_READID. | 411 | * @id_data contains the 8 bytes values of NAND_CMD_READID. |
412 | * Return with the bus width. | 412 | * Return with the bus width. |
413 | * @dev_ready: [BOARDSPECIFIC] hardwarespecific function for accesing | 413 | * @dev_ready: [BOARDSPECIFIC] hardwarespecific function for accessing |
414 | * device ready/busy line. If set to NULL no access to | 414 | * device ready/busy line. If set to NULL no access to |
415 | * ready/busy is available and the ready/busy information | 415 | * ready/busy is available and the ready/busy information |
416 | * is read from the chip status register. | 416 | * is read from the chip status register. |
@@ -418,7 +418,7 @@ struct nand_buffers { | |||
418 | * commands to the chip. | 418 | * commands to the chip. |
419 | * @waitfunc: [REPLACEABLE] hardwarespecific function for wait on | 419 | * @waitfunc: [REPLACEABLE] hardwarespecific function for wait on |
420 | * ready. | 420 | * ready. |
421 | * @ecc: [BOARDSPECIFIC] ecc control ctructure | 421 | * @ecc: [BOARDSPECIFIC] ECC control structure |
422 | * @buffers: buffer structure for read/write | 422 | * @buffers: buffer structure for read/write |
423 | * @hwcontrol: platform-specific hardware control structure | 423 | * @hwcontrol: platform-specific hardware control structure |
424 | * @ops: oob operation operands | 424 | * @ops: oob operation operands |
@@ -455,7 +455,7 @@ struct nand_buffers { | |||
455 | * non 0 if ONFI supported. | 455 | * non 0 if ONFI supported. |
456 | * @onfi_params: [INTERN] holds the ONFI page parameter when ONFI is | 456 | * @onfi_params: [INTERN] holds the ONFI page parameter when ONFI is |
457 | * supported, 0 otherwise. | 457 | * supported, 0 otherwise. |
458 | * @ecclayout: [REPLACEABLE] the default ecc placement scheme | 458 | * @ecclayout: [REPLACEABLE] the default ECC placement scheme |
459 | * @bbt: [INTERN] bad block table pointer | 459 | * @bbt: [INTERN] bad block table pointer |
460 | * @bbt_td: [REPLACEABLE] bad block table descriptor for flash | 460 | * @bbt_td: [REPLACEABLE] bad block table descriptor for flash |
461 | * lookup. | 461 | * lookup. |
@@ -463,7 +463,7 @@ struct nand_buffers { | |||
463 | * @badblock_pattern: [REPLACEABLE] bad block scan pattern used for initial | 463 | * @badblock_pattern: [REPLACEABLE] bad block scan pattern used for initial |
464 | * bad block scan. | 464 | * bad block scan. |
465 | * @controller: [REPLACEABLE] a pointer to a hardware controller | 465 | * @controller: [REPLACEABLE] a pointer to a hardware controller |
466 | * structure which is shared among multiple independend | 466 | * structure which is shared among multiple independent |
467 | * devices. | 467 | * devices. |
468 | * @priv: [OPTIONAL] pointer to private chip date | 468 | * @priv: [OPTIONAL] pointer to private chip date |
469 | * @errstat: [OPTIONAL] hardware specific function to perform | 469 | * @errstat: [OPTIONAL] hardware specific function to perform |
@@ -604,7 +604,7 @@ extern int nand_do_read(struct mtd_info *mtd, loff_t from, size_t len, | |||
604 | * @chip_delay: R/B delay value in us | 604 | * @chip_delay: R/B delay value in us |
605 | * @options: Option flags, e.g. 16bit buswidth | 605 | * @options: Option flags, e.g. 16bit buswidth |
606 | * @bbt_options: BBT option flags, e.g. NAND_BBT_USE_FLASH | 606 | * @bbt_options: BBT option flags, e.g. NAND_BBT_USE_FLASH |
607 | * @ecclayout: ecc layout info structure | 607 | * @ecclayout: ECC layout info structure |
608 | * @part_probe_types: NULL-terminated array of probe types | 608 | * @part_probe_types: NULL-terminated array of probe types |
609 | * @set_parts: platform specific function to set partitions | 609 | * @set_parts: platform specific function to set partitions |
610 | * @priv: hardware controller specific settings | 610 | * @priv: hardware controller specific settings |