aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/tests/mtd_pagetest.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/tests/mtd_pagetest.c')
-rw-r--r--drivers/mtd/tests/mtd_pagetest.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/mtd/tests/mtd_pagetest.c b/drivers/mtd/tests/mtd_pagetest.c
index 271819fabb55..6d62e24a03ed 100644
--- a/drivers/mtd/tests/mtd_pagetest.c
+++ b/drivers/mtd/tests/mtd_pagetest.c
@@ -127,7 +127,7 @@ static int verify_eraseblock(int ebnum)
127 set_random_data(writebuf, mtd->erasesize); 127 set_random_data(writebuf, mtd->erasesize);
128 for (j = 0; j < pgcnt - 1; ++j, addr += pgsize) { 128 for (j = 0; j < pgcnt - 1; ++j, addr += pgsize) {
129 /* Do a read to set the internal dataRAMs to different data */ 129 /* Do a read to set the internal dataRAMs to different data */
130 err = mtd->read(mtd, addr0, bufsize, &read, twopages); 130 err = mtd_read(mtd, addr0, bufsize, &read, twopages);
131 if (mtd_is_bitflip(err)) 131 if (mtd_is_bitflip(err))
132 err = 0; 132 err = 0;
133 if (err || read != bufsize) { 133 if (err || read != bufsize) {
@@ -135,7 +135,7 @@ static int verify_eraseblock(int ebnum)
135 (long long)addr0); 135 (long long)addr0);
136 return err; 136 return err;
137 } 137 }
138 err = mtd->read(mtd, addrn - bufsize, bufsize, &read, twopages); 138 err = mtd_read(mtd, addrn - bufsize, bufsize, &read, twopages);
139 if (mtd_is_bitflip(err)) 139 if (mtd_is_bitflip(err))
140 err = 0; 140 err = 0;
141 if (err || read != bufsize) { 141 if (err || read != bufsize) {
@@ -145,7 +145,7 @@ static int verify_eraseblock(int ebnum)
145 } 145 }
146 memset(twopages, 0, bufsize); 146 memset(twopages, 0, bufsize);
147 read = 0; 147 read = 0;
148 err = mtd->read(mtd, addr, bufsize, &read, twopages); 148 err = mtd_read(mtd, addr, bufsize, &read, twopages);
149 if (mtd_is_bitflip(err)) 149 if (mtd_is_bitflip(err))
150 err = 0; 150 err = 0;
151 if (err || read != bufsize) { 151 if (err || read != bufsize) {
@@ -163,7 +163,7 @@ static int verify_eraseblock(int ebnum)
163 if (addr <= addrn - pgsize - pgsize && !bbt[ebnum + 1]) { 163 if (addr <= addrn - pgsize - pgsize && !bbt[ebnum + 1]) {
164 unsigned long oldnext = next; 164 unsigned long oldnext = next;
165 /* Do a read to set the internal dataRAMs to different data */ 165 /* Do a read to set the internal dataRAMs to different data */
166 err = mtd->read(mtd, addr0, bufsize, &read, twopages); 166 err = mtd_read(mtd, addr0, bufsize, &read, twopages);
167 if (mtd_is_bitflip(err)) 167 if (mtd_is_bitflip(err))
168 err = 0; 168 err = 0;
169 if (err || read != bufsize) { 169 if (err || read != bufsize) {
@@ -171,7 +171,7 @@ static int verify_eraseblock(int ebnum)
171 (long long)addr0); 171 (long long)addr0);
172 return err; 172 return err;
173 } 173 }
174 err = mtd->read(mtd, addrn - bufsize, bufsize, &read, twopages); 174 err = mtd_read(mtd, addrn - bufsize, bufsize, &read, twopages);
175 if (mtd_is_bitflip(err)) 175 if (mtd_is_bitflip(err))
176 err = 0; 176 err = 0;
177 if (err || read != bufsize) { 177 if (err || read != bufsize) {
@@ -181,7 +181,7 @@ static int verify_eraseblock(int ebnum)
181 } 181 }
182 memset(twopages, 0, bufsize); 182 memset(twopages, 0, bufsize);
183 read = 0; 183 read = 0;
184 err = mtd->read(mtd, addr, bufsize, &read, twopages); 184 err = mtd_read(mtd, addr, bufsize, &read, twopages);
185 if (mtd_is_bitflip(err)) 185 if (mtd_is_bitflip(err))
186 err = 0; 186 err = 0;
187 if (err || read != bufsize) { 187 if (err || read != bufsize) {
@@ -230,7 +230,7 @@ static int crosstest(void)
230 /* Read 2nd-to-last page to pp1 */ 230 /* Read 2nd-to-last page to pp1 */
231 read = 0; 231 read = 0;
232 addr = addrn - pgsize - pgsize; 232 addr = addrn - pgsize - pgsize;
233 err = mtd->read(mtd, addr, pgsize, &read, pp1); 233 err = mtd_read(mtd, addr, pgsize, &read, pp1);
234 if (mtd_is_bitflip(err)) 234 if (mtd_is_bitflip(err))
235 err = 0; 235 err = 0;
236 if (err || read != pgsize) { 236 if (err || read != pgsize) {
@@ -243,7 +243,7 @@ static int crosstest(void)
243 /* Read 3rd-to-last page to pp1 */ 243 /* Read 3rd-to-last page to pp1 */
244 read = 0; 244 read = 0;
245 addr = addrn - pgsize - pgsize - pgsize; 245 addr = addrn - pgsize - pgsize - pgsize;
246 err = mtd->read(mtd, addr, pgsize, &read, pp1); 246 err = mtd_read(mtd, addr, pgsize, &read, pp1);
247 if (mtd_is_bitflip(err)) 247 if (mtd_is_bitflip(err))
248 err = 0; 248 err = 0;
249 if (err || read != pgsize) { 249 if (err || read != pgsize) {
@@ -257,7 +257,7 @@ static int crosstest(void)
257 read = 0; 257 read = 0;
258 addr = addr0; 258 addr = addr0;
259 printk(PRINT_PREF "reading page at %#llx\n", (long long)addr); 259 printk(PRINT_PREF "reading page at %#llx\n", (long long)addr);
260 err = mtd->read(mtd, addr, pgsize, &read, pp2); 260 err = mtd_read(mtd, addr, pgsize, &read, pp2);
261 if (mtd_is_bitflip(err)) 261 if (mtd_is_bitflip(err))
262 err = 0; 262 err = 0;
263 if (err || read != pgsize) { 263 if (err || read != pgsize) {
@@ -271,7 +271,7 @@ static int crosstest(void)
271 read = 0; 271 read = 0;
272 addr = addrn - pgsize; 272 addr = addrn - pgsize;
273 printk(PRINT_PREF "reading page at %#llx\n", (long long)addr); 273 printk(PRINT_PREF "reading page at %#llx\n", (long long)addr);
274 err = mtd->read(mtd, addr, pgsize, &read, pp3); 274 err = mtd_read(mtd, addr, pgsize, &read, pp3);
275 if (mtd_is_bitflip(err)) 275 if (mtd_is_bitflip(err))
276 err = 0; 276 err = 0;
277 if (err || read != pgsize) { 277 if (err || read != pgsize) {
@@ -285,7 +285,7 @@ static int crosstest(void)
285 read = 0; 285 read = 0;
286 addr = addr0; 286 addr = addr0;
287 printk(PRINT_PREF "reading page at %#llx\n", (long long)addr); 287 printk(PRINT_PREF "reading page at %#llx\n", (long long)addr);
288 err = mtd->read(mtd, addr, pgsize, &read, pp4); 288 err = mtd_read(mtd, addr, pgsize, &read, pp4);
289 if (mtd_is_bitflip(err)) 289 if (mtd_is_bitflip(err))
290 err = 0; 290 err = 0;
291 if (err || read != pgsize) { 291 if (err || read != pgsize) {
@@ -344,7 +344,7 @@ static int erasecrosstest(void)
344 344
345 printk(PRINT_PREF "reading 1st page of block %d\n", ebnum); 345 printk(PRINT_PREF "reading 1st page of block %d\n", ebnum);
346 memset(readbuf, 0, pgsize); 346 memset(readbuf, 0, pgsize);
347 err = mtd->read(mtd, addr0, pgsize, &read, readbuf); 347 err = mtd_read(mtd, addr0, pgsize, &read, readbuf);
348 if (mtd_is_bitflip(err)) 348 if (mtd_is_bitflip(err))
349 err = 0; 349 err = 0;
350 if (err || read != pgsize) { 350 if (err || read != pgsize) {
@@ -382,7 +382,7 @@ static int erasecrosstest(void)
382 382
383 printk(PRINT_PREF "reading 1st page of block %d\n", ebnum); 383 printk(PRINT_PREF "reading 1st page of block %d\n", ebnum);
384 memset(readbuf, 0, pgsize); 384 memset(readbuf, 0, pgsize);
385 err = mtd->read(mtd, addr0, pgsize, &read, readbuf); 385 err = mtd_read(mtd, addr0, pgsize, &read, readbuf);
386 if (mtd_is_bitflip(err)) 386 if (mtd_is_bitflip(err))
387 err = 0; 387 err = 0;
388 if (err || read != pgsize) { 388 if (err || read != pgsize) {
@@ -438,7 +438,7 @@ static int erasetest(void)
438 return err; 438 return err;
439 439
440 printk(PRINT_PREF "reading 1st page of block %d\n", ebnum); 440 printk(PRINT_PREF "reading 1st page of block %d\n", ebnum);
441 err = mtd->read(mtd, addr0, pgsize, &read, twopages); 441 err = mtd_read(mtd, addr0, pgsize, &read, twopages);
442 if (mtd_is_bitflip(err)) 442 if (mtd_is_bitflip(err))
443 err = 0; 443 err = 0;
444 if (err || read != pgsize) { 444 if (err || read != pgsize) {