Lines Matching refs:nand_chip
26 struct nand_chip;
363 void (*hwctl)(struct nand_chip *chip, int mode);
364 int (*calculate)(struct nand_chip *chip, const uint8_t *dat,
366 int (*correct)(struct nand_chip *chip, uint8_t *dat, uint8_t *read_ecc,
368 int (*read_page_raw)(struct nand_chip *chip, uint8_t *buf,
370 int (*write_page_raw)(struct nand_chip *chip, const uint8_t *buf,
372 int (*read_page)(struct nand_chip *chip, uint8_t *buf,
374 int (*read_subpage)(struct nand_chip *chip, uint32_t offs,
376 int (*write_subpage)(struct nand_chip *chip, uint32_t offset,
379 int (*write_page)(struct nand_chip *chip, const uint8_t *buf,
381 int (*write_oob_raw)(struct nand_chip *chip, int page);
382 int (*read_oob_raw)(struct nand_chip *chip, int page);
383 int (*read_oob)(struct nand_chip *chip, int page);
384 int (*write_oob)(struct nand_chip *chip, int page);
966 int (*exec)(struct nand_chip *chip, const struct nand_subop *subop);
1024 int nand_op_parser_exec_op(struct nand_chip *chip,
1087 int (*attach_chip)(struct nand_chip *chip);
1088 void (*detach_chip)(struct nand_chip *chip);
1089 int (*exec_op)(struct nand_chip *chip,
1092 int (*setup_interface)(struct nand_chip *chip, int chipnr,
1153 void (*select_chip)(struct nand_chip *chip, int cs);
1154 u8 (*read_byte)(struct nand_chip *chip);
1155 void (*write_byte)(struct nand_chip *chip, u8 byte);
1156 void (*write_buf)(struct nand_chip *chip, const u8 *buf, int len);
1157 void (*read_buf)(struct nand_chip *chip, u8 *buf, int len);
1158 void (*cmd_ctrl)(struct nand_chip *chip, int dat, unsigned int ctrl);
1159 void (*cmdfunc)(struct nand_chip *chip, unsigned command, int column,
1161 int (*dev_ready)(struct nand_chip *chip);
1162 int (*waitfunc)(struct nand_chip *chip);
1163 int (*block_bad)(struct nand_chip *chip, loff_t ofs);
1164 int (*block_markbad)(struct nand_chip *chip, loff_t ofs);
1165 int (*set_features)(struct nand_chip *chip, int feature_addr,
1167 int (*get_features)(struct nand_chip *chip, int feature_addr,
1183 int (*suspend)(struct nand_chip *chip);
1184 void (*resume)(struct nand_chip *chip);
1185 int (*lock_area)(struct nand_chip *chip, loff_t ofs, uint64_t len);
1186 int (*unlock_area)(struct nand_chip *chip, loff_t ofs, uint64_t len);
1187 int (*setup_read_retry)(struct nand_chip *chip, int retry_mode);
1188 int (*choose_interface_config)(struct nand_chip *chip,
1274 struct nand_chip { struct
1333 static inline struct nand_chip *mtd_to_nand(struct mtd_info *mtd) in mtd_to_nand() argument
1335 return container_of(mtd, struct nand_chip, base.mtd); in mtd_to_nand()
1338 static inline struct mtd_info *nand_to_mtd(struct nand_chip *chip) in nand_to_mtd()
1343 static inline void *nand_get_controller_data(struct nand_chip *chip) in nand_get_controller_data()
1348 static inline void nand_set_controller_data(struct nand_chip *chip, void *priv) in nand_set_controller_data()
1353 static inline void nand_set_manufacturer_data(struct nand_chip *chip, in nand_set_manufacturer_data()
1359 static inline void *nand_get_manufacturer_data(struct nand_chip *chip) in nand_get_manufacturer_data()
1364 static inline void nand_set_flash_node(struct nand_chip *chip, in nand_set_flash_node()
1370 static inline struct device_node *nand_get_flash_node(struct nand_chip *chip) in nand_get_flash_node()
1381 nand_get_interface_config(struct nand_chip *chip) in nand_get_interface_config()
1460 int nand_create_bbt(struct nand_chip *chip);
1467 static inline bool nand_is_slc(struct nand_chip *chip) in nand_is_slc()
1493 int rawnand_sw_hamming_init(struct nand_chip *chip);
1494 int rawnand_sw_hamming_calculate(struct nand_chip *chip,
1497 int rawnand_sw_hamming_correct(struct nand_chip *chip,
1501 void rawnand_sw_hamming_cleanup(struct nand_chip *chip);
1502 int rawnand_sw_bch_init(struct nand_chip *chip);
1503 int rawnand_sw_bch_correct(struct nand_chip *chip, unsigned char *buf,
1505 void rawnand_sw_bch_cleanup(struct nand_chip *chip);
1512 int nand_ecc_choose_conf(struct nand_chip *chip,
1516 int nand_write_oob_std(struct nand_chip *chip, int page);
1519 int nand_read_oob_std(struct nand_chip *chip, int page);
1522 int nand_get_set_features_notsupp(struct nand_chip *chip, int addr,
1526 int nand_read_page_raw(struct nand_chip *chip, uint8_t *buf, int oob_required,
1528 int nand_monolithic_read_page_raw(struct nand_chip *chip, uint8_t *buf,
1532 int nand_write_page_raw(struct nand_chip *chip, const uint8_t *buf,
1534 int nand_monolithic_write_page_raw(struct nand_chip *chip, const uint8_t *buf,
1538 int nand_reset(struct nand_chip *chip, int chipnr);
1541 int nand_reset_op(struct nand_chip *chip);
1542 int nand_readid_op(struct nand_chip *chip, u8 addr, void *buf,
1544 int nand_status_op(struct nand_chip *chip, u8 *status);
1545 int nand_exit_status_op(struct nand_chip *chip);
1546 int nand_erase_op(struct nand_chip *chip, unsigned int eraseblock);
1547 int nand_read_page_op(struct nand_chip *chip, unsigned int page,
1549 int nand_change_read_column_op(struct nand_chip *chip,
1552 int nand_read_oob_op(struct nand_chip *chip, unsigned int page,
1554 int nand_prog_page_begin_op(struct nand_chip *chip, unsigned int page,
1557 int nand_prog_page_end_op(struct nand_chip *chip);
1558 int nand_prog_page_op(struct nand_chip *chip, unsigned int page,
1561 int nand_change_write_column_op(struct nand_chip *chip,
1564 int nand_read_data_op(struct nand_chip *chip, void *buf, unsigned int len,
1566 int nand_write_data_op(struct nand_chip *chip, const void *buf,
1568 int nand_read_page_hwecc_oob_first(struct nand_chip *chip, uint8_t *buf,
1572 int nand_scan_with_ids(struct nand_chip *chip, unsigned int max_chips,
1575 static inline int nand_scan(struct nand_chip *chip, unsigned int max_chips) in nand_scan()
1581 void nand_wait_ready(struct nand_chip *chip);
1587 void nand_cleanup(struct nand_chip *chip);
1593 int nand_soft_waitrdy(struct nand_chip *chip, unsigned long timeout_ms);
1594 int nand_gpio_waitrdy(struct nand_chip *chip, struct gpio_desc *gpiod,
1598 void nand_select_target(struct nand_chip *chip, unsigned int cs);
1599 void nand_deselect_target(struct nand_chip *chip);
1619 static inline void *nand_get_data_buf(struct nand_chip *chip) in nand_get_data_buf()