• Home
  • Raw
  • Download

Lines Matching refs:mtd

36 static struct mtd_info *mtd;  variable
72 loff_t addr = ebnum * mtd->erasesize; in erase_eraseblock()
75 ei.mtd = mtd; in erase_eraseblock()
77 ei.len = mtd->erasesize; in erase_eraseblock()
79 err = mtd->erase(mtd, &ei); in erase_eraseblock()
98 loff_t addr = ebnum * mtd->erasesize; in write_eraseblock()
100 set_random_data(writebuf, mtd->erasesize); in write_eraseblock()
102 err = mtd->write(mtd, addr, mtd->erasesize, &written, writebuf); in write_eraseblock()
103 if (err || written != mtd->erasesize) in write_eraseblock()
116 loff_t addr = ebnum * mtd->erasesize; in verify_eraseblock()
120 addr0 += mtd->erasesize; in verify_eraseblock()
122 addrn = mtd->size; in verify_eraseblock()
124 addrn -= mtd->erasesize; in verify_eraseblock()
126 set_random_data(writebuf, mtd->erasesize); in verify_eraseblock()
129 err = mtd->read(mtd, addr0, bufsize, &read, twopages); in verify_eraseblock()
137 err = mtd->read(mtd, addrn - bufsize, bufsize, &read, twopages); in verify_eraseblock()
147 err = mtd->read(mtd, addr, bufsize, &read, twopages); in verify_eraseblock()
165 err = mtd->read(mtd, addr0, bufsize, &read, twopages); in verify_eraseblock()
173 err = mtd->read(mtd, addrn - bufsize, bufsize, &read, twopages); in verify_eraseblock()
183 err = mtd->read(mtd, addr, bufsize, &read, twopages); in verify_eraseblock()
191 memcpy(boundary, writebuf + mtd->erasesize - pgsize, pgsize); in verify_eraseblock()
223 addr0 += mtd->erasesize; in crosstest()
225 addrn = mtd->size; in crosstest()
227 addrn -= mtd->erasesize; in crosstest()
232 err = mtd->read(mtd, addr, pgsize, &read, pp1); in crosstest()
245 err = mtd->read(mtd, addr, pgsize, &read, pp1); in crosstest()
259 err = mtd->read(mtd, addr, pgsize, &read, pp2); in crosstest()
273 err = mtd->read(mtd, addr, pgsize, &read, pp3); in crosstest()
287 err = mtd->read(mtd, addr, pgsize, &read, pp4); in crosstest()
321 addr0 += mtd->erasesize; in erasecrosstest()
337 err = mtd->write(mtd, addr0, pgsize, &written, writebuf); in erasecrosstest()
346 err = mtd->read(mtd, addr0, pgsize, &read, readbuf); in erasecrosstest()
371 err = mtd->write(mtd, addr0, pgsize, &written, writebuf); in erasecrosstest()
385 err = mtd->read(mtd, addr0, pgsize, &read, readbuf); in erasecrosstest()
417 addr0 += mtd->erasesize; in erasetest()
428 err = mtd->write(mtd, addr0, pgsize, &written, writebuf); in erasetest()
441 err = mtd->read(mtd, addr0, pgsize, &read, twopages); in erasetest()
469 loff_t addr = ebnum * mtd->erasesize; in is_block_bad()
472 ret = mtd->block_isbad(mtd, addr); in is_block_bad()
510 mtd = get_mtd_device(NULL, dev); in mtd_pagetest_init()
511 if (IS_ERR(mtd)) { in mtd_pagetest_init()
512 err = PTR_ERR(mtd); in mtd_pagetest_init()
517 if (mtd->type != MTD_NANDFLASH) { in mtd_pagetest_init()
522 tmp = mtd->size; in mtd_pagetest_init()
523 do_div(tmp, mtd->erasesize); in mtd_pagetest_init()
525 pgcnt = mtd->erasesize / mtd->writesize; in mtd_pagetest_init()
530 (unsigned long long)mtd->size, mtd->erasesize, in mtd_pagetest_init()
531 pgsize, ebcnt, pgcnt, mtd->oobsize); in mtd_pagetest_init()
535 writebuf = kmalloc(mtd->erasesize, GFP_KERNEL); in mtd_pagetest_init()
616 put_mtd_device(mtd); in mtd_pagetest_init()