Lines Matching refs:nand_chip
126 int (*read_page)(struct nand_chip *chip, void *buf, void *oob, bool ecc,
137 void (*select_chip)(struct nand_chip *chip, int cs);
138 int (*setup_interface)(struct nand_chip *chip, int csline,
140 void (*enable_hwecc)(struct nand_chip *chip, bool enable);
161 struct nand_chip nand;
249 struct nand_chip *this = mtd_to_nand(mtd); in copy_spare()
292 struct nand_chip *nand_chip = mtd_to_nand(mtd); in mxc_do_addr_cycle() local
293 struct mxc_nand_host *host = nand_get_controller_data(nand_chip); in mxc_do_addr_cycle()
325 if (nand_chip->options & NAND_ROW_ADDR_3) { in mxc_do_addr_cycle()
554 struct nand_chip *nand_chip = mtd_to_nand(mtd); in send_page_v3() local
555 struct mxc_nand_host *host = nand_get_controller_data(nand_chip); in send_page_v3()
570 struct nand_chip *nand_chip = mtd_to_nand(mtd); in send_page_v2() local
571 struct mxc_nand_host *host = nand_get_controller_data(nand_chip); in send_page_v2()
584 struct nand_chip *nand_chip = mtd_to_nand(mtd); in send_page_v1() local
585 struct mxc_nand_host *host = nand_get_controller_data(nand_chip); in send_page_v1()
664 static void mxc_nand_enable_hwecc_v1_v2(struct nand_chip *chip, bool enable) in mxc_nand_enable_hwecc_v1_v2()
682 static void mxc_nand_enable_hwecc_v3(struct nand_chip *chip, bool enable) in mxc_nand_enable_hwecc_v3()
701 static int mxc_nand_dev_ready(struct nand_chip *chip) in mxc_nand_dev_ready()
710 static int mxc_nand_read_page_v1(struct nand_chip *chip, void *buf, void *oob, in mxc_nand_read_page_v1()
768 static int mxc_nand_read_page_v2_v3(struct nand_chip *chip, void *buf, in mxc_nand_read_page_v2_v3()
816 static int mxc_nand_read_page(struct nand_chip *chip, uint8_t *buf, in mxc_nand_read_page()
830 static int mxc_nand_read_page_raw(struct nand_chip *chip, uint8_t *buf, in mxc_nand_read_page_raw()
844 static int mxc_nand_read_oob(struct nand_chip *chip, int page) in mxc_nand_read_oob()
852 static int mxc_nand_write_page(struct nand_chip *chip, const uint8_t *buf, in mxc_nand_write_page()
873 static int mxc_nand_write_page_ecc(struct nand_chip *chip, const uint8_t *buf, in mxc_nand_write_page_ecc()
879 static int mxc_nand_write_page_raw(struct nand_chip *chip, const uint8_t *buf, in mxc_nand_write_page_raw()
885 static int mxc_nand_write_oob(struct nand_chip *chip, int page) in mxc_nand_write_oob()
895 static u_char mxc_nand_read_byte(struct nand_chip *nand_chip) in mxc_nand_read_byte() argument
897 struct mxc_nand_host *host = nand_get_controller_data(nand_chip); in mxc_nand_read_byte()
904 if (nand_chip->options & NAND_BUSWIDTH_16) { in mxc_nand_read_byte()
921 static void mxc_nand_write_buf(struct nand_chip *nand_chip, const u_char *buf, in mxc_nand_write_buf() argument
924 struct mtd_info *mtd = nand_to_mtd(nand_chip); in mxc_nand_write_buf()
925 struct mxc_nand_host *host = nand_get_controller_data(nand_chip); in mxc_nand_write_buf()
940 static void mxc_nand_read_buf(struct nand_chip *nand_chip, u_char *buf, in mxc_nand_read_buf() argument
943 struct mtd_info *mtd = nand_to_mtd(nand_chip); in mxc_nand_read_buf()
944 struct mxc_nand_host *host = nand_get_controller_data(nand_chip); in mxc_nand_read_buf()
957 static void mxc_nand_select_chip_v1_v3(struct nand_chip *nand_chip, int chip) in mxc_nand_select_chip_v1_v3() argument
959 struct mxc_nand_host *host = nand_get_controller_data(nand_chip); in mxc_nand_select_chip_v1_v3()
977 static void mxc_nand_select_chip_v2(struct nand_chip *nand_chip, int chip) in mxc_nand_select_chip_v2() argument
979 struct mxc_nand_host *host = nand_get_controller_data(nand_chip); in mxc_nand_select_chip_v2()
1005 struct nand_chip *nand_chip = mtd_to_nand(mtd); in mxc_v1_ooblayout_ecc() local
1007 if (section >= nand_chip->ecc.steps) in mxc_v1_ooblayout_ecc()
1019 struct nand_chip *nand_chip = mtd_to_nand(mtd); in mxc_v1_ooblayout_free() local
1021 if (section > nand_chip->ecc.steps) in mxc_v1_ooblayout_free()
1034 if (section < nand_chip->ecc.steps) in mxc_v1_ooblayout_free()
1052 struct nand_chip *nand_chip = mtd_to_nand(mtd); in mxc_v2_ooblayout_ecc() local
1053 int stepsize = nand_chip->ecc.bytes == 9 ? 16 : 26; in mxc_v2_ooblayout_ecc()
1055 if (section >= nand_chip->ecc.steps) in mxc_v2_ooblayout_ecc()
1059 oobregion->length = nand_chip->ecc.bytes; in mxc_v2_ooblayout_ecc()
1067 struct nand_chip *nand_chip = mtd_to_nand(mtd); in mxc_v2_ooblayout_free() local
1068 int stepsize = nand_chip->ecc.bytes == 9 ? 16 : 26; in mxc_v2_ooblayout_free()
1070 if (section >= nand_chip->ecc.steps) in mxc_v2_ooblayout_free()
1113 struct nand_chip *nand_chip = mtd_to_nand(mtd); in preset_v1() local
1114 struct mxc_nand_host *host = nand_get_controller_data(nand_chip); in preset_v1()
1117 if (nand_chip->ecc.engine_type == NAND_ECC_ENGINE_TYPE_ON_HOST && in preset_v1()
1140 static int mxc_nand_v2_setup_interface(struct nand_chip *chip, int csline, in mxc_nand_v2_setup_interface()
1216 struct nand_chip *nand_chip = mtd_to_nand(mtd); in preset_v2() local
1217 struct mxc_nand_host *host = nand_get_controller_data(nand_chip); in preset_v2()
1228 if (nand_chip->ecc.engine_type == NAND_ECC_ENGINE_TYPE_ON_HOST) in preset_v2()
1265 struct nand_chip *chip = mtd_to_nand(mtd); in preset_v3()
1333 static void mxc_nand_command(struct nand_chip *nand_chip, unsigned command, in mxc_nand_command() argument
1336 struct mtd_info *mtd = nand_to_mtd(nand_chip); in mxc_nand_command()
1337 struct mxc_nand_host *host = nand_get_controller_data(nand_chip); in mxc_nand_command()
1393 static int mxc_nand_set_features(struct nand_chip *chip, int addr, in mxc_nand_set_features()
1413 static int mxc_nand_get_features(struct nand_chip *chip, int addr, in mxc_nand_get_features()
1611 static int mxcnd_attach_chip(struct nand_chip *chip) in mxcnd_attach_chip()
1680 static int mxcnd_setup_interface(struct nand_chip *chip, int chipnr, in mxcnd_setup_interface()
1695 struct nand_chip *this; in mxcnd_probe()
1823 struct nand_chip *chip = &host->nand; in mxcnd_remove()