Lines Matching defs:buf
460 uint8_t buf[2] = { 0, 0 };
464 ops.oobbuf = buf;
1006 unsigned int offset_in_page, void *buf,
1018 NAND_OP_DATA_IN(len, buf, 0),
1049 unsigned int offset_in_page, void *buf,
1061 NAND_OP_DATA_IN(len, buf, 0),
1090 * @buf: buffer used to store the data
1099 unsigned int offset_in_page, void *buf, unsigned int len)
1103 if (len && !buf)
1112 offset_in_page, buf,
1116 buf, len);
1121 chip->legacy.read_buf(chip, buf, len);
1131 * @buf: buffer used to store the data
1139 int nand_read_param_page_op(struct nand_chip *chip, u8 page, void *buf,
1143 u8 *p = buf;
1145 if (len && !buf)
1156 NAND_OP_8BIT_DATA_IN(len, buf, 0),
1178 * @buf: buffer used to store the data
1188 unsigned int offset_in_page, void *buf,
1193 if (len && !buf)
1212 NAND_OP_DATA_IN(len, buf, 0),
1232 chip->legacy.read_buf(chip, buf, len);
1243 * @buf: buffer used to store the data
1252 unsigned int offset_in_oob, void *buf, unsigned int len)
1256 if (len && !buf)
1265 buf, len);
1269 chip->legacy.read_buf(chip, buf, len);
1276 unsigned int offset_in_page, const void *buf,
1292 NAND_OP_DATA_OUT(len, buf, 0),
1355 * @buf: buffer containing the data to write to the page
1364 unsigned int offset_in_page, const void *buf,
1369 if (len && !buf)
1376 return nand_exec_prog_page_op(chip, page, offset_in_page, buf,
1381 if (buf)
1382 chip->legacy.write_buf(chip, buf, len);
1440 * @buf: buffer containing the data to write to the page
1449 unsigned int offset_in_page, const void *buf,
1455 if (!len || !buf)
1462 status = nand_exec_prog_page_op(chip, page, offset_in_page, buf,
1467 chip->legacy.write_buf(chip, buf, len);
1483 * @buf: buffer containing the data to send to the NAND
1494 const void *buf, unsigned int len,
1499 if (len && !buf)
1516 NAND_OP_DATA_OUT(len, buf, 0),
1536 chip->legacy.write_buf(chip, buf, len);
1546 * @buf: buffer used to store the ID
1555 int nand_readid_op(struct nand_chip *chip, u8 addr, void *buf,
1559 u8 *id = buf;
1561 if (len && !buf)
1570 NAND_OP_8BIT_DATA_IN(len, buf, 0),
1856 * @buf: buffer used to store the data
1868 int nand_read_data_op(struct nand_chip *chip, void *buf, unsigned int len,
1871 if (!len || !buf)
1876 NAND_OP_DATA_IN(len, buf, 0),
1892 u8 *p = buf;
1898 chip->legacy.read_buf(chip, buf, len);
1908 * @buf: buffer containing the data to send on the bus
1918 int nand_write_data_op(struct nand_chip *chip, const void *buf,
1921 if (!len || !buf)
1926 NAND_OP_DATA_OUT(len, buf, 0),
1936 const u8 *p = buf;
1942 chip->legacy.write_buf(chip, buf, len);
2313 * ->data->buf.{in,out} field of data instructions. This is wrong as data
2443 * @buf: buffer to test
2460 static int nand_check_erased_buf(void *buf, int len, int bitflips_threshold)
2462 const unsigned char *bitmap = buf;
2575 * @buf: buffer to store read data
2581 int nand_read_page_raw_notsupp(struct nand_chip *chip, u8 *buf,
2590 * @buf: buffer to store read data
2596 int nand_read_page_raw(struct nand_chip *chip, uint8_t *buf, int oob_required,
2602 ret = nand_read_page_op(chip, page, 0, buf, mtd->writesize);
2620 * @buf: buffer to store read data
2632 int nand_monolithic_read_page_raw(struct nand_chip *chip, u8 *buf,
2637 u8 *read_buf = buf;
2643 if (buf != chip->data_buf)
2651 if (buf != chip->data_buf)
2652 memcpy(buf, read_buf, mtd->writesize);
2661 * @buf: buffer to store read data
2667 static int nand_read_page_raw_syndrome(struct nand_chip *chip, uint8_t *buf,
2681 ret = nand_read_data_op(chip, buf, eccsize, false, false);
2685 buf += eccsize;
2725 * @buf: buffer to store read data
2729 static int nand_read_page_swecc(struct nand_chip *chip, uint8_t *buf,
2736 uint8_t *p = buf;
2741 chip->ecc.read_page_raw(chip, buf, 1, page);
2752 p = buf;
2882 * @buf: buffer to store read data
2888 static int nand_read_page_hwecc(struct nand_chip *chip, uint8_t *buf,
2895 uint8_t *p = buf;
2925 p = buf;
2953 * @buf: buffer to store read data
2960 static int nand_read_page_syndrome(struct nand_chip *chip, uint8_t *buf,
2968 uint8_t *p = buf;
3125 uint8_t *bufpoi, *oob, *buf;
3139 buf = ops->datbuf;
3152 use_bounce_buf = !virt_addr_valid(buf) ||
3153 !IS_ALIGNED((unsigned long)buf,
3160 bufpoi = use_bounce_buf ? chip->data_buf : buf;
3163 pr_debug("%s: using read bounce buffer for buf@%p\n",
3164 __func__, buf);
3203 memcpy(buf, bufpoi + col, bytes);
3235 buf += bytes;
3238 memcpy(buf, chip->data_buf + col, bytes);
3239 buf += bytes;
3456 uint8_t *buf = ops->oobbuf;
3483 buf = nand_transfer_oob(chip, buf, ops, len);
3552 * @buf: data buffer
3558 int nand_write_page_raw_notsupp(struct nand_chip *chip, const u8 *buf,
3567 * @buf: data buffer
3573 int nand_write_page_raw(struct nand_chip *chip, const uint8_t *buf,
3579 ret = nand_prog_page_begin_op(chip, page, 0, buf, mtd->writesize);
3597 * @buf: data buffer to write
3610 int nand_monolithic_write_page_raw(struct nand_chip *chip, const u8 *buf,
3615 u8 *write_buf = (u8 *)buf;
3620 if (buf != chip->data_buf) {
3622 memcpy(write_buf, buf, mtd->writesize);
3633 * @buf: data buffer
3640 const uint8_t *buf, int oob_required,
3654 ret = nand_write_data_op(chip, buf, eccsize, false);
3658 buf += eccsize;
3697 * @buf: data buffer
3701 static int nand_write_page_swecc(struct nand_chip *chip, const uint8_t *buf,
3709 const uint8_t *p = buf;
3720 return chip->ecc.write_page_raw(chip, buf, 1, page);
3726 * @buf: data buffer
3730 static int nand_write_page_hwecc(struct nand_chip *chip, const uint8_t *buf,
3738 const uint8_t *p = buf;
3772 * @buf: data buffer
3777 uint32_t data_len, const uint8_t *buf,
3800 ret = nand_write_data_op(chip, buf, ecc_size, false);
3808 chip->ecc.calculate(chip, buf, ecc_calc);
3815 buf += ecc_size;
3840 * @buf: data buffer
3847 static int nand_write_page_syndrome(struct nand_chip *chip, const uint8_t *buf,
3854 const uint8_t *p = buf;
3912 * @buf: the data to write
3918 int data_len, const uint8_t *buf, int oob_required,
3931 status = chip->ecc.write_page_raw(chip, buf, oob_required,
3934 status = chip->ecc.write_subpage(chip, offset, data_len, buf,
3937 status = chip->ecc.write_page(chip, buf, oob_required, page);
3966 uint8_t *buf = ops->datbuf;
4008 uint8_t *wbuf = buf;
4015 use_bounce_buf = !virt_addr_valid(buf) ||
4016 !IS_ALIGNED((unsigned long)buf,
4026 pr_debug("%s: using write bounce buffer for buf@%p\n",
4027 __func__, buf);
4032 memcpy(&wbuf[column], buf, bytes);
4055 buf += bytes;
4082 * @buf: the data to write
4088 size_t *retlen, const uint8_t *buf)
4102 ops.datbuf = (uint8_t *)buf;