/openbmc/linux/drivers/mtd/nand/raw/bcm47xxnflash/ |
H A D | ops_bcm4706.c | 88 struct nand_chip *nand_chip = mtd_to_nand(mtd); in bcm47xxnflash_ops_bcm4706_read() local 89 struct bcm47xxnflash *b47n = nand_get_controller_data(nand_chip); in bcm47xxnflash_ops_bcm4706_read() 96 BUG_ON(b47n->curr_page_addr & ~nand_chip->pagemask); in bcm47xxnflash_ops_bcm4706_read() 138 struct nand_chip *nand_chip = mtd_to_nand(mtd); in bcm47xxnflash_ops_bcm4706_write() local 139 struct bcm47xxnflash *b47n = nand_get_controller_data(nand_chip); in bcm47xxnflash_ops_bcm4706_write() 146 BUG_ON(b47n->curr_page_addr & ~nand_chip->pagemask); in bcm47xxnflash_ops_bcm4706_write() 169 static void bcm47xxnflash_ops_bcm4706_cmd_ctrl(struct nand_chip *nand_chip, in bcm47xxnflash_ops_bcm4706_cmd_ctrl() argument 172 struct bcm47xxnflash *b47n = nand_get_controller_data(nand_chip); in bcm47xxnflash_ops_bcm4706_cmd_ctrl() 189 static void bcm47xxnflash_ops_bcm4706_select_chip(struct nand_chip *chip, in bcm47xxnflash_ops_bcm4706_select_chip() 195 static int bcm47xxnflash_ops_bcm4706_dev_ready(struct nand_chip *nand_chip) in bcm47xxnflash_ops_bcm4706_dev_ready() argument [all …]
|
/openbmc/linux/drivers/mtd/nand/raw/ |
H A D | internals.h | 48 void (*detect)(struct nand_chip *chip); 49 int (*init)(struct nand_chip *chip); 50 void (*cleanup)(struct nand_chip *chip); 51 void (*fixup_onfi_param_page)(struct nand_chip *chip, 84 int nand_bbm_get_next_page(struct nand_chip *chip, int page); 85 int nand_markbad_bbm(struct nand_chip *chip, loff_t ofs); 86 int nand_erase_nand(struct nand_chip *chip, struct erase_info *instr, 88 void onfi_fill_interface_config(struct nand_chip *chip, 96 int nand_choose_best_sdr_timings(struct nand_chip *chip, 99 int nand_choose_best_nvddr_timings(struct nand_chip *chip, [all …]
|
H A D | socrates_nand.c | 27 struct nand_chip nand_chip; member 38 static void socrates_nand_write_buf(struct nand_chip *this, const uint8_t *buf, in socrates_nand_write_buf() 57 static void socrates_nand_read_buf(struct nand_chip *this, uint8_t *buf, in socrates_nand_read_buf() 77 static uint8_t socrates_nand_read_byte(struct nand_chip *this) in socrates_nand_read_byte() 87 static void socrates_nand_cmd_ctrl(struct nand_chip *nand_chip, int cmd, in socrates_nand_cmd_ctrl() argument 90 struct socrates_nand_host *host = nand_get_controller_data(nand_chip); in socrates_nand_cmd_ctrl() 112 static int socrates_nand_device_ready(struct nand_chip *nand_chip) in socrates_nand_device_ready() argument 114 struct socrates_nand_host *host = nand_get_controller_data(nand_chip); in socrates_nand_device_ready() 121 static int socrates_attach_chip(struct nand_chip *chip) in socrates_attach_chip() 141 struct nand_chip *nand_chip; in socrates_nand_probe() local [all …]
|
H A D | lpc32xx_mlc.c | 132 struct nand_chip *nand_chip = mtd_to_nand(mtd); in lpc32xx_ooblayout_ecc() local 134 if (section >= nand_chip->ecc.steps) in lpc32xx_ooblayout_ecc() 137 oobregion->offset = ((section + 1) * 16) - nand_chip->ecc.bytes; in lpc32xx_ooblayout_ecc() 138 oobregion->length = nand_chip->ecc.bytes; in lpc32xx_ooblayout_ecc() 146 struct nand_chip *nand_chip = mtd_to_nand(mtd); in lpc32xx_ooblayout_free() local 148 if (section >= nand_chip->ecc.steps) in lpc32xx_ooblayout_free() 152 oobregion->length = 16 - nand_chip->ecc.bytes; in lpc32xx_ooblayout_free() 176 struct nand_chip nand_chip; member 278 static void lpc32xx_nand_cmd_ctrl(struct nand_chip *nand_chip, int cmd, in lpc32xx_nand_cmd_ctrl() argument 281 struct lpc32xx_nand_host *host = nand_get_controller_data(nand_chip); in lpc32xx_nand_cmd_ctrl() [all …]
|
H A D | mxc_nand.c | 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 [all …]
|
H A D | nand_legacy.c | 28 static uint8_t nand_read_byte(struct nand_chip *chip) in nand_read_byte() 40 static uint8_t nand_read_byte16(struct nand_chip *chip) in nand_read_byte16() 52 static void nand_select_chip(struct nand_chip *chip, int chipnr) in nand_select_chip() 74 static void nand_write_byte(struct nand_chip *chip, uint8_t byte) in nand_write_byte() 86 static void nand_write_byte16(struct nand_chip *chip, uint8_t byte) in nand_write_byte16() 117 static void nand_write_buf(struct nand_chip *chip, const uint8_t *buf, int len) in nand_write_buf() 130 static void nand_read_buf(struct nand_chip *chip, uint8_t *buf, int len) in nand_read_buf() 143 static void nand_write_buf16(struct nand_chip *chip, const uint8_t *buf, in nand_write_buf16() 159 static void nand_read_buf16(struct nand_chip *chip, uint8_t *buf, int len) in nand_read_buf16() 174 static void panic_nand_wait_ready(struct nand_chip *chip, unsigned long timeo) in panic_nand_wait_ready() [all …]
|
H A D | nand_toshiba.c | 29 static int toshiba_nand_benand_read_eccstatus_op(struct nand_chip *chip, in toshiba_nand_benand_read_eccstatus_op() 50 static int toshiba_nand_benand_eccstatus(struct nand_chip *chip) in toshiba_nand_benand_eccstatus() 96 toshiba_nand_read_page_benand(struct nand_chip *chip, uint8_t *buf, in toshiba_nand_read_page_benand() 109 toshiba_nand_read_subpage_benand(struct nand_chip *chip, uint32_t data_offs, in toshiba_nand_read_subpage_benand() 122 static void toshiba_nand_benand_init(struct nand_chip *chip) in toshiba_nand_benand_init() 146 static void toshiba_nand_decode_id(struct nand_chip *chip) in toshiba_nand_decode_id() 202 tc58teg5dclta00_choose_interface_config(struct nand_chip *chip, in tc58teg5dclta00_choose_interface_config() 211 tc58nvg0s3e_choose_interface_config(struct nand_chip *chip, in tc58nvg0s3e_choose_interface_config() 220 th58nvg2s3hbai4_choose_interface_config(struct nand_chip *chip, in th58nvg2s3hbai4_choose_interface_config() 246 static int tc58teg5dclta00_init(struct nand_chip *chip) in tc58teg5dclta00_init() [all …]
|
H A D | nand_macronix.c | 50 static int macronix_nand_setup_read_retry(struct nand_chip *chip, int mode) in macronix_nand_setup_read_retry() 63 static int macronix_nand_randomizer_check_enable(struct nand_chip *chip) in macronix_nand_randomizer_check_enable() 102 static void macronix_nand_onfi_init(struct nand_chip *chip) in macronix_nand_onfi_init() 158 static void macronix_nand_fix_broken_get_timings(struct nand_chip *chip) in macronix_nand_fix_broken_get_timings() 198 static int mxic_nand_lock(struct nand_chip *chip, loff_t ofs, uint64_t len) in mxic_nand_lock() 214 static int mxic_nand_unlock(struct nand_chip *chip, loff_t ofs, uint64_t len) in mxic_nand_unlock() 230 static void macronix_nand_block_protection_support(struct nand_chip *chip) in macronix_nand_block_protection_support() 259 static int nand_power_down_op(struct nand_chip *chip) in nand_power_down_op() 281 static int mxic_nand_suspend(struct nand_chip *chip) in mxic_nand_suspend() 294 static void mxic_nand_resume(struct nand_chip *chip) in mxic_nand_resume() [all …]
|
H A D | xway_nand.c | 67 struct nand_chip chip; 74 struct nand_chip *chip = mtd_to_nand(mtd); in xway_readb() 82 struct nand_chip *chip = mtd_to_nand(mtd); in xway_writeb() 88 static void xway_select_chip(struct nand_chip *chip, int select) in xway_select_chip() 108 static void xway_cmd_ctrl(struct nand_chip *chip, int cmd, unsigned int ctrl) in xway_cmd_ctrl() 124 static int xway_dev_ready(struct nand_chip *chip) in xway_dev_ready() 129 static unsigned char xway_read_byte(struct nand_chip *chip) in xway_read_byte() 134 static void xway_read_buf(struct nand_chip *chip, u_char *buf, int len) in xway_read_buf() 142 static void xway_write_buf(struct nand_chip *chip, const u_char *buf, int len) in xway_write_buf() 150 static int xway_attach_chip(struct nand_chip *chip) in xway_attach_chip() [all …]
|
H A D | sharpsl.c | 22 struct nand_chip chip; 57 static void sharpsl_nand_hwcontrol(struct nand_chip *chip, int cmd, in sharpsl_nand_hwcontrol() 76 static int sharpsl_nand_dev_ready(struct nand_chip *chip) in sharpsl_nand_dev_ready() 82 static void sharpsl_nand_enable_hwecc(struct nand_chip *chip, int mode) in sharpsl_nand_enable_hwecc() 88 static int sharpsl_nand_calculate_ecc(struct nand_chip *chip, in sharpsl_nand_calculate_ecc() 98 static int sharpsl_attach_chip(struct nand_chip *chip) in sharpsl_attach_chip() 122 struct nand_chip *this; in sharpsl_nand_probe() 155 this = (struct nand_chip *)(&sharpsl->chip); in sharpsl_nand_probe() 216 struct nand_chip *chip = &sharpsl->chip; in sharpsl_nand_remove()
|
H A D | au1550nd.c | 21 struct nand_chip chip; 27 static struct au1550nd_ctx *chip_to_au_ctx(struct nand_chip *this) in chip_to_au_ctx() 40 static void au_write_buf(struct nand_chip *this, const void *buf, in au_write_buf() 61 static void au_read_buf(struct nand_chip *this, void *buf, in au_read_buf() 82 static void au_write_buf16(struct nand_chip *this, const void *buf, in au_write_buf16() 104 static void au_read_buf16(struct nand_chip *this, void *buf, unsigned int len) in au_read_buf16() 138 static int au1550nd_waitrdy(struct nand_chip *this, unsigned int timeout_ms) in au1550nd_waitrdy() 153 static int au1550nd_exec_instr(struct nand_chip *this, in au1550nd_exec_instr() 210 static int au1550nd_exec_op(struct nand_chip *this, in au1550nd_exec_op() 240 static int au1550nd_attach_chip(struct nand_chip *chip) in au1550nd_attach_chip() [all …]
|
H A D | mpc5121_nfc.c | 108 struct nand_chip chip; 124 struct nand_chip *chip = mtd_to_nand(mtd); in nfc_read() 133 struct nand_chip *chip = mtd_to_nand(mtd); in nfc_write() 203 struct nand_chip *chip = mtd_to_nand(mtd); in mpc5121_nfc_irq() 215 struct nand_chip *chip = mtd_to_nand(mtd); in mpc5121_nfc_done() 235 struct nand_chip *chip = mtd_to_nand(mtd); in mpc5121_nfc_addr_cycle() 254 static void mpc5121_nfc_select_chip(struct nand_chip *nand, int chip) in mpc5121_nfc_select_chip() 272 struct nand_chip *chip = mtd_to_nand(mtd); in ads5121_chipselect_init() 292 static void ads5121_select_chip(struct nand_chip *nand, int chip) in ads5121_select_chip() 310 static int mpc5121_nfc_dev_ready(struct nand_chip *nand) in mpc5121_nfc_dev_ready() [all …]
|
H A D | nand_hynix.c | 60 static bool hynix_nand_has_valid_jedecid(struct nand_chip *chip) in hynix_nand_has_valid_jedecid() 72 static int hynix_nand_cmd_op(struct nand_chip *chip, u8 cmd) in hynix_nand_cmd_op() 88 static int hynix_nand_reg_write_op(struct nand_chip *chip, u8 addr, u8 val) in hynix_nand_reg_write_op() 108 static int hynix_nand_setup_read_retry(struct nand_chip *chip, int retry_mode) in hynix_nand_setup_read_retry() 191 static int hynix_read_rr_otp(struct nand_chip *chip, in hynix_read_rr_otp() 287 static int hynix_mlc_1xnm_rr_init(struct nand_chip *chip, in hynix_mlc_1xnm_rr_init() 372 static int hynix_nand_rr_init(struct nand_chip *chip) in hynix_nand_rr_init() 408 static void hynix_nand_extract_oobsize(struct nand_chip *chip, in hynix_nand_extract_oobsize() 495 static void hynix_nand_extract_ecc_requirements(struct nand_chip *chip, in hynix_nand_extract_ecc_requirements() 584 static void hynix_nand_extract_scrambling_requirements(struct nand_chip *chip, in hynix_nand_extract_scrambling_requirements() [all …]
|
H A D | nand_base.c | 100 static int check_offs_len(struct nand_chip *chip, loff_t ofs, uint64_t len) in check_offs_len() 172 void nand_select_target(struct nand_chip *chip, unsigned int cs) in nand_select_target() 195 void nand_deselect_target(struct nand_chip *chip) in nand_deselect_target() 210 static void nand_release_device(struct nand_chip *chip) in nand_release_device() 226 int nand_bbm_get_next_page(struct nand_chip *chip, int page) in nand_bbm_get_next_page() 253 static int nand_block_bad(struct nand_chip *chip, loff_t ofs) in nand_block_bad() 292 static bool nand_region_is_secured(struct nand_chip *chip, loff_t offset, u64 size) in nand_region_is_secured() 313 static int nand_isbad_bbm(struct nand_chip *chip, loff_t ofs) in nand_isbad_bbm() 339 static void nand_get_device(struct nand_chip *chip) in nand_get_device() 361 static int nand_check_wp(struct nand_chip *chip) in nand_check_wp() [all …]
|
H A D | ndfc.c | 35 struct nand_chip chip; 42 static void ndfc_select_chip(struct nand_chip *nchip, int chip) in ndfc_select_chip() 56 static void ndfc_hwcontrol(struct nand_chip *chip, int cmd, unsigned int ctrl) in ndfc_hwcontrol() 69 static int ndfc_ready(struct nand_chip *chip) in ndfc_ready() 76 static void ndfc_enable_hwecc(struct nand_chip *chip, int mode) in ndfc_enable_hwecc() 87 static int ndfc_calculate_ecc(struct nand_chip *chip, in ndfc_calculate_ecc() 111 static void ndfc_read_buf(struct nand_chip *chip, uint8_t *buf, int len) in ndfc_read_buf() 120 static void ndfc_write_buf(struct nand_chip *chip, const uint8_t *buf, int len) in ndfc_write_buf() 136 struct nand_chip *chip = &ndfc->chip; in ndfc_chip_init() 247 struct nand_chip *chip = &ndfc->chip; in ndfc_remove()
|
/openbmc/linux/include/linux/mtd/ |
H A D | rawnand.h | 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, [all …]
|
H A D | platnand.h | 56 int (*dev_ready)(struct nand_chip *chip); 57 void (*select_chip)(struct nand_chip *chip, int cs); 58 void (*cmd_ctrl)(struct nand_chip *chip, int dat, unsigned int ctrl); 59 void (*write_buf)(struct nand_chip *chip, const uint8_t *buf, int len); 60 void (*read_buf)(struct nand_chip *chip, uint8_t *buf, int len);
|
/openbmc/u-boot/drivers/mtd/nand/raw/ |
H A D | zynq_nand.c | 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() [all …]
|
H A D | mxs_nand_spl.c | 12 static struct nand_chip nand_chip; variable 17 register struct nand_chip *chip = mtd_to_nand(mtd); in mxs_nand_command() 58 struct nand_chip *chip = mtd_to_nand(mtd); in mxs_flash_full_ident() 76 register struct nand_chip *chip = mtd_to_nand(mtd); in mxs_flash_onfi_ident() 149 register struct nand_chip *chip = mtd_to_nand(mtd); in mxs_read_page_ecc() 153 ret = nand_chip.ecc.read_page(mtd, chip, buf, 1, page); in mxs_read_page_ecc() 163 register struct nand_chip *chip = mtd_to_nand(mtd); in is_badblock() 180 if (nand_chip.numchips) in nand_init() 184 mxs_nand_init_spl(&nand_chip); in nand_init() 185 mtd = nand_to_mtd(&nand_chip); in nand_init() [all …]
|
H A D | nand_spl_simple.c | 14 static struct nand_chip nand_chip; variable 28 struct nand_chip *this = mtd_to_nand(mtd); in nand_command() 65 struct nand_chip *this = mtd_to_nand(mtd); in nand_command() 116 struct nand_chip *this = mtd_to_nand(mtd); in nand_is_bad_block() 141 struct nand_chip *this = mtd_to_nand(mtd); in nand_read_page() 172 struct nand_chip *this = mtd_to_nand(mtd); in nand_read_page() 217 mtd = nand_to_mtd(&nand_chip); in nand_init() 218 nand_chip.IO_ADDR_R = nand_chip.IO_ADDR_W = in nand_init() 220 board_nand_init(&nand_chip); in nand_init() 223 if (nand_chip.ecc.mode == NAND_ECC_SOFT) { in nand_init() [all …]
|
H A D | am335x_spl_bch.c | 19 static struct nand_chip nand_chip; variable 32 struct nand_chip *this = mtd_to_nand(mtd); in nand_command() 130 struct nand_chip *this = mtd_to_nand(mtd); in nand_is_bad_block() 151 struct nand_chip *this = mtd_to_nand(mtd); in nand_read_page() 206 mtd = nand_to_mtd(&nand_chip); in nand_init() 207 nand_chip.IO_ADDR_R = nand_chip.IO_ADDR_W = in nand_init() 209 board_nand_init(&nand_chip); in nand_init() 211 if (nand_chip.select_chip) in nand_init() 212 nand_chip.select_chip(mtd, 0); in nand_init() 221 if (nand_chip.select_chip) in nand_deselect() [all …]
|
H A D | arasan_nfc.c | 262 static struct nand_chip nand_chip[CONFIG_SYS_MAX_NAND_DEVICE]; variable 291 struct nand_chip *chip = mtd_to_nand(mtd); in arasan_nand_get_addrcycle() 325 struct nand_chip *chip = mtd_to_nand(mtd); in arasan_nand_read_page() 446 struct nand_chip *chip, u8 *buf, int oob_required, int page) in arasan_nand_read_page_hwecc() 499 struct nand_chip *chip, const u8 *buf, int oob_required, in arasan_nand_write_page_hwecc() 602 static int arasan_nand_read_oob(struct mtd_info *mtd, struct nand_chip *chip, in arasan_nand_read_oob() 611 static int arasan_nand_write_oob(struct mtd_info *mtd, struct nand_chip *chip, in arasan_nand_write_oob() 1003 struct nand_chip *chip = mtd_to_nand(mtd); in arasan_nand_read_byte() 1035 struct nand_chip *chip = mtd_to_nand(mtd); in arasan_nand_cmd_function() 1090 struct nand_chip *nand_chip = mtd_to_nand(mtd); in arasan_check_ondie() local [all …]
|
H A D | atmel_nand.c | 162 struct nand_chip *nand_chip = mtd_to_nand(mtd); in pmecc_gen_syndrome() local 163 struct atmel_nand_host *host = nand_get_controller_data(nand_chip); in pmecc_gen_syndrome() 179 struct nand_chip *nand_chip = mtd_to_nand(mtd); in pmecc_substitute() local 180 struct atmel_nand_host *host = nand_get_controller_data(nand_chip); in pmecc_substitute() 229 struct nand_chip *nand_chip = mtd_to_nand(mtd); in pmecc_get_sigma() local 230 struct atmel_nand_host *host = nand_get_controller_data(nand_chip); in pmecc_get_sigma() 385 struct nand_chip *nand_chip = mtd_to_nand(mtd); in pmecc_err_location() local 386 struct atmel_nand_host *host = nand_get_controller_data(nand_chip); in pmecc_err_location() 439 struct nand_chip *nand_chip = mtd_to_nand(mtd); in pmecc_correct_data() local 440 struct atmel_nand_host *host = nand_get_controller_data(nand_chip); in pmecc_correct_data() [all …]
|
H A D | mxc_nand.c | 21 struct nand_chip *nand; 352 struct nand_chip *nand_chip = mtd_to_nand(mtd); local 353 struct mxc_nand_host *host = nand_get_controller_data(nand_chip); 384 struct nand_chip *chip, 436 struct nand_chip *chip, 481 struct nand_chip *chip, 548 struct nand_chip *chip, int page) 574 struct nand_chip *chip, 614 struct nand_chip *chip, 661 struct nand_chip *nand_chip = mtd_to_nand(mtd); local [all …]
|
/openbmc/u-boot/include/linux/mtd/ |
H A D | rawnand.h | 25 struct nand_chip; 31 struct nand_chip *chip, 498 struct nand_chip *active; 609 int (*read_page_raw)(struct mtd_info *mtd, struct nand_chip *chip, 611 int (*write_page_raw)(struct mtd_info *mtd, struct nand_chip *chip, 613 int (*read_page)(struct mtd_info *mtd, struct nand_chip *chip, 615 int (*read_subpage)(struct mtd_info *mtd, struct nand_chip *chip, 617 int (*write_subpage)(struct mtd_info *mtd, struct nand_chip *chip, 620 int (*write_page)(struct mtd_info *mtd, struct nand_chip *chip, 622 int (*write_oob_raw)(struct mtd_info *mtd, struct nand_chip *chip, [all …]
|