Lines Matching defs:ops
344 * @ops: oob ops structure
347 struct mtd_oob_ops *ops)
358 switch (ops->mode) {
362 memcpy(chip->oob_poi + ops->ooboffs, oob, len);
367 ops->ooboffs, len);
381 * @ops: oob operation description structure
386 struct mtd_oob_ops *ops)
392 __func__, (unsigned int)to, (int)ops->ooblen);
394 len = mtd_oobavail(mtd, ops);
397 if ((ops->ooboffs + ops->ooblen) > len) {
430 nand_fill_oob(chip, ops->oobbuf, ops->ooblen, ops);
432 if (ops->mode == MTD_OPS_RAW)
442 ops->oobretlen = ops->ooblen;
459 struct mtd_oob_ops ops;
463 memset(&ops, 0, sizeof(ops));
464 ops.oobbuf = buf;
465 ops.ooboffs = chip->badblockpos;
467 ops.ooboffs &= ~0x01;
468 ops.len = ops.ooblen = 2;
470 ops.len = ops.ooblen = 1;
472 ops.mode = MTD_OPS_PLACE_OOB;
479 &ops);
753 const struct nand_controller_ops *ops = chip->controller->ops;
774 ret = ops->setup_interface(chip, chipnr,
794 const struct nand_controller_ops *ops = chip->controller->ops;
824 ret = ops->setup_interface(chip, chipnr, chip->best_interface_config);
878 const struct nand_controller_ops *ops = chip->controller->ops;
888 ret = ops->setup_interface(chip, NAND_DATA_IFACE_CHECK_ONLY,
904 ret = ops->setup_interface(chip, NAND_DATA_IFACE_CHECK_ONLY,
940 if (chip->ops.choose_interface_config)
941 ret = chip->ops.choose_interface_config(chip, iface);
3046 * @ops: oob ops structure
3050 struct mtd_oob_ops *ops, size_t len)
3055 switch (ops->mode) {
3059 memcpy(oob, chip->oob_poi + ops->ooboffs, len);
3064 ops->ooboffs, len);
3090 if (!chip->ops.setup_read_retry)
3093 return chip->ops.setup_read_retry(chip, retry_mode);
3111 * @ops: oob ops structure
3116 struct mtd_oob_ops *ops)
3121 uint32_t readlen = ops->len;
3122 uint32_t oobreadlen = ops->ooblen;
3123 uint32_t max_oobsize = mtd_oobavail(mtd, ops);
3139 buf = ops->datbuf;
3140 oob = ops->oobbuf;
3171 if (unlikely(ops->mode == MTD_OPS_RAW))
3196 (ops->mode != MTD_OPS_RAW)) {
3210 oob = nand_transfer_oob(chip, oob, ops,
3272 ops->retlen = ops->len - (size_t) readlen;
3274 ops->oobretlen = ops->ooblen - oobreadlen;
3443 * @ops: oob operations description structure
3448 struct mtd_oob_ops *ops)
3454 int readlen = ops->ooblen;
3456 uint8_t *buf = ops->oobbuf;
3464 len = mtd_oobavail(mtd, ops);
3474 if (ops->mode == MTD_OPS_RAW)
3483 buf = nand_transfer_oob(chip, buf, ops, len);
3506 ops->oobretlen = ops->ooblen - readlen;
3521 * @ops: oob operation description structure
3526 struct mtd_oob_ops *ops)
3531 ops->retlen = 0;
3533 if (ops->mode != MTD_OPS_PLACE_OOB &&
3534 ops->mode != MTD_OPS_AUTO_OOB &&
3535 ops->mode != MTD_OPS_RAW)
3540 if (!ops->datbuf)
3541 ret = nand_do_read_oob(chip, from, ops);
3543 ret = nand_do_read_ops(chip, from, ops);
3951 * @ops: oob operations description structure
3956 struct mtd_oob_ops *ops)
3960 uint32_t writelen = ops->len;
3962 uint32_t oobwritelen = ops->ooblen;
3963 uint32_t oobmaxlen = mtd_oobavail(mtd, ops);
3965 uint8_t *oob = ops->oobbuf;
3966 uint8_t *buf = ops->datbuf;
3970 ops->retlen = 0;
3975 if (NOTALIGNED(to) || NOTALIGNED(ops->len)) {
3997 ((loff_t)chip->pagecache.page << chip->page_shift) < (to + ops->len))
4001 if (oob && ops->ooboffs && (ops->ooboffs + ops->ooblen > oobmaxlen)) {
4037 oob = nand_fill_oob(chip, oob, len, ops);
4046 (ops->mode == MTD_OPS_RAW));
4067 ops->retlen = ops->len - writelen;
4069 ops->oobretlen = ops->ooblen;
4092 struct mtd_oob_ops ops;
4100 memset(&ops, 0, sizeof(ops));
4101 ops.len = len;
4102 ops.datbuf = (uint8_t *)buf;
4103 ops.mode = MTD_OPS_PLACE_OOB;
4105 ret = nand_do_write_ops(chip, to, &ops);
4107 *retlen = ops.retlen;
4115 * @ops: oob operation description structure
4118 struct mtd_oob_ops *ops)
4123 ops->retlen = 0;
4127 switch (ops->mode) {
4137 if (!ops->datbuf)
4138 ret = nand_do_write_oob(chip, to, ops);
4140 ret = nand_do_write_ops(chip, to, ops);
4329 if (chip->ops.suspend)
4330 ret = chip->ops.suspend(chip);
4348 if (chip->ops.resume)
4349 chip->ops.resume(chip);
4380 if (!chip->ops.lock_area)
4383 return chip->ops.lock_area(chip, ofs, len);
4396 if (!chip->ops.unlock_area)
4399 return chip->ops.unlock_area(chip, ofs, len);
4636 if (chip->manufacturer.desc && chip->manufacturer.desc->ops &&
4637 chip->manufacturer.desc->ops->detect) {
4644 chip->manufacturer.desc->ops->detect(chip);
4658 if (!chip->manufacturer.desc || !chip->manufacturer.desc->ops ||
4659 !chip->manufacturer.desc->ops->init)
4662 return chip->manufacturer.desc->ops->init(chip);
4674 if (chip->manufacturer.desc && chip->manufacturer.desc->ops &&
4675 chip->manufacturer.desc->ops->cleanup)
4676 chip->manufacturer.desc->ops->cleanup(chip);
5893 if (chip->controller->ops && chip->controller->ops->attach_chip)
5894 return chip->controller->ops->attach_chip(chip);
5901 if (chip->controller->ops && chip->controller->ops->detach_chip)
5902 chip->controller->ops->detach_chip(chip);