/openbmc/linux/include/linux/mtd/ |
H A D | mtd.h | 23 struct mtd_info; 107 int (*ecc)(struct mtd_info *mtd, int section, 109 int (*free)(struct mtd_info *mtd, int section, 183 int (*get_info)(struct mtd_info *mtd, int wunit, 185 int (*get_wunit)(struct mtd_info *mtd, 238 struct mtd_info { struct 316 int (*_erase) (struct mtd_info *mtd, struct erase_info *instr); argument 317 int (*_point) (struct mtd_info *mtd, loff_t from, size_t len, argument 319 int (*_unpoint) (struct mtd_info *mtd, loff_t from, size_t len); argument 320 int (*_read) (struct mtd_info *mtd, loff_t from, size_t len, argument [all …]
|
H A D | onenand.h | 22 extern int onenand_scan(struct mtd_info *mtd, int max_chips); 24 extern void onenand_release(struct mtd_info *mtd); 104 int (*command)(struct mtd_info *mtd, int cmd, loff_t address, size_t len); 105 int (*wait)(struct mtd_info *mtd, int state); 106 int (*bbt_wait)(struct mtd_info *mtd, int state); 107 void (*unlock_all)(struct mtd_info *mtd); 108 int (*read_bufferram)(struct mtd_info *mtd, int area, 110 int (*write_bufferram)(struct mtd_info *mtd, int area, 114 void (*mmcontrol)(struct mtd_info *mtd, int sync_read); 115 int (*chip_probe)(struct mtd_info *mtd); [all …]
|
/openbmc/u-boot/include/linux/mtd/ |
H A D | mtd.h | 46 struct mtd_info *mtd; 130 int (*ecc)(struct mtd_info *mtd, int section, 132 int (*free)(struct mtd_info *mtd, int section, 151 struct mtd_info { struct 233 int (*_erase) (struct mtd_info *mtd, struct erase_info *instr); argument 235 int (*_point) (struct mtd_info *mtd, loff_t from, size_t len, argument 237 int (*_unpoint) (struct mtd_info *mtd, loff_t from, size_t len); argument 239 unsigned long (*_get_unmapped_area) (struct mtd_info *mtd, argument 243 int (*_read) (struct mtd_info *mtd, loff_t from, size_t len, argument 245 int (*_write) (struct mtd_info *mtd, loff_t to, size_t len, argument [all …]
|
H A D | rawnand.h | 24 struct mtd_info; 30 struct nand_flash_dev *nand_get_flash_type(struct mtd_info *mtd, 36 int nand_scan(struct mtd_info *mtd, int max_chips); 41 int nand_scan_ident(struct mtd_info *mtd, int max_chips, 43 int nand_scan_tail(struct mtd_info *mtd); 46 void nand_release(struct mtd_info *mtd); 49 void nand_wait_ready(struct mtd_info *mtd); 604 void (*hwctl)(struct mtd_info *mtd, int mode); 605 int (*calculate)(struct mtd_info *mtd, const uint8_t *dat, 607 int (*correct)(struct mtd_info *mtd, uint8_t *dat, uint8_t *read_ecc, [all …]
|
H A D | onenand.h | 28 extern int onenand_scan (struct mtd_info *mtd, int max_chips); 30 extern void onenand_release (struct mtd_info *mtd); 92 int (*command) (struct mtd_info *mtd, int cmd, loff_t address, 94 int (*wait) (struct mtd_info *mtd, int state); 95 int (*bbt_wait) (struct mtd_info *mtd, int state); 96 void (*unlock_all)(struct mtd_info *mtd); 97 int (*read_bufferram) (struct mtd_info *mtd, loff_t addr, int area, 99 int (*write_bufferram) (struct mtd_info *mtd, loff_t addr, int area, 104 int (*chip_probe)(struct mtd_info *mtd); 105 void (*mmcontrol) (struct mtd_info *mtd, int sync_read); [all …]
|
H A 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()
|
H A D | partitions.h | 53 struct mtd_info; 76 int (*parse_fn)(struct mtd_info *, struct mtd_partition **, 84 int mtd_add_partition(struct mtd_info *master, const char *name, 86 int mtd_del_partition(struct mtd_info *master, int partno); 87 uint64_t mtd_get_device_size(const struct mtd_info *mtd); 90 int mtd_parse_partitions(struct mtd_info *parent, const char **_mtdparts, 96 mtd_parse_partitions(struct mtd_info *parent, const char **_mtdparts, in mtd_parse_partitions()
|
/openbmc/linux/drivers/mtd/devices/ |
H A D | mtdram.c | 35 static struct mtd_info *mtd_info; variable 37 static int check_offs_len(struct mtd_info *mtd, loff_t ofs, uint64_t len) in check_offs_len() 56 static int ram_erase(struct mtd_info *mtd, struct erase_info *instr) in ram_erase() 65 static int ram_point(struct mtd_info *mtd, loff_t from, size_t len, in ram_point() 94 static int ram_unpoint(struct mtd_info *mtd, loff_t from, size_t len) in ram_unpoint() 99 static int ram_read(struct mtd_info *mtd, loff_t from, size_t len, in ram_read() 107 static int ram_write(struct mtd_info *mtd, loff_t to, size_t len, in ram_write() 117 if (mtd_info) { in cleanup_mtdram() 118 mtd_device_unregister(mtd_info); in cleanup_mtdram() 119 vfree(mtd_info->priv); in cleanup_mtdram() [all …]
|
/openbmc/u-boot/include/ |
H A D | nand.h | 36 int nand_mtd_to_devnum(struct mtd_info *mtd); 40 int nand_register(int devnum, struct mtd_info *mtd); 47 static inline int nand_read(struct mtd_info *info, loff_t ofs, size_t *len, in nand_read() 53 static inline int nand_write(struct mtd_info *info, loff_t ofs, size_t *len, in nand_write() 59 static inline int nand_block_isbad(struct mtd_info *info, loff_t ofs) in nand_block_isbad() 64 static inline int nand_erase(struct mtd_info *info, loff_t off, size_t size) in nand_erase() 100 int nand_read_skip_bad(struct mtd_info *mtd, loff_t offset, size_t *length, 106 int nand_write_skip_bad(struct mtd_info *mtd, loff_t offset, size_t *length, 108 int nand_erase_opts(struct mtd_info *mtd, 110 int nand_torture(struct mtd_info *mtd, loff_t offset); [all …]
|
H A D | onenand_uboot.h | 20 struct mtd_info; 25 extern struct mtd_info onenand_mtd; 29 extern int onenand_board_init(struct mtd_info *); 33 extern int onenand_read(struct mtd_info *mtd, loff_t from, size_t len, 35 extern int onenand_read_oob(struct mtd_info *mtd, loff_t from, struct mtd_oob_ops *ops); 36 extern int onenand_write(struct mtd_info *mtd, loff_t from, size_t len, 38 extern int onenand_erase(struct mtd_info *mtd, struct erase_info *instr); 46 extern int flexonenand_region(struct mtd_info *mtd, loff_t addr); 48 extern int flexonenand_set_boundary(struct mtd_info *mtd, int die,
|
/openbmc/linux/drivers/mtd/ |
H A D | mtdcore.c | 45 struct mtd_info *mtd = dev_get_drvdata(dev); in mtd_cls_suspend() 52 struct mtd_info *mtd = dev_get_drvdata(dev); in mtd_cls_resume() 77 struct mtd_info *__mtd_next_device(int i) in __mtd_next_device() 93 struct mtd_info *mtd = dev_get_drvdata(dev); in mtd_release() 108 struct mtd_info *mtd = container_of(kref, struct mtd_info, refcnt); in mtd_device_release() 138 struct mtd_info *mtd = dev_get_drvdata(dev); in mtd_type_show() 177 struct mtd_info *mtd = dev_get_drvdata(dev); in mtd_flags_show() 186 struct mtd_info *mtd = dev_get_drvdata(dev); in mtd_size_show() 195 struct mtd_info *mtd = dev_get_drvdata(dev); in mtd_erasesize_show() 204 struct mtd_info *mtd = dev_get_drvdata(dev); in mtd_writesize_show() [all …]
|
H A D | mtdcore.h | 10 struct mtd_info *__mtd_next_device(int i); 11 int __must_check add_mtd_device(struct mtd_info *mtd); 12 int del_mtd_device(struct mtd_info *mtd); 13 int add_mtd_partitions(struct mtd_info *, const struct mtd_partition *, int); 14 int del_mtd_partitions(struct mtd_info *); 15 void release_mtd_partition(struct mtd_info *mtd); 19 int parse_mtd_partitions(struct mtd_info *master, const char * const *types,
|
H A D | mtdconcat.c | 30 struct mtd_info mtd; 32 struct mtd_info **subdev; 40 ((sizeof(struct mtd_concat) + (num_subdev) * sizeof(struct mtd_info *))) 54 concat_read(struct mtd_info *mtd, loff_t from, size_t len, in concat_read() 62 struct mtd_info *subdev = concat->subdev[i]; in concat_read() 106 concat_panic_write(struct mtd_info *mtd, loff_t to, size_t len, in concat_panic_write() 113 struct mtd_info *subdev = concat->subdev[i]; in concat_panic_write() 147 concat_write(struct mtd_info *mtd, loff_t to, size_t len, in concat_write() 155 struct mtd_info *subdev = concat->subdev[i]; in concat_write() 185 concat_writev(struct mtd_info *mtd, const struct kvec *vecs, in concat_writev() [all …]
|
H A D | mtdpart.c | 29 static inline void free_partition(struct mtd_info *mtd) in free_partition() 35 void release_mtd_partition(struct mtd_info *mtd) in release_mtd_partition() 41 static struct mtd_info *allocate_partition(struct mtd_info *parent, in allocate_partition() 45 struct mtd_info *master = mtd_get_master(parent); in allocate_partition() 50 struct mtd_info *child; in allocate_partition() 225 struct mtd_info *mtd = dev_get_drvdata(dev); in offset_show() 236 static int mtd_add_partition_attrs(struct mtd_info *new) in mtd_add_partition_attrs() 245 int mtd_add_partition(struct mtd_info *parent, const char *name, in mtd_add_partition() 248 struct mtd_info *master = mtd_get_master(parent); in mtd_add_partition() 252 struct mtd_info *child; in mtd_add_partition() [all …]
|
/openbmc/linux/drivers/mtd/chips/ |
H A D | map_absent.c | 30 static int map_absent_read (struct mtd_info *, loff_t, size_t, size_t *, u_char *); 31 static int map_absent_write (struct mtd_info *, loff_t, size_t, size_t *, const u_char *); 32 static int map_absent_erase (struct mtd_info *, struct erase_info *); 33 static void map_absent_sync (struct mtd_info *); 34 static struct mtd_info *map_absent_probe(struct map_info *map); 35 static void map_absent_destroy (struct mtd_info *); 45 static struct mtd_info *map_absent_probe(struct map_info *map) in map_absent_probe() 47 struct mtd_info *mtd; in map_absent_probe() 72 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() 77 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 …]
|
H A D | map_rom.c | 19 static int maprom_read (struct mtd_info *, loff_t, size_t, size_t *, u_char *); 20 static int maprom_write (struct mtd_info *, loff_t, size_t, size_t *, const u_char *); 21 static void maprom_nop (struct mtd_info *); 22 static struct mtd_info *map_rom_probe(struct map_info *map); 23 static int maprom_erase (struct mtd_info *mtd, struct erase_info *info); 24 static int maprom_point (struct mtd_info *mtd, loff_t from, size_t len, 26 static int maprom_unpoint(struct mtd_info *mtd, loff_t from, size_t len); 44 static struct mtd_info *map_rom_probe(struct map_info *map) in map_rom_probe() 46 struct mtd_info *mtd; in map_rom_probe() 73 static int maprom_point(struct mtd_info *mtd, loff_t from, size_t len, in maprom_point() [all …]
|
H A D | map_ram.c | 19 static int mapram_read (struct mtd_info *, loff_t, size_t, size_t *, u_char *); 20 static int mapram_write (struct mtd_info *, loff_t, size_t, size_t *, const u_char *); 21 static int mapram_erase (struct mtd_info *, struct erase_info *); 22 static void mapram_nop (struct mtd_info *); 23 static struct mtd_info *map_ram_probe(struct map_info *map); 24 static int mapram_point (struct mtd_info *mtd, loff_t from, size_t len, 26 static int mapram_unpoint(struct mtd_info *mtd, loff_t from, size_t len); 35 static struct mtd_info *map_ram_probe(struct map_info *map) in map_ram_probe() 37 struct mtd_info *mtd; in map_ram_probe() 87 static int mapram_point(struct mtd_info *mtd, loff_t from, size_t len, in mapram_point() [all …]
|
/openbmc/u-boot/board/socrates/ |
H A D | nand.c | 15 static void sc_nand_write_byte(struct mtd_info *mtd, u_char byte); 16 static void sc_nand_write_buf(struct mtd_info *mtd, const u_char *buf, int len); 17 static u_char sc_nand_read_byte(struct mtd_info *mtd); 18 static u16 sc_nand_read_word(struct mtd_info *mtd); 19 static void sc_nand_read_buf(struct mtd_info *mtd, u_char *buf, int len); 20 static int sc_nand_device_ready(struct mtd_info *mtdinfo); 36 static void sc_nand_write_byte(struct mtd_info *mtd, u_char byte) in sc_nand_write_byte() 47 static void sc_nand_write_buf(struct mtd_info *mtd, const u_char *buf, int len) in sc_nand_write_buf() 63 static u_char sc_nand_read_byte(struct mtd_info *mtd) in sc_nand_read_byte() 74 static u16 sc_nand_read_word(struct mtd_info *mtd) in sc_nand_read_word() [all …]
|
/openbmc/u-boot/drivers/mtd/ |
H A D | mtdcore.c | 79 struct mtd_info *mtd_table[MAX_MTD_DEVICES]; 156 struct mtd_info *__mtd_next_device(int i) in __mtd_next_device() 183 struct mtd_info __maybe_unused *mtd = dev_get_drvdata(dev); in mtd_release() 193 struct mtd_info *mtd = dev_get_drvdata(dev); in mtd_cls_suspend() 200 struct mtd_info *mtd = dev_get_drvdata(dev); in mtd_cls_resume() 210 struct mtd_info *mtd = dev_get_drvdata(dev); in mtd_type_show() 249 struct mtd_info *mtd = dev_get_drvdata(dev); in mtd_flags_show() 259 struct mtd_info *mtd = dev_get_drvdata(dev); in mtd_size_show() 270 struct mtd_info *mtd = dev_get_drvdata(dev); in mtd_erasesize_show() 280 struct mtd_info *mtd = dev_get_drvdata(dev); in mtd_writesize_show() [all …]
|
H A D | mtdpart.c | 66 bool mtd_partitions_used(struct mtd_info *master) in mtd_partitions_used() 68 struct mtd_info *slave; in mtd_partitions_used() 202 int mtd_parse_partitions(struct mtd_info *parent, const char **_mtdparts, in mtd_parse_partitions() 289 static int part_read(struct mtd_info *mtd, loff_t from, size_t len, in part_read() 308 static int part_point(struct mtd_info *mtd, loff_t from, size_t len, in part_point() 315 static int part_unpoint(struct mtd_info *mtd, loff_t from, size_t len) in part_unpoint() 321 static unsigned long part_get_unmapped_area(struct mtd_info *mtd, in part_get_unmapped_area() 330 static int part_read_oob(struct mtd_info *mtd, loff_t from, in part_read_oob() 367 static int part_read_user_prot_reg(struct mtd_info *mtd, loff_t from, in part_read_user_prot_reg() 374 static int part_get_user_prot_info(struct mtd_info *mtd, size_t len, in part_get_user_prot_info() [all …]
|
H A D | mtdconcat.c | 37 struct mtd_info mtd; 39 struct mtd_info **subdev; 47 ((sizeof(struct mtd_concat) + (num_subdev) * sizeof(struct mtd_info *))) 61 concat_read(struct mtd_info *mtd, loff_t from, size_t len, in concat_read() 73 struct mtd_info *subdev = concat->subdev[i]; in concat_read() 117 concat_write(struct mtd_info *mtd, loff_t to, size_t len, in concat_write() 129 struct mtd_info *subdev = concat->subdev[i]; in concat_write() 160 concat_writev(struct mtd_info *mtd, const struct kvec *vecs, in concat_writev() 188 struct mtd_info *subdev = concat->subdev[i]; in concat_writev() 236 concat_read_oob(struct mtd_info *mtd, loff_t from, struct mtd_oob_ops *ops) in concat_read_oob() [all …]
|
H A D | mtdcore.h | 8 int add_mtd_device(struct mtd_info *mtd); 9 int del_mtd_device(struct mtd_info *mtd); 10 int add_mtd_partitions(struct mtd_info *, const struct mtd_partition *, int); 11 int del_mtd_partitions(struct mtd_info *); 12 int parse_mtd_partitions(struct mtd_info *master, const char * const *types,
|
H A D | cfi_mtd.c | 17 static struct mtd_info cfi_mtd_info[CFI_MAX_FLASH_BANKS]; 23 static int cfi_mtd_erase(struct mtd_info *mtd, struct erase_info *instr) in cfi_mtd_erase() 67 static int cfi_mtd_read(struct mtd_info *mtd, loff_t from, size_t len, in cfi_mtd_read() 79 static int cfi_mtd_write(struct mtd_info *mtd, loff_t to, size_t len, in cfi_mtd_write() 98 static void cfi_mtd_sync(struct mtd_info *mtd) in cfi_mtd_sync() 107 static int cfi_mtd_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len) in cfi_mtd_lock() 119 static int cfi_mtd_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len) in cfi_mtd_unlock() 131 static int cfi_mtd_set_erasesize(struct mtd_info *mtd, flash_info_t *fi) in cfi_mtd_set_erasesize() 204 struct mtd_info *mtd; in cfi_mtd_init() 209 struct mtd_info *mtd_list[CONFIG_SYS_MAX_FLASH_BANKS]; in cfi_mtd_init() [all …]
|
/openbmc/u-boot/drivers/mtd/nand/raw/ |
H A D | nand.c | 19 static struct mtd_info *nand_info[CONFIG_SYS_MAX_NAND_DEVICE]; 30 struct mtd_info *get_nand_dev_by_index(int dev) in get_nand_dev_by_index() 39 int nand_mtd_to_devnum(struct mtd_info *mtd) in nand_mtd_to_devnum() 52 int nand_register(int devnum, struct mtd_info *mtd) in nand_register() 82 struct mtd_info *mtd = nand_to_mtd(nand); in nand_init_chip() 104 struct mtd_info *nand_info_list[CONFIG_SYS_MAX_NAND_DEVICE]; in create_mtd_concat() 109 struct mtd_info *mtd = get_nand_dev_by_index(i); in create_mtd_concat() 116 struct mtd_info *mtd; in create_mtd_concat()
|
/openbmc/linux/drivers/mtd/tests/ |
H A 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,
|