Lines Matching defs:chunk

21  * or 4) and each chunk will have its own ECC "digest" of 6B at the
24 * corrects up to 1 bit per chunk and detects reliably an error if
36 * 30B per ECC chunk. Here is the page layout used by the controller
236 * chunk smaller that the others.
239 * @chunk: Desired ECC chunk size on which the layout applies
240 * @strength: Desired ECC strength (per chunk size bytes) on which the
246 * @data_bytes: Number of data bytes per chunk
247 * @spare_bytes: Number of spare bytes per chunk
248 * @ecc_bytes: Number of ecc bytes per chunk
249 * @last_data_bytes: Number of data bytes in the last chunk
250 * @last_spare_bytes: Number of spare bytes in the last chunk
251 * @last_ecc_bytes: Number of ecc bytes in the last chunk
256 int chunk;
272 .chunk = dc, \
972 * Check if a chunk is correct or not according to the hardware ECC engine.
994 * non-zero value to indicate that this chunk was apparently
996 * the chunk (with ECC bytes) is not declared empty, the calling
1254 int chunk;
1263 for (chunk = 0; chunk < lt->nchunks; chunk++) {
1264 /* Update last chunk length */
1265 if (chunk >= lt->full_chunk_cnt) {
1272 nand_change_read_column_op(chip, chunk * chunk_size,
1273 buf + (lt->data_bytes * chunk),
1277 nand_read_data_op(chip, oob + (lt->spare_bytes * chunk),
1282 (ALIGN(lt->ecc_bytes, 32) * chunk),
1289 static void marvell_nfc_hw_ecc_bch_read_chunk(struct nand_chip *chip, int chunk,
1311 if (chunk == 0)
1317 * Trigger the monolithic read on the first chunk, then naked read on
1318 * intermediate chunks and finally a last naked read on the last chunk.
1320 if (chunk == 0)
1322 else if (chunk < lt->nchunks - 1)
1366 int chunk, ret;
1380 for (chunk = 0; chunk < lt->nchunks; chunk++) {
1381 /* Update length for the last chunk */
1382 if (chunk >= lt->full_chunk_cnt) {
1387 /* Read the chunk and detect number of bitflips */
1388 marvell_nfc_hw_ecc_bch_read_chunk(chip, chunk, data, data_len,
1392 failure_mask |= BIT(chunk);
1417 * 2k page, 8b strength per 512B chunk), the controller tries to correct
1422 for (chunk = 0; chunk < lt->nchunks; chunk++) {
1427 /* No failure reported for this chunk, move to the next one */
1428 if (!(failure_mask & BIT(chunk)))
1431 data_off_in_page = chunk * (lt->data_bytes + lt->spare_bytes +
1434 (chunk < lt->full_chunk_cnt ? lt->data_bytes :
1437 (chunk < lt->full_chunk_cnt ? lt->spare_bytes :
1440 data_off = chunk * lt->data_bytes;
1441 spare_off = chunk * lt->spare_bytes;
1444 (chunk * (lt->ecc_bytes + 2));
1446 data_len = chunk < lt->full_chunk_cnt ? lt->data_bytes :
1448 spare_len = chunk < lt->full_chunk_cnt ? lt->spare_bytes :
1450 ecc_len = chunk < lt->full_chunk_cnt ? lt->ecc_bytes :
1472 /* Check the entire chunk (data + spare + ecc) for emptyness */
1509 int chunk;
1515 for (chunk = 0; chunk < lt->nchunks; chunk++) {
1516 if (chunk >= lt->full_chunk_cnt) {
1522 /* Point to the column of the next chunk */
1523 nand_change_write_column_op(chip, chunk * full_chunk_size,
1527 nand_write_data_op(chip, buf + (chunk * lt->data_bytes),
1551 marvell_nfc_hw_ecc_bch_write_chunk(struct nand_chip *chip, int chunk,
1568 * cycles and asks for the first chunk of data.
1571 * Last operation (if any) asks for the last chunk of data through a
1574 if (chunk == 0) {
1585 } else if (chunk < lt->nchunks - 1) {
1591 /* Always dispatch the PAGEPROG command on the last chunk */
1592 if (chunk == lt->nchunks - 1)
1624 int chunk, ret;
1635 for (chunk = 0; chunk < lt->nchunks; chunk++) {
1636 if (chunk >= lt->full_chunk_cnt) {
1641 marvell_nfc_hw_ecc_bch_write_chunk(chip, chunk, data, data_len,
2241 "NFCv1: writesize (%d) cannot be bigger than a chunk (%d)\n",
2250 ecc->size == l->chunk && ecc->strength == l->strength) {