Lines Matching refs:nand_chip
127 int (*read_page)(struct nand_chip *chip, void *buf, void *oob, bool ecc,
138 void (*select_chip)(struct nand_chip *chip, int cs);
139 int (*setup_interface)(struct nand_chip *chip, int csline,
141 void (*enable_hwecc)(struct nand_chip *chip, bool enable);
162 struct nand_chip nand;
250 struct nand_chip *this = mtd_to_nand(mtd); in copy_spare()
293 struct nand_chip *nand_chip = mtd_to_nand(mtd); in mxc_do_addr_cycle() local
294 struct mxc_nand_host *host = nand_get_controller_data(nand_chip); in mxc_do_addr_cycle()
326 if (nand_chip->options & NAND_ROW_ADDR_3) { in mxc_do_addr_cycle()
555 struct nand_chip *nand_chip = mtd_to_nand(mtd); in send_page_v3() local
556 struct mxc_nand_host *host = nand_get_controller_data(nand_chip); in send_page_v3()
571 struct nand_chip *nand_chip = mtd_to_nand(mtd); in send_page_v2() local
572 struct mxc_nand_host *host = nand_get_controller_data(nand_chip); in send_page_v2()
585 struct nand_chip *nand_chip = mtd_to_nand(mtd); in send_page_v1() local
586 struct mxc_nand_host *host = nand_get_controller_data(nand_chip); in send_page_v1()
665 static void mxc_nand_enable_hwecc_v1_v2(struct nand_chip *chip, bool enable) in mxc_nand_enable_hwecc_v1_v2()
683 static void mxc_nand_enable_hwecc_v3(struct nand_chip *chip, bool enable) in mxc_nand_enable_hwecc_v3()
702 static int mxc_nand_dev_ready(struct nand_chip *chip) in mxc_nand_dev_ready()
711 static int mxc_nand_read_page_v1(struct nand_chip *chip, void *buf, void *oob, in mxc_nand_read_page_v1()
769 static int mxc_nand_read_page_v2_v3(struct nand_chip *chip, void *buf, in mxc_nand_read_page_v2_v3()
817 static int mxc_nand_read_page(struct nand_chip *chip, uint8_t *buf, in mxc_nand_read_page()
831 static int mxc_nand_read_page_raw(struct nand_chip *chip, uint8_t *buf, in mxc_nand_read_page_raw()
845 static int mxc_nand_read_oob(struct nand_chip *chip, int page) in mxc_nand_read_oob()
853 static int mxc_nand_write_page(struct nand_chip *chip, const uint8_t *buf, in mxc_nand_write_page()
874 static int mxc_nand_write_page_ecc(struct nand_chip *chip, const uint8_t *buf, in mxc_nand_write_page_ecc()
880 static int mxc_nand_write_page_raw(struct nand_chip *chip, const uint8_t *buf, in mxc_nand_write_page_raw()
886 static int mxc_nand_write_oob(struct nand_chip *chip, int page) in mxc_nand_write_oob()
896 static u_char mxc_nand_read_byte(struct nand_chip *nand_chip) in mxc_nand_read_byte() argument
898 struct mxc_nand_host *host = nand_get_controller_data(nand_chip); in mxc_nand_read_byte()
905 if (nand_chip->options & NAND_BUSWIDTH_16) { in mxc_nand_read_byte()
922 static void mxc_nand_write_buf(struct nand_chip *nand_chip, const u_char *buf, in mxc_nand_write_buf() argument
925 struct mtd_info *mtd = nand_to_mtd(nand_chip); in mxc_nand_write_buf()
926 struct mxc_nand_host *host = nand_get_controller_data(nand_chip); in mxc_nand_write_buf()
941 static void mxc_nand_read_buf(struct nand_chip *nand_chip, u_char *buf, in mxc_nand_read_buf() argument
944 struct mtd_info *mtd = nand_to_mtd(nand_chip); in mxc_nand_read_buf()
945 struct mxc_nand_host *host = nand_get_controller_data(nand_chip); in mxc_nand_read_buf()
958 static void mxc_nand_select_chip_v1_v3(struct nand_chip *nand_chip, int chip) in mxc_nand_select_chip_v1_v3() argument
960 struct mxc_nand_host *host = nand_get_controller_data(nand_chip); in mxc_nand_select_chip_v1_v3()
978 static void mxc_nand_select_chip_v2(struct nand_chip *nand_chip, int chip) in mxc_nand_select_chip_v2() argument
980 struct mxc_nand_host *host = nand_get_controller_data(nand_chip); in mxc_nand_select_chip_v2()
1006 struct nand_chip *nand_chip = mtd_to_nand(mtd); in mxc_v1_ooblayout_ecc() local
1008 if (section >= nand_chip->ecc.steps) in mxc_v1_ooblayout_ecc()
1020 struct nand_chip *nand_chip = mtd_to_nand(mtd); in mxc_v1_ooblayout_free() local
1022 if (section > nand_chip->ecc.steps) in mxc_v1_ooblayout_free()
1035 if (section < nand_chip->ecc.steps) in mxc_v1_ooblayout_free()
1053 struct nand_chip *nand_chip = mtd_to_nand(mtd); in mxc_v2_ooblayout_ecc() local
1054 int stepsize = nand_chip->ecc.bytes == 9 ? 16 : 26; in mxc_v2_ooblayout_ecc()
1056 if (section >= nand_chip->ecc.steps) in mxc_v2_ooblayout_ecc()
1060 oobregion->length = nand_chip->ecc.bytes; in mxc_v2_ooblayout_ecc()
1068 struct nand_chip *nand_chip = mtd_to_nand(mtd); in mxc_v2_ooblayout_free() local
1069 int stepsize = nand_chip->ecc.bytes == 9 ? 16 : 26; in mxc_v2_ooblayout_free()
1071 if (section >= nand_chip->ecc.steps) in mxc_v2_ooblayout_free()
1114 struct nand_chip *nand_chip = mtd_to_nand(mtd); in preset_v1() local
1115 struct mxc_nand_host *host = nand_get_controller_data(nand_chip); in preset_v1()
1118 if (nand_chip->ecc.engine_type == NAND_ECC_ENGINE_TYPE_ON_HOST && in preset_v1()
1141 static int mxc_nand_v2_setup_interface(struct nand_chip *chip, int csline, in mxc_nand_v2_setup_interface()
1217 struct nand_chip *nand_chip = mtd_to_nand(mtd); in preset_v2() local
1218 struct mxc_nand_host *host = nand_get_controller_data(nand_chip); in preset_v2()
1229 if (nand_chip->ecc.engine_type == NAND_ECC_ENGINE_TYPE_ON_HOST) in preset_v2()
1266 struct nand_chip *chip = mtd_to_nand(mtd); in preset_v3()
1334 static void mxc_nand_command(struct nand_chip *nand_chip, unsigned command, in mxc_nand_command() argument
1337 struct mtd_info *mtd = nand_to_mtd(nand_chip); in mxc_nand_command()
1338 struct mxc_nand_host *host = nand_get_controller_data(nand_chip); in mxc_nand_command()
1394 static int mxc_nand_set_features(struct nand_chip *chip, int addr, in mxc_nand_set_features()
1414 static int mxc_nand_get_features(struct nand_chip *chip, int addr, in mxc_nand_get_features()
1622 static int mxcnd_attach_chip(struct nand_chip *chip) in mxcnd_attach_chip()
1691 static int mxcnd_setup_interface(struct nand_chip *chip, int chipnr, in mxcnd_setup_interface()
1706 struct nand_chip *this; in mxcnd_probe()
1837 struct nand_chip *chip = &host->nand; in mxcnd_remove()