Lines Matching refs:lt
1026 const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
1036 unsigned int oob_bytes = lt->spare_bytes + (raw ? lt->ecc_bytes : 0);
1061 lt->data_bytes + oob_bytes);
1062 memcpy(data_buf, nfc->dma_buf, lt->data_bytes);
1063 memcpy(oob_buf, nfc->dma_buf + lt->data_bytes, oob_bytes);
1065 marvell_nfc_xfer_data_in_pio(nfc, data_buf, lt->data_bytes);
1084 const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
1085 unsigned int full_sz = lt->data_bytes + lt->spare_bytes + lt->ecc_bytes;
1108 lt->data_bytes, true, page);
1140 const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
1150 unsigned int oob_bytes = lt->spare_bytes + (raw ? lt->ecc_bytes : 0);
1170 memcpy(nfc->dma_buf, data_buf, lt->data_bytes);
1171 memcpy(nfc->dma_buf + lt->data_bytes, oob_buf, oob_bytes);
1172 marvell_nfc_xfer_data_dma(nfc, DMA_TO_DEVICE, lt->data_bytes +
1173 lt->ecc_bytes + lt->spare_bytes);
1175 marvell_nfc_xfer_data_out_pio(nfc, data_buf, lt->data_bytes);
1246 const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
1248 int chunk_size = lt->data_bytes + lt->spare_bytes + lt->ecc_bytes;
1249 int ecc_offset = (lt->full_chunk_cnt * lt->spare_bytes) +
1250 lt->last_spare_bytes;
1251 int data_len = lt->data_bytes;
1252 int spare_len = lt->spare_bytes;
1253 int ecc_len = lt->ecc_bytes;
1263 for (chunk = 0; chunk < lt->nchunks; chunk++) {
1265 if (chunk >= lt->full_chunk_cnt) {
1266 data_len = lt->last_data_bytes;
1267 spare_len = lt->last_spare_bytes;
1268 ecc_len = lt->last_ecc_bytes;
1273 buf + (lt->data_bytes * chunk),
1277 nand_read_data_op(chip, oob + (lt->spare_bytes * chunk),
1282 (ALIGN(lt->ecc_bytes, 32) * chunk),
1296 const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
1322 else if (chunk < lt->nchunks - 1)
1361 const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
1362 int data_len = lt->data_bytes, spare_len = lt->spare_bytes;
1380 for (chunk = 0; chunk < lt->nchunks; chunk++) {
1382 if (chunk >= lt->full_chunk_cnt) {
1383 data_len = lt->last_data_bytes;
1384 spare_len = lt->last_spare_bytes;
1422 for (chunk = 0; chunk < lt->nchunks; chunk++) {
1431 data_off_in_page = chunk * (lt->data_bytes + lt->spare_bytes +
1432 lt->ecc_bytes);
1434 (chunk < lt->full_chunk_cnt ? lt->data_bytes :
1435 lt->last_data_bytes);
1437 (chunk < lt->full_chunk_cnt ? lt->spare_bytes :
1438 lt->last_spare_bytes);
1440 data_off = chunk * lt->data_bytes;
1441 spare_off = chunk * lt->spare_bytes;
1442 ecc_off = (lt->full_chunk_cnt * lt->spare_bytes) +
1443 lt->last_spare_bytes +
1444 (chunk * (lt->ecc_bytes + 2));
1446 data_len = chunk < lt->full_chunk_cnt ? lt->data_bytes :
1447 lt->last_data_bytes;
1448 spare_len = chunk < lt->full_chunk_cnt ? lt->spare_bytes :
1449 lt->last_spare_bytes;
1450 ecc_len = chunk < lt->full_chunk_cnt ? lt->ecc_bytes :
1451 lt->last_ecc_bytes;
1459 if (lt->writesize == 2048 && lt->strength == 8) {
1501 const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
1502 int full_chunk_size = lt->data_bytes + lt->spare_bytes + lt->ecc_bytes;
1503 int data_len = lt->data_bytes;
1504 int spare_len = lt->spare_bytes;
1505 int ecc_len = lt->ecc_bytes;
1507 int ecc_offset = (lt->full_chunk_cnt * lt->spare_bytes) +
1508 lt->last_spare_bytes;
1515 for (chunk = 0; chunk < lt->nchunks; chunk++) {
1516 if (chunk >= lt->full_chunk_cnt) {
1517 data_len = lt->last_data_bytes;
1518 spare_len = lt->last_spare_bytes;
1519 ecc_len = lt->last_ecc_bytes;
1527 nand_write_data_op(chip, buf + (chunk * lt->data_bytes),
1558 const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
1575 if (lt->nchunks == 1)
1585 } else if (chunk < lt->nchunks - 1) {
1592 if (chunk == lt->nchunks - 1)
1619 const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
1622 int data_len = lt->data_bytes;
1623 int spare_len = lt->spare_bytes;
1635 for (chunk = 0; chunk < lt->nchunks; chunk++) {
1636 if (chunk >= lt->full_chunk_cnt) {
1637 data_len = lt->last_data_bytes;
1638 spare_len = lt->last_spare_bytes;
2189 const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
2194 oobregion->length = (lt->full_chunk_cnt * lt->ecc_bytes) +
2195 lt->last_ecc_bytes;
2205 const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
2214 if (mtd->writesize == SZ_4K && lt->data_bytes == SZ_2K)
2219 oobregion->length = (lt->full_chunk_cnt * lt->spare_bytes) +
2220 lt->last_spare_bytes - oobregion->offset;