Lines Matching refs:nand_chip

128 	int (*read_page)(struct nand_chip *chip, void *buf, void *oob, bool ecc,
139 void (*select_chip)(struct nand_chip *chip, int cs);
140 int (*setup_data_interface)(struct nand_chip *chip, int csline,
142 void (*enable_hwecc)(struct nand_chip *chip, bool enable);
163 struct nand_chip nand;
252 struct nand_chip *this = mtd_to_nand(mtd); in copy_spare()
295 struct nand_chip *nand_chip = mtd_to_nand(mtd); in mxc_do_addr_cycle() local
296 struct mxc_nand_host *host = nand_get_controller_data(nand_chip); in mxc_do_addr_cycle()
328 if (nand_chip->options & NAND_ROW_ADDR_3) { in mxc_do_addr_cycle()
557 struct nand_chip *nand_chip = mtd_to_nand(mtd); in send_page_v3() local
558 struct mxc_nand_host *host = nand_get_controller_data(nand_chip); in send_page_v3()
573 struct nand_chip *nand_chip = mtd_to_nand(mtd); in send_page_v2() local
574 struct mxc_nand_host *host = nand_get_controller_data(nand_chip); in send_page_v2()
587 struct nand_chip *nand_chip = mtd_to_nand(mtd); in send_page_v1() local
588 struct mxc_nand_host *host = nand_get_controller_data(nand_chip); in send_page_v1()
667 static void mxc_nand_enable_hwecc_v1_v2(struct nand_chip *chip, bool enable) in mxc_nand_enable_hwecc_v1_v2()
685 static void mxc_nand_enable_hwecc_v3(struct nand_chip *chip, bool enable) in mxc_nand_enable_hwecc_v3()
704 static int mxc_nand_dev_ready(struct nand_chip *chip) in mxc_nand_dev_ready()
713 static int mxc_nand_read_page_v1(struct nand_chip *chip, void *buf, void *oob, in mxc_nand_read_page_v1()
771 static int mxc_nand_read_page_v2_v3(struct nand_chip *chip, void *buf, in mxc_nand_read_page_v2_v3()
819 static int mxc_nand_read_page(struct nand_chip *chip, uint8_t *buf, in mxc_nand_read_page()
833 static int mxc_nand_read_page_raw(struct nand_chip *chip, uint8_t *buf, in mxc_nand_read_page_raw()
847 static int mxc_nand_read_oob(struct nand_chip *chip, int page) in mxc_nand_read_oob()
855 static int mxc_nand_write_page(struct nand_chip *chip, const uint8_t *buf, in mxc_nand_write_page()
876 static int mxc_nand_write_page_ecc(struct nand_chip *chip, const uint8_t *buf, in mxc_nand_write_page_ecc()
882 static int mxc_nand_write_page_raw(struct nand_chip *chip, const uint8_t *buf, in mxc_nand_write_page_raw()
888 static int mxc_nand_write_oob(struct nand_chip *chip, int page) in mxc_nand_write_oob()
898 static u_char mxc_nand_read_byte(struct nand_chip *nand_chip) in mxc_nand_read_byte() argument
900 struct mxc_nand_host *host = nand_get_controller_data(nand_chip); in mxc_nand_read_byte()
907 if (nand_chip->options & NAND_BUSWIDTH_16) { in mxc_nand_read_byte()
924 static void mxc_nand_write_buf(struct nand_chip *nand_chip, const u_char *buf, in mxc_nand_write_buf() argument
927 struct mtd_info *mtd = nand_to_mtd(nand_chip); in mxc_nand_write_buf()
928 struct mxc_nand_host *host = nand_get_controller_data(nand_chip); in mxc_nand_write_buf()
943 static void mxc_nand_read_buf(struct nand_chip *nand_chip, u_char *buf, in mxc_nand_read_buf() argument
946 struct mtd_info *mtd = nand_to_mtd(nand_chip); in mxc_nand_read_buf()
947 struct mxc_nand_host *host = nand_get_controller_data(nand_chip); in mxc_nand_read_buf()
960 static void mxc_nand_select_chip_v1_v3(struct nand_chip *nand_chip, int chip) in mxc_nand_select_chip_v1_v3() argument
962 struct mxc_nand_host *host = nand_get_controller_data(nand_chip); in mxc_nand_select_chip_v1_v3()
980 static void mxc_nand_select_chip_v2(struct nand_chip *nand_chip, int chip) in mxc_nand_select_chip_v2() argument
982 struct mxc_nand_host *host = nand_get_controller_data(nand_chip); in mxc_nand_select_chip_v2()
1008 struct nand_chip *nand_chip = mtd_to_nand(mtd); in mxc_v1_ooblayout_ecc() local
1010 if (section >= nand_chip->ecc.steps) in mxc_v1_ooblayout_ecc()
1022 struct nand_chip *nand_chip = mtd_to_nand(mtd); in mxc_v1_ooblayout_free() local
1024 if (section > nand_chip->ecc.steps) in mxc_v1_ooblayout_free()
1037 if (section < nand_chip->ecc.steps) in mxc_v1_ooblayout_free()
1055 struct nand_chip *nand_chip = mtd_to_nand(mtd); in mxc_v2_ooblayout_ecc() local
1056 int stepsize = nand_chip->ecc.bytes == 9 ? 16 : 26; in mxc_v2_ooblayout_ecc()
1058 if (section >= nand_chip->ecc.steps) in mxc_v2_ooblayout_ecc()
1062 oobregion->length = nand_chip->ecc.bytes; in mxc_v2_ooblayout_ecc()
1070 struct nand_chip *nand_chip = mtd_to_nand(mtd); in mxc_v2_ooblayout_free() local
1071 int stepsize = nand_chip->ecc.bytes == 9 ? 16 : 26; in mxc_v2_ooblayout_free()
1073 if (section >= nand_chip->ecc.steps) in mxc_v2_ooblayout_free()
1116 struct nand_chip *nand_chip = mtd_to_nand(mtd); in preset_v1() local
1117 struct mxc_nand_host *host = nand_get_controller_data(nand_chip); in preset_v1()
1120 if (nand_chip->ecc.mode == NAND_ECC_HW && mtd->writesize) in preset_v1()
1142 static int mxc_nand_v2_setup_data_interface(struct nand_chip *chip, int csline, in mxc_nand_v2_setup_data_interface()
1218 struct nand_chip *nand_chip = mtd_to_nand(mtd); in preset_v2() local
1219 struct mxc_nand_host *host = nand_get_controller_data(nand_chip); in preset_v2()
1230 if (nand_chip->ecc.mode == NAND_ECC_HW) in preset_v2()
1267 struct nand_chip *chip = mtd_to_nand(mtd); in preset_v3()
1335 static void mxc_nand_command(struct nand_chip *nand_chip, unsigned command, in mxc_nand_command() argument
1338 struct mtd_info *mtd = nand_to_mtd(nand_chip); in mxc_nand_command()
1339 struct mxc_nand_host *host = nand_get_controller_data(nand_chip); in mxc_nand_command()
1395 static int mxc_nand_set_features(struct nand_chip *chip, int addr, in mxc_nand_set_features()
1415 static int mxc_nand_get_features(struct nand_chip *chip, int addr, in mxc_nand_get_features()
1677 static int mxcnd_attach_chip(struct nand_chip *chip) in mxcnd_attach_chip()
1741 static int mxcnd_setup_data_interface(struct nand_chip *chip, int chipnr, in mxcnd_setup_data_interface()
1756 struct nand_chip *this; in mxcnd_probe()