Lines Matching full:lt

1043 	const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
1053 unsigned int oob_bytes = lt->spare_bytes + (raw ? lt->ecc_bytes : 0);
1078 lt->data_bytes + oob_bytes);
1079 memcpy(data_buf, nfc->dma_buf, lt->data_bytes);
1080 memcpy(oob_buf, nfc->dma_buf + lt->data_bytes, oob_bytes);
1082 marvell_nfc_xfer_data_in_pio(nfc, data_buf, lt->data_bytes);
1101 const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
1102 unsigned int full_sz = lt->data_bytes + lt->spare_bytes + lt->ecc_bytes;
1125 lt->data_bytes, true, page);
1157 const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
1167 unsigned int oob_bytes = lt->spare_bytes + (raw ? lt->ecc_bytes : 0);
1187 memcpy(nfc->dma_buf, data_buf, lt->data_bytes);
1188 memcpy(nfc->dma_buf + lt->data_bytes, oob_buf, oob_bytes);
1189 marvell_nfc_xfer_data_dma(nfc, DMA_TO_DEVICE, lt->data_bytes +
1190 lt->ecc_bytes + lt->spare_bytes);
1192 marvell_nfc_xfer_data_out_pio(nfc, data_buf, lt->data_bytes);
1263 const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
1265 int chunk_size = lt->data_bytes + lt->spare_bytes + lt->ecc_bytes;
1266 int ecc_offset = (lt->full_chunk_cnt * lt->spare_bytes) +
1267 lt->last_spare_bytes;
1268 int data_len = lt->data_bytes;
1269 int spare_len = lt->spare_bytes;
1270 int ecc_len = lt->ecc_bytes;
1280 for (chunk = 0; chunk < lt->nchunks; chunk++) {
1282 if (chunk >= lt->full_chunk_cnt) {
1283 data_len = lt->last_data_bytes;
1284 spare_len = lt->last_spare_bytes;
1285 ecc_len = lt->last_ecc_bytes;
1290 buf + (lt->data_bytes * chunk),
1294 nand_read_data_op(chip, oob + (lt->spare_bytes * chunk),
1299 (ALIGN(lt->ecc_bytes, 32) * chunk),
1313 const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
1339 else if (chunk < lt->nchunks - 1)
1378 const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
1379 int data_len = lt->data_bytes, spare_len = lt->spare_bytes;
1397 for (chunk = 0; chunk < lt->nchunks; chunk++) {
1399 if (chunk >= lt->full_chunk_cnt) {
1400 data_len = lt->last_data_bytes;
1401 spare_len = lt->last_spare_bytes;
1439 for (chunk = 0; chunk < lt->nchunks; chunk++) {
1448 data_off_in_page = chunk * (lt->data_bytes + lt->spare_bytes +
1449 lt->ecc_bytes);
1451 (chunk < lt->full_chunk_cnt ? lt->data_bytes :
1452 lt->last_data_bytes);
1454 (chunk < lt->full_chunk_cnt ? lt->spare_bytes :
1455 lt->last_spare_bytes);
1457 data_off = chunk * lt->data_bytes;
1458 spare_off = chunk * lt->spare_bytes;
1459 ecc_off = (lt->full_chunk_cnt * lt->spare_bytes) +
1460 lt->last_spare_bytes +
1461 (chunk * (lt->ecc_bytes + 2));
1463 data_len = chunk < lt->full_chunk_cnt ? lt->data_bytes :
1464 lt->last_data_bytes;
1465 spare_len = chunk < lt->full_chunk_cnt ? lt->spare_bytes :
1466 lt->last_spare_bytes;
1467 ecc_len = chunk < lt->full_chunk_cnt ? lt->ecc_bytes :
1468 lt->last_ecc_bytes;
1476 if (lt->writesize == 2048 && lt->strength == 8) {
1518 const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
1519 int full_chunk_size = lt->data_bytes + lt->spare_bytes + lt->ecc_bytes;
1520 int data_len = lt->data_bytes;
1521 int spare_len = lt->spare_bytes;
1522 int ecc_len = lt->ecc_bytes;
1524 int ecc_offset = (lt->full_chunk_cnt * lt->spare_bytes) +
1525 lt->last_spare_bytes;
1532 for (chunk = 0; chunk < lt->nchunks; chunk++) {
1533 if (chunk >= lt->full_chunk_cnt) {
1534 data_len = lt->last_data_bytes;
1535 spare_len = lt->last_spare_bytes;
1536 ecc_len = lt->last_ecc_bytes;
1544 nand_write_data_op(chip, buf + (chunk * lt->data_bytes),
1575 const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
1592 if (lt->nchunks == 1)
1602 } else if (chunk < lt->nchunks - 1) {
1609 if (chunk == lt->nchunks - 1)
1636 const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
1639 int data_len = lt->data_bytes;
1640 int spare_len = lt->spare_bytes;
1652 for (chunk = 0; chunk < lt->nchunks; chunk++) {
1653 if (chunk >= lt->full_chunk_cnt) {
1654 data_len = lt->last_data_bytes;
1655 spare_len = lt->last_spare_bytes;
2206 const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
2211 oobregion->length = (lt->full_chunk_cnt * lt->ecc_bytes) +
2212 lt->last_ecc_bytes;
2222 const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
2231 if (mtd->writesize == SZ_4K && lt->data_bytes == SZ_2K)
2236 oobregion->length = (lt->full_chunk_cnt * lt->spare_bytes) +
2237 lt->last_spare_bytes - oobregion->offset;