Lines Matching full:chip
384 struct nand_chip *chip, argument
387 struct mxc_nand_host *host = nand_get_controller_data(chip);
388 uint8_t *buf = chip->oob_poi;
390 int eccpitch = chip->ecc.bytes + chip->ecc.prepad + chip->ecc.postpad;
397 chip->cmdfunc(mtd, NAND_CMD_READOOB, mtd->writesize, page);
398 for (i = 0; i < chip->ecc.steps; i++) {
399 toread = min_t(int, length, chip->ecc.prepad);
401 chip->read_buf(mtd, bufpoi, toread);
405 bufpoi += chip->ecc.bytes;
406 host->col_addr += chip->ecc.bytes;
407 length -= chip->ecc.bytes;
409 toread = min_t(int, length, chip->ecc.postpad);
411 chip->read_buf(mtd, bufpoi, toread);
417 chip->read_buf(mtd, bufpoi, length);
420 chip->cmdfunc(mtd, NAND_CMD_READOOB,
421 mtd->writesize + chip->ecc.prepad, page);
422 bufpoi = buf + chip->ecc.prepad;
423 length = mtd->oobsize - chip->ecc.prepad;
424 for (i = 0; i < chip->ecc.steps; i++) {
425 toread = min_t(int, length, chip->ecc.bytes);
426 chip->read_buf(mtd, bufpoi, toread);
429 host->col_addr += chip->ecc.postpad + chip->ecc.prepad;
436 struct nand_chip *chip, argument
441 struct mxc_nand_host *host = nand_get_controller_data(chip);
442 int eccsize = chip->ecc.size;
443 int eccbytes = chip->ecc.bytes;
444 int eccpitch = eccbytes + chip->ecc.prepad + chip->ecc.postpad;
445 uint8_t *oob = chip->oob_poi;
450 chip->cmdfunc(mtd, NAND_CMD_READ0, 0x00, page);
452 for (n = 0, steps = chip->ecc.steps; steps > 0; n++, steps--) {
454 chip->read_buf(mtd, buf, eccsize);
458 if (chip->ecc.prepad) {
459 chip->read_buf(mtd, oob, chip->ecc.prepad);
460 oob += chip->ecc.prepad;
463 chip->read_buf(mtd, oob, eccbytes);
466 if (chip->ecc.postpad) {
467 chip->read_buf(mtd, oob, chip->ecc.postpad);
468 oob += chip->ecc.postpad;
472 size = mtd->oobsize - (oob - chip->oob_poi);
474 chip->read_buf(mtd, oob, size);
481 struct nand_chip *chip, argument
486 struct mxc_nand_host *host = nand_get_controller_data(chip);
487 int n, eccsize = chip->ecc.size;
488 int eccbytes = chip->ecc.bytes;
489 int eccpitch = eccbytes + chip->ecc.prepad + chip->ecc.postpad;
490 int eccsteps = chip->ecc.steps;
492 uint8_t *oob = chip->oob_poi;
503 chip->read_buf(mtd, p, eccsize);
507 if (chip->ecc.prepad) {
508 chip->read_buf(mtd, oob, chip->ecc.prepad);
509 oob += chip->ecc.prepad;
512 stat = chip->ecc.correct(mtd, p, oob, NULL);
520 if (chip->ecc.postpad) {
521 chip->read_buf(mtd, oob, chip->ecc.postpad);
522 oob += chip->ecc.postpad;
527 n = mtd->oobsize - (oob - chip->oob_poi);
529 chip->read_buf(mtd, oob, n);
533 chip->cmdfunc(mtd, NAND_CMD_READOOB, mtd->writesize, page);
534 eccsteps = chip->ecc.steps;
535 oob = chip->oob_poi + chip->ecc.prepad;
539 chip->ecc.prepad;
540 chip->read_buf(mtd, oob, eccbytes);
541 oob += eccbytes + chip->ecc.postpad;
548 struct nand_chip *chip, int page) argument
550 struct mxc_nand_host *host = nand_get_controller_data(chip);
551 int eccpitch = chip->ecc.bytes + chip->ecc.prepad + chip->ecc.postpad;
553 int i, len, status, steps = chip->ecc.steps;
554 const uint8_t *bufpoi = chip->oob_poi;
556 chip->cmdfunc(mtd, NAND_CMD_SEQIN, mtd->writesize, page);
560 chip->write_buf(mtd, bufpoi, len);
563 host->col_addr += chip->ecc.prepad + chip->ecc.postpad;
566 chip->write_buf(mtd, bufpoi, length);
568 chip->cmdfunc(mtd, NAND_CMD_PAGEPROG, -1, -1);
569 status = chip->waitfunc(mtd, chip);
574 struct nand_chip *chip, argument
578 struct mxc_nand_host *host = nand_get_controller_data(chip);
579 int eccsize = chip->ecc.size;
580 int eccbytes = chip->ecc.bytes;
581 int eccpitch = eccbytes + chip->ecc.prepad + chip->ecc.postpad;
582 uint8_t *oob = chip->oob_poi;
586 for (n = 0, steps = chip->ecc.steps; steps > 0; n++, steps--) {
588 chip->write_buf(mtd, buf, eccsize);
593 if (chip->ecc.prepad) {
594 chip->write_buf(mtd, oob, chip->ecc.prepad);
595 oob += chip->ecc.prepad;
601 if (chip->ecc.postpad) {
602 chip->write_buf(mtd, oob, chip->ecc.postpad);
603 oob += chip->ecc.postpad;
607 size = mtd->oobsize - (oob - chip->oob_poi);
609 chip->write_buf(mtd, oob, size);
614 struct nand_chip *chip, argument
618 struct mxc_nand_host *host = nand_get_controller_data(chip);
619 int i, n, eccsize = chip->ecc.size;
620 int eccbytes = chip->ecc.bytes;
621 int eccpitch = eccbytes + chip->ecc.prepad + chip->ecc.postpad;
622 int eccsteps = chip->ecc.steps;
624 uint8_t *oob = chip->oob_poi;
626 chip->ecc.hwctl(mtd, NAND_ECC_WRITE);
633 chip->write_buf(mtd, p, eccsize);
637 if (chip->ecc.prepad) {
638 chip->write_buf(mtd, oob, chip->ecc.prepad);
639 oob += chip->ecc.prepad;
642 chip->write_buf(mtd, oob, eccbytes);
645 if (chip->ecc.postpad) {
646 chip->write_buf(mtd, oob, chip->ecc.postpad);
647 oob += chip->ecc.postpad;
652 i = mtd->oobsize - (oob - chip->oob_poi);
654 chip->write_buf(mtd, oob, i);
946 * deselect of the NAND chip
948 static void mxc_nand_select_chip(struct mtd_info *mtd, int chip) argument
953 switch (chip) {
1255 * This might be NAND chip specific and the i.MX31 datasheet is