Lines Matching refs:nand_chip

260 static struct nand_chip nand_chip[CONFIG_SYS_MAX_NAND_DEVICE];  variable
279 struct nand_chip *chip = mtd_to_nand(mtd); in arasan_nand_get_addrcycle()
313 struct nand_chip *chip = mtd_to_nand(mtd); in arasan_nand_read_page()
434 struct nand_chip *chip, u8 *buf, int oob_required, int page) in arasan_nand_read_page_hwecc()
487 struct nand_chip *chip, const u8 *buf, int oob_required, in arasan_nand_write_page_hwecc()
590 static int arasan_nand_read_oob(struct mtd_info *mtd, struct nand_chip *chip, in arasan_nand_read_oob()
599 static int arasan_nand_write_oob(struct mtd_info *mtd, struct nand_chip *chip, in arasan_nand_write_oob()
1004 struct nand_chip *chip = mtd_to_nand(mtd); in arasan_nand_read_byte()
1036 struct nand_chip *chip = mtd_to_nand(mtd); in arasan_nand_cmd_function()
1091 struct nand_chip *nand_chip = mtd_to_nand(mtd); in arasan_check_ondie() local
1092 struct arasan_nand_info *nand = nand_get_controller_data(nand_chip); in arasan_check_ondie()
1099 nand_chip->cmdfunc(mtd, NAND_CMD_RESET, -1, -1); in arasan_check_ondie()
1100 nand_chip->cmdfunc(mtd, NAND_CMD_READID, 0, -1); in arasan_check_ondie()
1103 maf_id = nand_chip->read_byte(mtd); in arasan_check_ondie()
1104 dev_id = nand_chip->read_byte(mtd); in arasan_check_ondie()
1112 nand_chip->cmdfunc(mtd, NAND_CMD_SET_FEATURES, in arasan_check_ondie()
1115 nand_chip->write_buf(mtd, &set_feature[0], 4); in arasan_check_ondie()
1116 nand_chip->cmdfunc(mtd, NAND_CMD_GET_FEATURES, in arasan_check_ondie()
1120 get_feature[i] = nand_chip->read_byte(mtd); in arasan_check_ondie()
1128 nand_chip->bbt_td = &bbt_main_descr; in arasan_check_ondie()
1129 nand_chip->bbt_md = &bbt_mirror_descr; in arasan_check_ondie()
1137 struct nand_chip *nand_chip = mtd_to_nand(mtd); in arasan_nand_ecc_init() local
1142 nand_chip->ecc_step_ds)) { in arasan_nand_ecc_init()
1144 nand_chip->ecc_strength_ds) { in arasan_nand_ecc_init()
1180 nand_chip->ecc.size = ecc_matrix[found].ecc_codeword_size; in arasan_nand_ecc_init()
1181 nand_chip->ecc.strength = ecc_matrix[found].eccbits; in arasan_nand_ecc_init()
1182 nand_chip->ecc.bytes = ecc_matrix[found].eccsize; in arasan_nand_ecc_init()
1183 nand_chip->ecc.layout = &nand_oob; in arasan_nand_ecc_init()
1188 static int arasan_nand_init(struct nand_chip *nand_chip, int devnum) in arasan_nand_init() argument
1201 mtd = nand_to_mtd(nand_chip); in arasan_nand_init()
1202 nand_set_controller_data(nand_chip, nand); in arasan_nand_init()
1205 nand_chip->cmdfunc = arasan_nand_cmd_function; in arasan_nand_init()
1206 nand_chip->select_chip = arasan_nand_select_chip; in arasan_nand_init()
1207 nand_chip->read_byte = arasan_nand_read_byte; in arasan_nand_init()
1210 nand_chip->read_buf = arasan_nand_read_buf; in arasan_nand_init()
1211 nand_chip->write_buf = arasan_nand_write_buf; in arasan_nand_init()
1212 nand_chip->bbt_options = NAND_BBT_USE_FLASH; in arasan_nand_init()
1223 nand_chip->ecc.mode = NAND_ECC_HW; in arasan_nand_init()
1224 nand_chip->ecc.hwctl = NULL; in arasan_nand_init()
1225 nand_chip->ecc.read_page = arasan_nand_read_page_hwecc; in arasan_nand_init()
1226 nand_chip->ecc.write_page = arasan_nand_write_page_hwecc; in arasan_nand_init()
1227 nand_chip->ecc.read_oob = arasan_nand_read_oob; in arasan_nand_init()
1228 nand_chip->ecc.write_oob = arasan_nand_write_oob; in arasan_nand_init()
1237 nand_chip->ecc.strength = 1; in arasan_nand_init()
1238 nand_chip->ecc.size = mtd->writesize; in arasan_nand_init()
1239 nand_chip->ecc.bytes = 0; in arasan_nand_init()
1240 nand_chip->ecc.layout = &ondie_nand_oob_64; in arasan_nand_init()
1266 struct nand_chip *nand = &nand_chip[0]; in board_nand_init()