Lines Matching full:oob
49 /* OOB placement block for use with hardware ecc generation */
395 pr_debug("%s: Reading OOB area of page %u to oob %p\n",
446 uint8_t *oob = chip->oob_poi; local
460 chip->read_buf(mtd, oob, chip->ecc.prepad);
461 oob += chip->ecc.prepad;
464 chip->read_buf(mtd, oob, eccbytes);
465 oob += eccbytes;
468 chip->read_buf(mtd, oob, chip->ecc.postpad);
469 oob += chip->ecc.postpad;
473 size = mtd->oobsize - (oob - chip->oob_poi);
475 chip->read_buf(mtd, oob, size);
493 uint8_t *oob = chip->oob_poi; local
495 pr_debug("Reading page %u to buf %p oob %p\n",
496 page, buf, oob);
498 /* first read the data area and the available portion of OOB */
509 chip->read_buf(mtd, oob, chip->ecc.prepad);
510 oob += chip->ecc.prepad;
513 stat = chip->ecc.correct(mtd, p, oob, NULL);
519 oob += eccbytes;
522 chip->read_buf(mtd, oob, chip->ecc.postpad);
523 oob += chip->ecc.postpad;
527 /* Calculate remaining oob bytes */
528 n = mtd->oobsize - (oob - chip->oob_poi);
530 chip->read_buf(mtd, oob, n);
532 /* Then switch ECC off and read the OOB area to get the ECC code */
536 oob = chip->oob_poi + chip->ecc.prepad;
541 chip->read_buf(mtd, oob, eccbytes);
542 oob += eccbytes + chip->ecc.postpad;
583 uint8_t *oob = chip->oob_poi; local
595 chip->write_buf(mtd, oob, chip->ecc.prepad);
596 oob += chip->ecc.prepad;
600 oob += eccbytes;
603 chip->write_buf(mtd, oob, chip->ecc.postpad);
604 oob += chip->ecc.postpad;
608 size = mtd->oobsize - (oob - chip->oob_poi);
610 chip->write_buf(mtd, oob, size);
625 uint8_t *oob = chip->oob_poi; local
639 chip->write_buf(mtd, oob, chip->ecc.prepad);
640 oob += chip->ecc.prepad;
643 chip->write_buf(mtd, oob, eccbytes);
644 oob += eccbytes;
647 chip->write_buf(mtd, oob, chip->ecc.postpad);
648 oob += chip->ecc.postpad;
652 /* Calculate remaining oob bytes */
653 i = mtd->oobsize - (oob - chip->oob_poi);
655 chip->write_buf(mtd, oob, i);