Lines Matching refs:spare
323 u32 fmt, spare, i; in mtk_nfc_hw_runtime_config() local
328 spare = mtk_nand->spare_per_sector; in mtk_nfc_hw_runtime_config()
365 spare >>= 1; in mtk_nfc_hw_runtime_config()
368 if (nfc->caps->spare_size[i] == spare) in mtk_nfc_hw_runtime_config()
373 dev_err(nfc->dev, "invalid spare size %d\n", spare); in mtk_nfc_hw_runtime_config()
945 u32 spare = mtk_nand->spare_per_sector; in mtk_nfc_read_subpage() local
958 column = start * (chip->ecc.size + spare); in mtk_nfc_read_subpage()
960 len = sectors * chip->ecc.size + (raw ? sectors * spare : 0); in mtk_nfc_read_subpage()
1198 const u8 *spare = nfc->caps->spare_size; in mtk_nfc_set_spare_per_sector() local
1211 if (*sps >= spare[i] && spare[i] >= spare[closest_spare]) { in mtk_nfc_set_spare_per_sector()
1213 if (*sps == spare[i]) in mtk_nfc_set_spare_per_sector()
1218 *sps = spare[closest_spare]; in mtk_nfc_set_spare_per_sector()
1232 u32 spare; in mtk_nfc_ecc_init() local
1263 ret = mtk_nfc_set_spare_per_sector(&spare, mtd); in mtk_nfc_ecc_init()
1270 free = spare - free; in mtk_nfc_ecc_init()
1278 spare -= NFI_FDM_MAX_SIZE; in mtk_nfc_ecc_init()
1279 nand->ecc.strength = (spare << 3) / in mtk_nfc_ecc_init()
1282 spare -= NFI_FDM_MIN_SIZE; in mtk_nfc_ecc_init()
1283 nand->ecc.strength = (spare << 3) / in mtk_nfc_ecc_init()