Lines Matching refs:rc
724 int rc; in ndf_wait_idle() local
728 rc = readq_poll_timeout(tn->base + NDF_ST_REG, in ndf_wait_idle()
730 if (!rc) in ndf_wait_idle()
731 rc = readq_poll_timeout(tn->base + NDF_DMA_CFG, in ndf_wait_idle()
735 return rc; in ndf_wait_idle()
881 int width, page_size, rc; in ndf_build_pre_cmd() local
897 rc = ndf_queue_cmd_timing(tn, timings); in ndf_build_pre_cmd()
898 if (rc) in ndf_build_pre_cmd()
899 return rc; in ndf_build_pre_cmd()
901 rc = ndf_queue_cmd_bus(tn, NDF_BUS_ACQUIRE); in ndf_build_pre_cmd()
902 if (rc) in ndf_build_pre_cmd()
903 return rc; in ndf_build_pre_cmd()
905 rc = ndf_queue_cmd_chip(tn, 1, tn->selected_chip, width); in ndf_build_pre_cmd()
906 if (rc) in ndf_build_pre_cmd()
907 return rc; in ndf_build_pre_cmd()
909 rc = ndf_queue_cmd_wait(tn, t1); in ndf_build_pre_cmd()
910 if (rc) in ndf_build_pre_cmd()
911 return rc; in ndf_build_pre_cmd()
913 rc = ndf_queue_cmd_cle(tn, cmd1); in ndf_build_pre_cmd()
914 if (rc) in ndf_build_pre_cmd()
915 return rc; in ndf_build_pre_cmd()
918 rc = ndf_build_wait_busy(tn); in ndf_build_pre_cmd()
919 if (rc) in ndf_build_pre_cmd()
920 return rc; in ndf_build_pre_cmd()
922 rc = ndf_queue_cmd_ale(tn, addr_bytes, nand, in ndf_build_pre_cmd()
924 if (rc) in ndf_build_pre_cmd()
925 return rc; in ndf_build_pre_cmd()
930 rc = ndf_build_wait_busy(tn); in ndf_build_pre_cmd()
931 if (rc) in ndf_build_pre_cmd()
932 return rc; in ndf_build_pre_cmd()
934 rc = ndf_queue_cmd_cle(tn, cmd2); in ndf_build_pre_cmd()
935 if (rc) in ndf_build_pre_cmd()
936 return rc; in ndf_build_pre_cmd()
943 int rc; in ndf_build_post_cmd() local
946 rc = ndf_queue_cmd_chip(tn, 0, 0, 0); in ndf_build_post_cmd()
947 if (rc) in ndf_build_post_cmd()
948 return rc; in ndf_build_post_cmd()
950 rc = ndf_queue_cmd_wait(tn, t2); in ndf_build_post_cmd()
951 if (rc) in ndf_build_post_cmd()
952 return rc; in ndf_build_post_cmd()
955 rc = ndf_queue_cmd_bus(tn, 0); in ndf_build_post_cmd()
956 if (rc) in ndf_build_post_cmd()
957 return rc; in ndf_build_post_cmd()
959 rc = ndf_queue_cmd_wait(tn, hold_time); in ndf_build_post_cmd()
960 if (rc) in ndf_build_post_cmd()
961 return rc; in ndf_build_post_cmd()
986 int rc; in octeontx_nand_reset() local
988 rc = ndf_build_pre_cmd(tn, NAND_CMD_RESET, 0, 0, 0, 0); in octeontx_nand_reset()
989 if (rc) in octeontx_nand_reset()
990 return rc; in octeontx_nand_reset()
992 rc = ndf_build_wait_busy(tn); in octeontx_nand_reset()
993 if (rc) in octeontx_nand_reset()
994 return rc; in octeontx_nand_reset()
996 rc = ndf_build_post_cmd(tn, t2); in octeontx_nand_reset()
997 if (rc) in octeontx_nand_reset()
998 return rc; in octeontx_nand_reset()
1008 int timing_mode, bytes, rc; in ndf_read() local
1020 rc = ndf_build_pre_cmd(tn, cmd1, addr_bytes, page, col, cmd2); in ndf_read()
1021 if (rc) { in ndf_read()
1023 return rc; in ndf_read()
1027 rc = ndf_build_wait_busy(tn); in ndf_read()
1028 if (rc) { in ndf_read()
1030 return rc; in ndf_read()
1045 rc = ndf_submit(tn, &cmd); in ndf_read()
1046 if (rc) { in ndf_read()
1048 return rc; in ndf_read()
1054 rc = ndf_build_post_cmd(tn, t2); in ndf_read()
1055 if (rc) { in ndf_read()
1057 return rc; in ndf_read()
1061 rc = ndf_wait(tn); in ndf_read()
1062 if (rc) { in ndf_read()
1064 return rc; in ndf_read()
1071 rc = ndf_wait_idle(tn); in ndf_read()
1072 if (rc) { in ndf_read()
1074 return rc; in ndf_read()
1088 int rc; in octeontx_nand_get_features() local
1094 rc = ndf_read(tn, NAND_CMD_GET_FEATURES, 1, feature_addr, 0, 0, len); in octeontx_nand_get_features()
1095 if (rc) in octeontx_nand_get_features()
1096 return rc; in octeontx_nand_get_features()
1110 int rc; in octeontx_nand_set_features() local
1112 rc = ndf_build_pre_cmd(tn, NAND_CMD_SET_FEATURES, in octeontx_nand_set_features()
1114 if (rc) in octeontx_nand_set_features()
1115 return rc; in octeontx_nand_set_features()
1122 rc = ndf_queue_cmd_write(tn, 8); in octeontx_nand_set_features()
1123 if (rc) in octeontx_nand_set_features()
1124 return rc; in octeontx_nand_set_features()
1126 rc = ndf_build_wait_busy(tn); in octeontx_nand_set_features()
1127 if (rc) in octeontx_nand_set_features()
1128 return rc; in octeontx_nand_set_features()
1130 rc = ndf_build_post_cmd(tn, t2); in octeontx_nand_set_features()
1131 if (rc) in octeontx_nand_set_features()
1132 return rc; in octeontx_nand_set_features()
1160 int rc; in ndf_block_erase() local
1162 rc = ndf_build_pre_cmd(tn, NAND_CMD_ERASE1, addr_bytes, in ndf_block_erase()
1164 if (rc) in ndf_block_erase()
1165 return rc; in ndf_block_erase()
1168 rc = ndf_build_wait_busy(tn); in ndf_block_erase()
1169 if (rc) in ndf_block_erase()
1170 return rc; in ndf_block_erase()
1172 rc = ndf_build_post_cmd(tn, t2); in ndf_block_erase()
1173 if (rc) in ndf_block_erase()
1174 return rc; in ndf_block_erase()
1185 int len, rc; in ndf_page_write() local
1195 rc = ndf_build_pre_cmd(tn, NAND_CMD_SEQIN, addr_bytes, page, 0, 0); in ndf_page_write()
1196 if (rc) in ndf_page_write()
1197 return rc; in ndf_page_write()
1199 rc = ndf_queue_cmd_write(tn, len); in ndf_page_write()
1200 if (rc) in ndf_page_write()
1201 return rc; in ndf_page_write()
1203 rc = ndf_queue_cmd_cle(tn, NAND_CMD_PAGEPROG); in ndf_page_write()
1204 if (rc) in ndf_page_write()
1205 return rc; in ndf_page_write()
1208 rc = ndf_build_wait_busy(tn); in ndf_page_write()
1209 if (rc) in ndf_page_write()
1210 return rc; in ndf_page_write()
1212 rc = ndf_build_post_cmd(tn, t2); in ndf_page_write()
1213 if (rc) in ndf_page_write()
1214 return rc; in ndf_page_write()
1217 rc = ndf_wait(tn); in ndf_page_write()
1218 if (rc) in ndf_page_write()
1219 return rc; in ndf_page_write()
1231 int rc; in octeontx_nand_cmdfunc() local
1247 rc = ndf_read(tn, command, 1, column, 0, 0, 8); in octeontx_nand_cmdfunc()
1248 if (rc < 0) in octeontx_nand_cmdfunc()
1249 dev_err(tn->dev, "READID failed with %d\n", rc); in octeontx_nand_cmdfunc()
1251 tn->buf.data_len = rc; in octeontx_nand_cmdfunc()
1258 rc = ndf_page_read(tn, page_addr, column, mtd->oobsize); in octeontx_nand_cmdfunc()
1259 if (rc < mtd->oobsize) in octeontx_nand_cmdfunc()
1263 tn->buf.data_len = rc; in octeontx_nand_cmdfunc()
1270 rc = ndf_page_read(tn, page_addr, column, in octeontx_nand_cmdfunc()
1273 if (rc < mtd->writesize + mtd->oobsize) in octeontx_nand_cmdfunc()
1274 dev_err(tn->dev, "READ0 failed with %d\n", rc); in octeontx_nand_cmdfunc()
1276 tn->buf.data_len = rc; in octeontx_nand_cmdfunc()
1282 rc = ndf_read(tn, command, 0, 0, 0, 0, 8); in octeontx_nand_cmdfunc()
1283 if (rc < 0) in octeontx_nand_cmdfunc()
1284 dev_err(tn->dev, "STATUS failed with %d\n", rc); in octeontx_nand_cmdfunc()
1289 rc = octeontx_nand_reset(tn); in octeontx_nand_cmdfunc()
1290 if (rc < 0) in octeontx_nand_cmdfunc()
1291 dev_err(tn->dev, "RESET failed with %d\n", rc); in octeontx_nand_cmdfunc()
1297 rc = ndf_read(tn, command, 1, 0, 0, 0, in octeontx_nand_cmdfunc()
1299 if (rc < 0) in octeontx_nand_cmdfunc()
1300 dev_err(tn->dev, "PARAM failed with %d\n", rc); in octeontx_nand_cmdfunc()
1302 tn->buf.data_len = rc; in octeontx_nand_cmdfunc()
1329 rc = ndf_page_write(tn, octeontx_nand->selected_page); in octeontx_nand_cmdfunc()
1330 if (rc) in octeontx_nand_cmdfunc()
1331 dev_err(tn->dev, "PAGEPROG failed with %d\n", rc); in octeontx_nand_cmdfunc()
1337 rc = octeontx_nand_set_features(mtd, nand, in octeontx_nand_cmdfunc()
1339 if (rc) in octeontx_nand_cmdfunc()
1340 dev_err(tn->dev, "SET_FEATURES failed with %d\n", rc); in octeontx_nand_cmdfunc()
1345 rc = octeontx_nand_get_features(mtd, nand, in octeontx_nand_cmdfunc()
1347 if (!rc) { in octeontx_nand_cmdfunc()
1351 dev_err(tn->dev, "GET_FEATURES failed with %d\n", rc); in octeontx_nand_cmdfunc()
1380 int rc; in octeontx_nand_setup_dat_intf() local
1400 rc = -EINVAL; in octeontx_nand_setup_dat_intf()
1402 rc = 0; in octeontx_nand_setup_dat_intf()
1417 rc = 0; in octeontx_nand_setup_dat_intf()
1419 rc = octeontx_nfc_chip_set_timings(chip, &conf->timings.sdr); in octeontx_nand_setup_dat_intf()
1420 if (!rc) { in octeontx_nand_setup_dat_intf()
1425 return rc; in octeontx_nand_setup_dat_intf()
1447 int rc; in octeontx_nand_bch_calculate_ecc_internal() local
1465 rc = octeontx_bch_encode(bch_vf, ihandle, nand->ecc.size, in octeontx_nand_bch_calculate_ecc_internal()
1469 if (!rc) { in octeontx_nand_bch_calculate_ecc_internal()
1535 int rc; in octeontx_nand_bch_correct() local
1561 rc = octeontx_bch_decode(bch_vf, ihandle, nand->ecc.size, in octeontx_nand_bch_correct()
1564 if (!rc) in octeontx_nand_bch_correct()
1567 if (rc) { in octeontx_nand_bch_correct()
1823 int rc = 0; in octeontx_bch_save_empty_eccmask() local
1831 rc = octeontx_nand_bch_calculate_ecc_internal(mtd, in octeontx_bch_save_empty_eccmask()
1840 return rc; in octeontx_bch_save_empty_eccmask()
2037 int rc; in octeontx_nfc_init() local
2059 rc = set_default_timings(tn, timings); in octeontx_nfc_init()
2060 if (rc) in octeontx_nfc_init()
2061 return rc; in octeontx_nfc_init()
2185 int rc = 0; in octeontx_pci_nand_deferred_probe() local
2192 rc = device_probe(pdev->dev); in octeontx_pci_nand_deferred_probe()
2193 if (rc && rc != -ENODEV) { in octeontx_pci_nand_deferred_probe()
2195 __func__, rc, pdev->dev->name); in octeontx_pci_nand_deferred_probe()
2199 return rc; in octeontx_pci_nand_deferred_probe()