Lines Matching refs:nand_chip

422 static int zynq_nand_read_oob(struct mtd_info *mtd, struct nand_chip *chip,  in zynq_nand_read_oob()
449 static int zynq_nand_write_oob(struct mtd_info *mtd, struct nand_chip *chip, in zynq_nand_write_oob()
482 static int zynq_nand_read_page_raw(struct mtd_info *mtd, struct nand_chip *chip, in zynq_nand_read_page_raw()
504 struct nand_chip *chip, u8 *buf, int oob_required, int page) in zynq_nand_read_page_raw_nooob()
511 struct nand_chip *chip, u32 data_offs, in zynq_nand_read_subpage_raw()
531 struct nand_chip *chip, const u8 *buf, int oob_required, int page) in zynq_nand_write_page_raw()
563 struct nand_chip *chip, const u8 *buf, int oob_required, int page) in zynq_nand_write_page_hwecc()
621 struct nand_chip *chip, const u8 *buf, int oob_required, int page) in zynq_nand_write_page_swecc()
654 struct nand_chip *chip, u8 *buf, int oob_required, int page) in zynq_nand_read_page_hwecc()
726 struct nand_chip *chip, u8 *buf, int oob_required, int page) in zynq_nand_read_page_swecc()
782 struct nand_chip *chip = mtd->priv; in zynq_nand_cmd_function()
921 struct nand_chip *chip = mtd->priv; in zynq_nand_read_buf()
969 struct nand_chip *chip = mtd->priv; in zynq_nand_write_buf()
1049 static int zynq_nand_init(struct nand_chip *nand_chip, int devnum) in zynq_nand_init() argument
1069 mtd = nand_to_mtd(nand_chip); in zynq_nand_init()
1071 nand_chip->priv = xnand; in zynq_nand_init()
1072 mtd->priv = nand_chip; in zynq_nand_init()
1075 nand_chip->IO_ADDR_R = xnand->nand_base; in zynq_nand_init()
1076 nand_chip->IO_ADDR_W = xnand->nand_base; in zynq_nand_init()
1079 nand_chip->cmdfunc = zynq_nand_cmd_function; in zynq_nand_init()
1080 nand_chip->dev_ready = zynq_nand_device_ready; in zynq_nand_init()
1081 nand_chip->select_chip = zynq_nand_select_chip; in zynq_nand_init()
1084 nand_chip->chip_delay = 30; in zynq_nand_init()
1087 nand_chip->read_buf = zynq_nand_read_buf; in zynq_nand_init()
1088 nand_chip->write_buf = zynq_nand_write_buf; in zynq_nand_init()
1098 nand_chip->options = NAND_BUSWIDTH_16; in zynq_nand_init()
1100 nand_chip->bbt_options = NAND_BBT_USE_FLASH; in zynq_nand_init()
1103 if (zynq_nand_init_nand_flash(nand_chip->options) < 0) { in zynq_nand_init()
1114 nand_chip->cmdfunc(mtd, NAND_CMD_RESET, -1, -1); in zynq_nand_init()
1115 nand_chip->cmdfunc(mtd, NAND_CMD_READID, 0x00, -1); in zynq_nand_init()
1118 maf_id = nand_chip->read_byte(mtd); in zynq_nand_init()
1119 dev_id = nand_chip->read_byte(mtd); in zynq_nand_init()
1129 nand_chip->cmdfunc(mtd, NAND_CMD_SET_FEATURES, in zynq_nand_init()
1132 writeb(set_feature[i], nand_chip->IO_ADDR_W); in zynq_nand_init()
1137 nand_chip->cmdfunc(mtd, NAND_CMD_GET_FEATURES, in zynq_nand_init()
1139 nand_chip->read_buf(mtd, get_feature, 4); in zynq_nand_init()
1158 nand_chip->ecc.mode = NAND_ECC_HW; in zynq_nand_init()
1159 nand_chip->ecc.strength = 1; in zynq_nand_init()
1160 nand_chip->ecc.read_page = zynq_nand_read_page_raw_nooob; in zynq_nand_init()
1161 nand_chip->ecc.read_subpage = zynq_nand_read_subpage_raw; in zynq_nand_init()
1162 nand_chip->ecc.write_page = zynq_nand_write_page_raw; in zynq_nand_init()
1163 nand_chip->ecc.read_page_raw = zynq_nand_read_page_raw; in zynq_nand_init()
1164 nand_chip->ecc.write_page_raw = zynq_nand_write_page_raw; in zynq_nand_init()
1165 nand_chip->ecc.read_oob = zynq_nand_read_oob; in zynq_nand_init()
1166 nand_chip->ecc.write_oob = zynq_nand_write_oob; in zynq_nand_init()
1167 nand_chip->ecc.size = mtd->writesize; in zynq_nand_init()
1168 nand_chip->ecc.bytes = 0; in zynq_nand_init()
1171 nand_chip->options |= NAND_SUBPAGE_READ; in zynq_nand_init()
1175 nand_chip->ecc.layout = &ondie_nand_oob_64; in zynq_nand_init()
1177 nand_chip->bbt_td = &bbt_main_descr; in zynq_nand_init()
1178 nand_chip->bbt_md = &bbt_mirror_descr; in zynq_nand_init()
1182 nand_chip->ecc.mode = NAND_ECC_HW; in zynq_nand_init()
1183 nand_chip->ecc.strength = 1; in zynq_nand_init()
1184 nand_chip->ecc.size = ZYNQ_NAND_ECC_SIZE; in zynq_nand_init()
1185 nand_chip->ecc.bytes = 3; in zynq_nand_init()
1186 nand_chip->ecc.calculate = zynq_nand_calculate_hwecc; in zynq_nand_init()
1187 nand_chip->ecc.correct = zynq_nand_correct_data; in zynq_nand_init()
1188 nand_chip->ecc.hwctl = NULL; in zynq_nand_init()
1189 nand_chip->ecc.read_page = zynq_nand_read_page_hwecc; in zynq_nand_init()
1190 nand_chip->ecc.write_page = zynq_nand_write_page_hwecc; in zynq_nand_init()
1191 nand_chip->ecc.read_page_raw = zynq_nand_read_page_raw; in zynq_nand_init()
1192 nand_chip->ecc.write_page_raw = zynq_nand_write_page_raw; in zynq_nand_init()
1193 nand_chip->ecc.read_oob = zynq_nand_read_oob; in zynq_nand_init()
1194 nand_chip->ecc.write_oob = zynq_nand_write_oob; in zynq_nand_init()
1216 nand_chip->ecc.mode = NAND_ECC_SOFT; in zynq_nand_init()
1217 nand_chip->ecc.calculate = nand_calculate_ecc; in zynq_nand_init()
1218 nand_chip->ecc.correct = nand_correct_data; in zynq_nand_init()
1219 nand_chip->ecc.read_page = zynq_nand_read_page_swecc; in zynq_nand_init()
1220 nand_chip->ecc.write_page = zynq_nand_write_page_swecc; in zynq_nand_init()
1221 nand_chip->ecc.size = 256; in zynq_nand_init()
1226 nand_chip->ecc.layout = &nand_oob_16; in zynq_nand_init()
1228 nand_chip->ecc.layout = &nand_oob_64; in zynq_nand_init()
1246 static struct nand_chip nand_chip[CONFIG_SYS_MAX_NAND_DEVICE]; variable
1250 struct nand_chip *nand = &nand_chip[0]; in board_nand_init()