Lines Matching defs:lt

1040 	const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
1050 unsigned int oob_bytes = lt->spare_bytes + (raw ? lt->ecc_bytes : 0);
1075 lt->data_bytes + oob_bytes);
1076 memcpy(data_buf, nfc->dma_buf, lt->data_bytes);
1077 memcpy(oob_buf, nfc->dma_buf + lt->data_bytes, oob_bytes);
1079 marvell_nfc_xfer_data_in_pio(nfc, data_buf, lt->data_bytes);
1098 const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
1099 unsigned int full_sz = lt->data_bytes + lt->spare_bytes + lt->ecc_bytes;
1122 lt->data_bytes, true, page);
1154 const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
1164 unsigned int oob_bytes = lt->spare_bytes + (raw ? lt->ecc_bytes : 0);
1184 memcpy(nfc->dma_buf, data_buf, lt->data_bytes);
1185 memcpy(nfc->dma_buf + lt->data_bytes, oob_buf, oob_bytes);
1186 marvell_nfc_xfer_data_dma(nfc, DMA_TO_DEVICE, lt->data_bytes +
1187 lt->ecc_bytes + lt->spare_bytes);
1189 marvell_nfc_xfer_data_out_pio(nfc, data_buf, lt->data_bytes);
1260 const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
1262 int chunk_size = lt->data_bytes + lt->spare_bytes + lt->ecc_bytes;
1263 int ecc_offset = (lt->full_chunk_cnt * lt->spare_bytes) +
1264 lt->last_spare_bytes;
1265 int data_len = lt->data_bytes;
1266 int spare_len = lt->spare_bytes;
1267 int ecc_len = lt->ecc_bytes;
1277 for (chunk = 0; chunk < lt->nchunks; chunk++) {
1279 if (chunk >= lt->full_chunk_cnt) {
1280 data_len = lt->last_data_bytes;
1281 spare_len = lt->last_spare_bytes;
1282 ecc_len = lt->last_ecc_bytes;
1287 buf + (lt->data_bytes * chunk),
1291 nand_read_data_op(chip, oob + (lt->spare_bytes * chunk),
1296 (ALIGN(lt->ecc_bytes, 32) * chunk),
1310 const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
1336 else if (chunk < lt->nchunks - 1)
1375 const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
1376 int data_len = lt->data_bytes, spare_len = lt->spare_bytes;
1394 for (chunk = 0; chunk < lt->nchunks; chunk++) {
1396 if (chunk >= lt->full_chunk_cnt) {
1397 data_len = lt->last_data_bytes;
1398 spare_len = lt->last_spare_bytes;
1436 for (chunk = 0; chunk < lt->nchunks; chunk++) {
1445 data_off_in_page = chunk * (lt->data_bytes + lt->spare_bytes +
1446 lt->ecc_bytes);
1448 (chunk < lt->full_chunk_cnt ? lt->data_bytes :
1449 lt->last_data_bytes);
1451 (chunk < lt->full_chunk_cnt ? lt->spare_bytes :
1452 lt->last_spare_bytes);
1454 data_off = chunk * lt->data_bytes;
1455 spare_off = chunk * lt->spare_bytes;
1456 ecc_off = (lt->full_chunk_cnt * lt->spare_bytes) +
1457 lt->last_spare_bytes +
1458 (chunk * (lt->ecc_bytes + 2));
1460 data_len = chunk < lt->full_chunk_cnt ? lt->data_bytes :
1461 lt->last_data_bytes;
1462 spare_len = chunk < lt->full_chunk_cnt ? lt->spare_bytes :
1463 lt->last_spare_bytes;
1464 ecc_len = chunk < lt->full_chunk_cnt ? lt->ecc_bytes :
1465 lt->last_ecc_bytes;
1473 if (lt->writesize == 2048 && lt->strength == 8) {
1515 const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
1516 int full_chunk_size = lt->data_bytes + lt->spare_bytes + lt->ecc_bytes;
1517 int data_len = lt->data_bytes;
1518 int spare_len = lt->spare_bytes;
1519 int ecc_len = lt->ecc_bytes;
1521 int ecc_offset = (lt->full_chunk_cnt * lt->spare_bytes) +
1522 lt->last_spare_bytes;
1529 for (chunk = 0; chunk < lt->nchunks; chunk++) {
1530 if (chunk >= lt->full_chunk_cnt) {
1531 data_len = lt->last_data_bytes;
1532 spare_len = lt->last_spare_bytes;
1533 ecc_len = lt->last_ecc_bytes;
1541 nand_write_data_op(chip, buf + (chunk * lt->data_bytes),
1572 const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
1589 if (lt->nchunks == 1)
1599 } else if (chunk < lt->nchunks - 1) {
1606 if (chunk == lt->nchunks - 1)
1633 const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
1636 int data_len = lt->data_bytes;
1637 int spare_len = lt->spare_bytes;
1649 for (chunk = 0; chunk < lt->nchunks; chunk++) {
1650 if (chunk >= lt->full_chunk_cnt) {
1651 data_len = lt->last_data_bytes;
1652 spare_len = lt->last_spare_bytes;
2203 const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
2208 oobregion->length = (lt->full_chunk_cnt * lt->ecc_bytes) +
2209 lt->last_ecc_bytes;
2219 const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
2228 if (mtd->writesize == SZ_4K && lt->data_bytes == SZ_2K)
2233 oobregion->length = (lt->full_chunk_cnt * lt->spare_bytes) +
2234 lt->last_spare_bytes - oobregion->offset;