/Linux-v4.19/include/linux/mtd/ |
D | mtd.h | 35 struct mtd_info; 114 int (*ecc)(struct mtd_info *mtd, int section, 116 int (*free)(struct mtd_info *mtd, int section, 190 int (*get_info)(struct mtd_info *mtd, int wunit, 192 int (*get_wunit)(struct mtd_info *mtd, 207 struct mtd_info { struct 285 int (*_erase) (struct mtd_info *mtd, struct erase_info *instr); argument 286 int (*_point) (struct mtd_info *mtd, loff_t from, size_t len, argument 288 int (*_unpoint) (struct mtd_info *mtd, loff_t from, size_t len); argument 289 int (*_read) (struct mtd_info *mtd, loff_t from, size_t len, argument [all …]
|
D | onenand.h | 25 extern int onenand_scan(struct mtd_info *mtd, int max_chips); 27 extern void onenand_release(struct mtd_info *mtd); 106 int (*command)(struct mtd_info *mtd, int cmd, loff_t address, size_t len); 107 int (*wait)(struct mtd_info *mtd, int state); 108 int (*bbt_wait)(struct mtd_info *mtd, int state); 109 void (*unlock_all)(struct mtd_info *mtd); 110 int (*read_bufferram)(struct mtd_info *mtd, int area, 112 int (*write_bufferram)(struct mtd_info *mtd, int area, 116 void (*mmcontrol)(struct mtd_info *mtd, int sync_read); 117 int (*chip_probe)(struct mtd_info *mtd); [all …]
|
D | rawnand.h | 30 int nand_scan_with_ids(struct mtd_info *mtd, int max_chips, 33 static inline int nand_scan(struct mtd_info *mtd, int max_chips) in nand_scan() 39 void nand_wait_ready(struct mtd_info *mtd); 649 void (*hwctl)(struct mtd_info *mtd, int mode); 650 int (*calculate)(struct mtd_info *mtd, const uint8_t *dat, 652 int (*correct)(struct mtd_info *mtd, uint8_t *dat, uint8_t *read_ecc, 654 int (*read_page_raw)(struct mtd_info *mtd, struct nand_chip *chip, 656 int (*write_page_raw)(struct mtd_info *mtd, struct nand_chip *chip, 658 int (*read_page)(struct mtd_info *mtd, struct nand_chip *chip, 660 int (*read_subpage)(struct mtd_info *mtd, struct nand_chip *chip, [all …]
|
D | nand_bch.h | 14 struct mtd_info; 24 int nand_bch_calculate_ecc(struct mtd_info *mtd, const u_char *dat, 30 int nand_bch_correct_data(struct mtd_info *mtd, u_char *dat, u_char *read_ecc, 35 struct nand_bch_control *nand_bch_init(struct mtd_info *mtd); 46 nand_bch_calculate_ecc(struct mtd_info *mtd, const u_char *dat, in nand_bch_calculate_ecc() 53 nand_bch_correct_data(struct mtd_info *mtd, unsigned char *buf, in nand_bch_correct_data() 59 static inline struct nand_bch_control *nand_bch_init(struct mtd_info *mtd) in nand_bch_init()
|
D | partitions.h | 60 struct mtd_info; 81 int (*parse_fn)(struct mtd_info *, const struct mtd_partition **, 108 int mtd_is_partition(const struct mtd_info *mtd); 109 int mtd_add_partition(struct mtd_info *master, const char *name, 111 int mtd_del_partition(struct mtd_info *master, int partno); 112 uint64_t mtd_get_device_size(const struct mtd_info *mtd);
|
/Linux-v4.19/drivers/mtd/devices/ |
D | mtdram.c | 37 static struct mtd_info *mtd_info; variable 39 static int check_offs_len(struct mtd_info *mtd, loff_t ofs, uint64_t len) in check_offs_len() 58 static int ram_erase(struct mtd_info *mtd, struct erase_info *instr) in ram_erase() 67 static int ram_point(struct mtd_info *mtd, loff_t from, size_t len, in ram_point() 96 static int ram_unpoint(struct mtd_info *mtd, loff_t from, size_t len) in ram_unpoint() 101 static int ram_read(struct mtd_info *mtd, loff_t from, size_t len, in ram_read() 109 static int ram_write(struct mtd_info *mtd, loff_t to, size_t len, in ram_write() 119 if (mtd_info) { in cleanup_mtdram() 120 mtd_device_unregister(mtd_info); in cleanup_mtdram() 121 vfree(mtd_info->priv); in cleanup_mtdram() [all …]
|
D | slram.c | 60 struct mtd_info *mtdinfo; 75 static int slram_erase(struct mtd_info *, struct erase_info *); 76 static int slram_point(struct mtd_info *, loff_t, size_t, size_t *, void **, 78 static int slram_unpoint(struct mtd_info *, loff_t, size_t); 79 static int slram_read(struct mtd_info *, loff_t, size_t, size_t *, u_char *); 80 static int slram_write(struct mtd_info *, loff_t, size_t, size_t *, const u_char *); 82 static int slram_erase(struct mtd_info *mtd, struct erase_info *instr) in slram_erase() 91 static int slram_point(struct mtd_info *mtd, loff_t from, size_t len, in slram_point() 101 static int slram_unpoint(struct mtd_info *mtd, loff_t from, size_t len) in slram_unpoint() 106 static int slram_read(struct mtd_info *mtd, loff_t from, size_t len, in slram_read() [all …]
|
/Linux-v4.19/drivers/mtd/chips/ |
D | map_absent.c | 29 static int map_absent_read (struct mtd_info *, loff_t, size_t, size_t *, u_char *); 30 static int map_absent_write (struct mtd_info *, loff_t, size_t, size_t *, const u_char *); 31 static int map_absent_erase (struct mtd_info *, struct erase_info *); 32 static void map_absent_sync (struct mtd_info *); 33 static struct mtd_info *map_absent_probe(struct map_info *map); 34 static void map_absent_destroy (struct mtd_info *); 44 static struct mtd_info *map_absent_probe(struct map_info *map) in map_absent_probe() 46 struct mtd_info *mtd; in map_absent_probe() 71 static int map_absent_read(struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *b… in map_absent_read() 76 static int map_absent_write(struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_ch… in map_absent_write() [all …]
|
D | map_rom.c | 18 static int maprom_read (struct mtd_info *, loff_t, size_t, size_t *, u_char *); 19 static int maprom_write (struct mtd_info *, loff_t, size_t, size_t *, const u_char *); 20 static void maprom_nop (struct mtd_info *); 21 static struct mtd_info *map_rom_probe(struct map_info *map); 22 static int maprom_erase (struct mtd_info *mtd, struct erase_info *info); 23 static int maprom_point (struct mtd_info *mtd, loff_t from, size_t len, 25 static int maprom_unpoint(struct mtd_info *mtd, loff_t from, size_t len); 43 static struct mtd_info *map_rom_probe(struct map_info *map) in map_rom_probe() 45 struct mtd_info *mtd; in map_rom_probe() 72 static int maprom_point(struct mtd_info *mtd, loff_t from, size_t len, in maprom_point() [all …]
|
D | map_ram.c | 18 static int mapram_read (struct mtd_info *, loff_t, size_t, size_t *, u_char *); 19 static int mapram_write (struct mtd_info *, loff_t, size_t, size_t *, const u_char *); 20 static int mapram_erase (struct mtd_info *, struct erase_info *); 21 static void mapram_nop (struct mtd_info *); 22 static struct mtd_info *map_ram_probe(struct map_info *map); 23 static int mapram_point (struct mtd_info *mtd, loff_t from, size_t len, 25 static int mapram_unpoint(struct mtd_info *mtd, loff_t from, size_t len); 34 static struct mtd_info *map_ram_probe(struct map_info *map) in map_ram_probe() 36 struct mtd_info *mtd; in map_ram_probe() 86 static int mapram_point(struct mtd_info *mtd, loff_t from, size_t len, in mapram_point() [all …]
|
D | cfi_cmdset_0002.c | 52 static int cfi_amdstd_read (struct mtd_info *, loff_t, size_t, size_t *, u_char *); 53 static int cfi_amdstd_write_words(struct mtd_info *, loff_t, size_t, size_t *, const u_char *); 54 static int cfi_amdstd_write_buffers(struct mtd_info *, loff_t, size_t, size_t *, const u_char *); 55 static int cfi_amdstd_erase_chip(struct mtd_info *, struct erase_info *); 56 static int cfi_amdstd_erase_varsize(struct mtd_info *, struct erase_info *); 57 static void cfi_amdstd_sync (struct mtd_info *); 58 static int cfi_amdstd_suspend (struct mtd_info *); 59 static void cfi_amdstd_resume (struct mtd_info *); 61 static int cfi_amdstd_get_fact_prot_info(struct mtd_info *, size_t, 63 static int cfi_amdstd_get_user_prot_info(struct mtd_info *, size_t, [all …]
|
/Linux-v4.19/drivers/mtd/ |
D | mtdcore.c | 56 struct mtd_info *mtd = dev_get_drvdata(dev); in mtd_cls_suspend() 63 struct mtd_info *mtd = dev_get_drvdata(dev); in mtd_cls_resume() 89 struct mtd_info *__mtd_next_device(int i) in __mtd_next_device() 105 struct mtd_info *mtd = dev_get_drvdata(dev); in mtd_release() 115 struct mtd_info *mtd = dev_get_drvdata(dev); in mtd_type_show() 154 struct mtd_info *mtd = dev_get_drvdata(dev); in mtd_flags_show() 164 struct mtd_info *mtd = dev_get_drvdata(dev); in mtd_size_show() 175 struct mtd_info *mtd = dev_get_drvdata(dev); in mtd_erasesize_show() 185 struct mtd_info *mtd = dev_get_drvdata(dev); in mtd_writesize_show() 195 struct mtd_info *mtd = dev_get_drvdata(dev); in mtd_subpagesize_show() [all …]
|
D | mtdcore.h | 9 struct mtd_info *__mtd_next_device(int i); 10 int add_mtd_device(struct mtd_info *mtd); 11 int del_mtd_device(struct mtd_info *mtd); 12 int add_mtd_partitions(struct mtd_info *, const struct mtd_partition *, int); 13 int del_mtd_partitions(struct mtd_info *); 17 int parse_mtd_partitions(struct mtd_info *master, const char * const *types,
|
D | mtdconcat.c | 44 struct mtd_info mtd; 46 struct mtd_info **subdev; 54 ((sizeof(struct mtd_concat) + (num_subdev) * sizeof(struct mtd_info *))) 68 concat_read(struct mtd_info *mtd, loff_t from, size_t len, in concat_read() 76 struct mtd_info *subdev = concat->subdev[i]; in concat_read() 120 concat_write(struct mtd_info *mtd, loff_t to, size_t len, in concat_write() 128 struct mtd_info *subdev = concat->subdev[i]; in concat_write() 158 concat_writev(struct mtd_info *mtd, const struct kvec *vecs, in concat_writev() 186 struct mtd_info *subdev = concat->subdev[i]; in concat_writev() 233 concat_read_oob(struct mtd_info *mtd, loff_t from, struct mtd_oob_ops *ops) in concat_read_oob() [all …]
|
D | mtdpart.c | 49 struct mtd_info mtd; 50 struct mtd_info *parent; 59 static inline struct mtd_part *mtd_to_part(const struct mtd_info *mtd) in mtd_to_part() 70 static int part_read(struct mtd_info *mtd, loff_t from, size_t len, in part_read() 89 static int part_point(struct mtd_info *mtd, loff_t from, size_t len, in part_point() 98 static int part_unpoint(struct mtd_info *mtd, loff_t from, size_t len) in part_unpoint() 105 static int part_read_oob(struct mtd_info *mtd, loff_t from, in part_read_oob() 123 static int part_read_user_prot_reg(struct mtd_info *mtd, loff_t from, in part_read_user_prot_reg() 131 static int part_get_user_prot_info(struct mtd_info *mtd, size_t len, in part_get_user_prot_info() 139 static int part_read_fact_prot_reg(struct mtd_info *mtd, loff_t from, in part_read_fact_prot_reg() [all …]
|
/Linux-v4.19/drivers/mtd/nand/raw/ |
D | mpc5121_nfc.c | 131 static void mpc5121_nfc_done(struct mtd_info *mtd); 134 static inline u16 nfc_read(struct mtd_info *mtd, uint reg) in nfc_read() 143 static inline void nfc_write(struct mtd_info *mtd, uint reg, u16 val) in nfc_write() 152 static inline void nfc_set(struct mtd_info *mtd, uint reg, u16 bits) in nfc_set() 158 static inline void nfc_clear(struct mtd_info *mtd, uint reg, u16 bits) in nfc_clear() 164 static inline void mpc5121_nfc_send_addr(struct mtd_info *mtd, u16 addr) in mpc5121_nfc_send_addr() 172 static inline void mpc5121_nfc_send_cmd(struct mtd_info *mtd, u16 cmd) in mpc5121_nfc_send_cmd() 180 static inline void mpc5121_nfc_send_prog_page(struct mtd_info *mtd) in mpc5121_nfc_send_prog_page() 188 static inline void mpc5121_nfc_send_read_page(struct mtd_info *mtd) in mpc5121_nfc_send_read_page() 196 static inline void mpc5121_nfc_send_read_id(struct mtd_info *mtd) in mpc5121_nfc_send_read_id() [all …]
|
D | au1550nd.c | 27 void (*write_byte)(struct mtd_info *, u_char); 36 static u_char au_read_byte(struct mtd_info *mtd) in au_read_byte() 51 static void au_write_byte(struct mtd_info *mtd, u_char byte) in au_write_byte() 64 static u_char au_read_byte16(struct mtd_info *mtd) in au_read_byte16() 79 static void au_write_byte16(struct mtd_info *mtd, u_char byte) in au_write_byte16() 92 static u16 au_read_word(struct mtd_info *mtd) in au_read_word() 108 static void au_write_buf(struct mtd_info *mtd, const u_char *buf, int len) in au_write_buf() 127 static void au_read_buf(struct mtd_info *mtd, u_char *buf, int len) in au_read_buf() 146 static void au_write_buf16(struct mtd_info *mtd, const u_char *buf, int len) in au_write_buf16() 168 static void au_read_buf16(struct mtd_info *mtd, u_char *buf, int len) in au_read_buf16() [all …]
|
D | cs553x_nand.c | 96 static void cs553x_read_buf(struct mtd_info *mtd, u_char *buf, int len) in cs553x_read_buf() 108 static void cs553x_write_buf(struct mtd_info *mtd, const u_char *buf, int len) in cs553x_write_buf() 120 static unsigned char cs553x_read_byte(struct mtd_info *mtd) in cs553x_read_byte() 126 static void cs553x_write_byte(struct mtd_info *mtd, u_char byte) in cs553x_write_byte() 138 static void cs553x_hwcontrol(struct mtd_info *mtd, int cmd, in cs553x_hwcontrol() 151 static int cs553x_device_ready(struct mtd_info *mtd) in cs553x_device_ready() 160 static void cs_enable_hwecc(struct mtd_info *mtd, int mode) in cs_enable_hwecc() 168 static int cs_calculate_ecc(struct mtd_info *mtd, const u_char *dat, u_char *ecc_code) in cs_calculate_ecc() 182 static struct mtd_info *cs553x_mtd[4]; 188 struct mtd_info *new_mtd; in cs553x_init_one() [all …]
|
D | socrates_nand.c | 41 static void socrates_nand_write_buf(struct mtd_info *mtd, in socrates_nand_write_buf() 61 static void socrates_nand_read_buf(struct mtd_info *mtd, uint8_t *buf, int len) in socrates_nand_read_buf() 81 static uint8_t socrates_nand_read_byte(struct mtd_info *mtd) in socrates_nand_read_byte() 92 static uint16_t socrates_nand_read_word(struct mtd_info *mtd) in socrates_nand_read_word() 102 static void socrates_nand_cmd_ctrl(struct mtd_info *mtd, int cmd, in socrates_nand_cmd_ctrl() 128 static int socrates_nand_device_ready(struct mtd_info *mtd) in socrates_nand_device_ready() 144 struct mtd_info *mtd; in socrates_nand_probe() 209 struct mtd_info *mtd = nand_to_mtd(&host->nand_chip); in socrates_nand_remove()
|
D | xway_nand.c | 72 static u8 xway_readb(struct mtd_info *mtd, int op) in xway_readb() 80 static void xway_writeb(struct mtd_info *mtd, int op, u8 value) in xway_writeb() 88 static void xway_select_chip(struct mtd_info *mtd, int select) in xway_select_chip() 109 static void xway_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl) in xway_cmd_ctrl() 123 static int xway_dev_ready(struct mtd_info *mtd) in xway_dev_ready() 128 static unsigned char xway_read_byte(struct mtd_info *mtd) in xway_read_byte() 133 static void xway_read_buf(struct mtd_info *mtd, u_char *buf, int len) in xway_read_buf() 141 static void xway_write_buf(struct mtd_info *mtd, const u_char *buf, int len) in xway_write_buf() 155 struct mtd_info *mtd; in xway_nand_probe()
|
D | sm_common.c | 15 static int oob_sm_ooblayout_ecc(struct mtd_info *mtd, int section, in oob_sm_ooblayout_ecc() 27 static int oob_sm_ooblayout_free(struct mtd_info *mtd, int section, in oob_sm_ooblayout_free() 64 static int oob_sm_small_ooblayout_ecc(struct mtd_info *mtd, int section, in oob_sm_small_ooblayout_ecc() 76 static int oob_sm_small_ooblayout_free(struct mtd_info *mtd, int section, in oob_sm_small_ooblayout_free() 102 static int sm_block_markbad(struct mtd_info *mtd, loff_t ofs) in sm_block_markbad() 165 struct mtd_info *mtd = nand_to_mtd(chip); in sm_attach_chip() 187 int sm_register_device(struct mtd_info *mtd, int smartmedia) in sm_register_device()
|
D | tango_nand.c | 119 static void tango_cmd_ctrl(struct mtd_info *mtd, int dat, unsigned int ctrl) in tango_cmd_ctrl() 130 static int tango_dev_ready(struct mtd_info *mtd) in tango_dev_ready() 138 static u8 tango_read_byte(struct mtd_info *mtd) in tango_read_byte() 145 static void tango_read_buf(struct mtd_info *mtd, u8 *buf, int len) in tango_read_buf() 152 static void tango_write_buf(struct mtd_info *mtd, const u8 *buf, int len) in tango_write_buf() 159 static void tango_select_chip(struct mtd_info *mtd, int idx) in tango_select_chip() 182 struct mtd_info *mtd = nand_to_mtd(chip); in check_erased_page() 210 struct mtd_info *mtd = nand_to_mtd(chip); in decode_error_report() 280 static int tango_read_page(struct mtd_info *mtd, struct nand_chip *chip, in tango_read_page() 302 static int tango_write_page(struct mtd_info *mtd, struct nand_chip *chip, in tango_write_page() [all …]
|
D | docg4.c | 79 struct mtd_info *mtd; 225 static int docg4_ooblayout_ecc(struct mtd_info *mtd, int section, in docg4_ooblayout_ecc() 237 static int docg4_ooblayout_free(struct mtd_info *mtd, int section, in docg4_ooblayout_free() 264 static void docg4_read_buf(struct mtd_info *mtd, uint8_t *buf, int len) in docg4_read_buf() 275 static void docg4_write_buf16(struct mtd_info *mtd, const uint8_t *buf, int len) in docg4_write_buf16() 319 static int docg4_wait(struct mtd_info *mtd, struct nand_chip *nand) in docg4_wait() 337 static void docg4_select_chip(struct mtd_info *mtd, int chip) in docg4_select_chip() 358 static void reset(struct mtd_info *mtd) in reset() 393 static int correct_data(struct mtd_info *mtd, uint8_t *buf, int page) in correct_data() 487 static uint8_t docg4_read_byte(struct mtd_info *mtd) in docg4_read_byte() [all …]
|
/Linux-v4.19/drivers/mtd/tests/ |
D | mtd_test.h | 16 int mtdtest_erase_eraseblock(struct mtd_info *mtd, unsigned int ebnum); 17 int mtdtest_scan_for_bad_eraseblocks(struct mtd_info *mtd, unsigned char *bbt, 19 int mtdtest_erase_good_eraseblocks(struct mtd_info *mtd, unsigned char *bbt, 22 int mtdtest_read(struct mtd_info *mtd, loff_t addr, size_t size, void *buf); 23 int mtdtest_write(struct mtd_info *mtd, loff_t addr, size_t size,
|
D | mtd_test.c | 10 int mtdtest_erase_eraseblock(struct mtd_info *mtd, unsigned int ebnum) in mtdtest_erase_eraseblock() 29 static int is_block_bad(struct mtd_info *mtd, unsigned int ebnum) in is_block_bad() 41 int mtdtest_scan_for_bad_eraseblocks(struct mtd_info *mtd, unsigned char *bbt, in mtdtest_scan_for_bad_eraseblocks() 61 int mtdtest_erase_good_eraseblocks(struct mtd_info *mtd, unsigned char *bbt, in mtdtest_erase_good_eraseblocks() 79 int mtdtest_read(struct mtd_info *mtd, loff_t addr, size_t size, void *buf) in mtdtest_read() 96 int mtdtest_write(struct mtd_info *mtd, loff_t addr, size_t size, in mtdtest_write()
|