| /OK3568_Linux_fs/kernel/include/linux/mtd/ |
| H A D | mtd.h | 23 struct mtd_info; 102 int (*ecc)(struct mtd_info *mtd, int section, 104 int (*free)(struct mtd_info *mtd, int section, 178 int (*get_info)(struct mtd_info *mtd, int wunit, 180 int (*get_wunit)(struct mtd_info *mtd, 235 struct mtd_info { struct 313 int (*_erase) (struct mtd_info *mtd, struct erase_info *instr); argument 314 int (*_point) (struct mtd_info *mtd, loff_t from, size_t len, argument 316 int (*_unpoint) (struct mtd_info *mtd, loff_t from, size_t len); argument 317 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 …]
|
| /OK3568_Linux_fs/u-boot/include/linux/mtd/ |
| H A D | mtd.h | 47 struct mtd_info *mtd; 135 int (*ecc)(struct mtd_info *mtd, int section, 137 int (*rfree)(struct mtd_info *mtd, int section, 156 struct mtd_info { struct 238 int (*_erase) (struct mtd_info *mtd, struct erase_info *instr); argument 240 int (*_point) (struct mtd_info *mtd, loff_t from, size_t len, argument 242 int (*_unpoint) (struct mtd_info *mtd, loff_t from, size_t len); argument 244 unsigned long (*_get_unmapped_area) (struct mtd_info *mtd, argument 248 int (*_read) (struct mtd_info *mtd, loff_t from, size_t len, argument 250 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 extern int nand_scan(struct mtd_info *mtd, int max_chips); 41 extern int nand_scan_ident(struct mtd_info *mtd, int max_chips, 43 extern int nand_scan_tail(struct mtd_info *mtd); 46 extern void nand_release(struct mtd_info *mtd); 49 extern void nand_wait_ready(struct mtd_info *mtd); 582 void (*hwctl)(struct mtd_info *mtd, int mode); 583 int (*calculate)(struct mtd_info *mtd, const uint8_t *dat, 585 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()
|
| /OK3568_Linux_fs/kernel/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 …]
|
| /OK3568_Linux_fs/kernel/drivers/mtd/ |
| H A D | mtdcore.c | 43 struct mtd_info *mtd = dev_get_drvdata(dev); in mtd_cls_suspend() 50 struct mtd_info *mtd = dev_get_drvdata(dev); in mtd_cls_resume() 76 struct mtd_info *__mtd_next_device(int i) in __mtd_next_device() 92 struct mtd_info *mtd = dev_get_drvdata(dev); in mtd_release() 102 struct mtd_info *mtd = dev_get_drvdata(dev); in mtd_type_show() 141 struct mtd_info *mtd = dev_get_drvdata(dev); in mtd_flags_show() 150 struct mtd_info *mtd = dev_get_drvdata(dev); in mtd_size_show() 160 struct mtd_info *mtd = dev_get_drvdata(dev); in mtd_erasesize_show() 169 struct mtd_info *mtd = dev_get_drvdata(dev); in mtd_writesize_show() 178 struct mtd_info *mtd = dev_get_drvdata(dev); in mtd_subpagesize_show() [all …]
|
| 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 | 28 static inline void free_partition(struct mtd_info *mtd) in free_partition() 34 static struct mtd_info *allocate_partition(struct mtd_info *parent, in allocate_partition() 38 struct mtd_info *master = mtd_get_master(parent); in allocate_partition() 43 struct mtd_info *child; in allocate_partition() 218 struct mtd_info *mtd = dev_get_drvdata(dev); in mtd_partition_offset_show() 230 static int mtd_add_partition_attrs(struct mtd_info *new) in mtd_add_partition_attrs() 239 int mtd_add_partition(struct mtd_info *parent, const char *name, in mtd_add_partition() 242 struct mtd_info *master = mtd_get_master(parent); in mtd_add_partition() 246 struct mtd_info *child; in mtd_add_partition() 299 static int __mtd_del_partition(struct mtd_info *mtd) in __mtd_del_partition() [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 *); 18 int parse_mtd_partitions(struct mtd_info *master, const char * const *types,
|
| /OK3568_Linux_fs/u-boot/include/ |
| H A D | nand.h | 37 int nand_mtd_to_devnum(struct mtd_info *mtd); 41 int nand_register(int devnum, struct mtd_info *mtd); 48 static inline int nand_read(struct mtd_info *info, loff_t ofs, size_t *len, in nand_read() 54 static inline int nand_write(struct mtd_info *info, loff_t ofs, size_t *len, in nand_write() 60 static inline int nand_block_isbad(struct mtd_info *info, loff_t ofs) in nand_block_isbad() 65 static inline int nand_erase(struct mtd_info *info, loff_t off, size_t size) in nand_erase() 101 int nand_read_skip_bad(struct mtd_info *mtd, loff_t offset, size_t *length, 107 int nand_write_skip_bad(struct mtd_info *mtd, loff_t offset, size_t *length, 109 int nand_erase_opts(struct mtd_info *mtd, 111 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,
|
| /OK3568_Linux_fs/kernel/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 | 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 …]
|
| H A 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 …]
|
| /OK3568_Linux_fs/u-boot/drivers/mtd/ |
| H A D | mtdcore.c | 80 struct mtd_info *mtd_table[MAX_MTD_DEVICES]; 157 struct mtd_info *__mtd_next_device(int i) in __mtd_next_device() 184 struct mtd_info __maybe_unused *mtd = dev_get_drvdata(dev); in mtd_release() 194 struct mtd_info *mtd = dev_get_drvdata(dev); in mtd_cls_suspend() 201 struct mtd_info *mtd = dev_get_drvdata(dev); in mtd_cls_resume() 211 struct mtd_info *mtd = dev_get_drvdata(dev); in mtd_type_show() 250 struct mtd_info *mtd = dev_get_drvdata(dev); in mtd_flags_show() 260 struct mtd_info *mtd = dev_get_drvdata(dev); in mtd_size_show() 271 struct mtd_info *mtd = dev_get_drvdata(dev); in mtd_erasesize_show() 281 struct mtd_info *mtd = dev_get_drvdata(dev); in mtd_writesize_show() [all …]
|
| H A D | mtdpart.c | 67 bool mtd_partitions_used(struct mtd_info *master) in mtd_partitions_used() 69 struct mtd_info *slave; in mtd_partitions_used() 203 int mtd_parse_partitions(struct mtd_info *parent, const char **_mtdparts, in mtd_parse_partitions() 290 static int part_read(struct mtd_info *mtd, loff_t from, size_t len, in part_read() 309 static int part_point(struct mtd_info *mtd, loff_t from, size_t len, in part_point() 316 static int part_unpoint(struct mtd_info *mtd, loff_t from, size_t len) in part_unpoint() 322 static unsigned long part_get_unmapped_area(struct mtd_info *mtd, in part_get_unmapped_area() 331 static int part_read_oob(struct mtd_info *mtd, loff_t from, in part_read_oob() 368 static int part_read_user_prot_reg(struct mtd_info *mtd, loff_t from, in part_read_user_prot_reg() 375 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 | 38 struct mtd_info mtd; 40 struct mtd_info **subdev; 48 ((sizeof(struct mtd_concat) + (num_subdev) * sizeof(struct mtd_info *))) 62 concat_read(struct mtd_info *mtd, loff_t from, size_t len, in concat_read() 74 struct mtd_info *subdev = concat->subdev[i]; in concat_read() 118 concat_write(struct mtd_info *mtd, loff_t to, size_t len, in concat_write() 130 struct mtd_info *subdev = concat->subdev[i]; in concat_write() 161 concat_writev(struct mtd_info *mtd, const struct kvec *vecs, in concat_writev() 189 struct mtd_info *subdev = concat->subdev[i]; in concat_writev() 237 concat_read_oob(struct mtd_info *mtd, loff_t from, struct mtd_oob_ops *ops) in concat_read_oob() [all …]
|
| H A D | cfi_mtd.c | 18 static struct mtd_info cfi_mtd_info[CFI_MAX_FLASH_BANKS]; 24 static int cfi_mtd_erase(struct mtd_info *mtd, struct erase_info *instr) in cfi_mtd_erase() 68 static int cfi_mtd_read(struct mtd_info *mtd, loff_t from, size_t len, in cfi_mtd_read() 80 static int cfi_mtd_write(struct mtd_info *mtd, loff_t to, size_t len, in cfi_mtd_write() 99 static void cfi_mtd_sync(struct mtd_info *mtd) in cfi_mtd_sync() 108 static int cfi_mtd_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len) in cfi_mtd_lock() 120 static int cfi_mtd_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len) in cfi_mtd_unlock() 132 static int cfi_mtd_set_erasesize(struct mtd_info *mtd, flash_info_t *fi) in cfi_mtd_set_erasesize() 205 struct mtd_info *mtd; in cfi_mtd_init() 210 struct mtd_info *mtd_list[CONFIG_SYS_MAX_FLASH_BANKS]; in cfi_mtd_init() [all …]
|
| /OK3568_Linux_fs/u-boot/board/socrates/ |
| H A D | nand.c | 16 static void sc_nand_write_byte(struct mtd_info *mtd, u_char byte); 17 static void sc_nand_write_buf(struct mtd_info *mtd, const u_char *buf, int len); 18 static u_char sc_nand_read_byte(struct mtd_info *mtd); 19 static u16 sc_nand_read_word(struct mtd_info *mtd); 20 static void sc_nand_read_buf(struct mtd_info *mtd, u_char *buf, int len); 21 static int sc_nand_device_ready(struct mtd_info *mtdinfo); 37 static void sc_nand_write_byte(struct mtd_info *mtd, u_char byte) in sc_nand_write_byte() 48 static void sc_nand_write_buf(struct mtd_info *mtd, const u_char *buf, int len) in sc_nand_write_buf() 64 static u_char sc_nand_read_byte(struct mtd_info *mtd) in sc_nand_read_byte() 75 static u16 sc_nand_read_word(struct mtd_info *mtd) in sc_nand_read_word() [all …]
|
| /OK3568_Linux_fs/u-boot/drivers/mtd/nand/raw/ |
| H A D | nand.c | 22 static struct mtd_info *nand_info[CONFIG_SYS_MAX_NAND_DEVICE]; 33 struct mtd_info *get_nand_dev_by_index(int dev) in get_nand_dev_by_index() 42 int nand_mtd_to_devnum(struct mtd_info *mtd) in nand_mtd_to_devnum() 55 int nand_register(int devnum, struct mtd_info *mtd) in nand_register() 85 struct mtd_info *mtd = nand_to_mtd(nand); in nand_init_chip() 107 struct mtd_info *nand_info_list[CONFIG_SYS_MAX_NAND_DEVICE]; in create_mtd_concat() 112 struct mtd_info *mtd = get_nand_dev_by_index(i); in create_mtd_concat() 119 struct mtd_info *mtd; in create_mtd_concat()
|
| H A D | vf610_nfc.c | 198 static inline u32 vf610_nfc_read(struct mtd_info *mtd, uint reg) in vf610_nfc_read() 205 static inline void vf610_nfc_write(struct mtd_info *mtd, uint reg, u32 val) in vf610_nfc_write() 212 static inline void vf610_nfc_set(struct mtd_info *mtd, uint reg, u32 bits) in vf610_nfc_set() 217 static inline void vf610_nfc_clear(struct mtd_info *mtd, uint reg, u32 bits) in vf610_nfc_clear() 222 static inline void vf610_nfc_set_field(struct mtd_info *mtd, u32 reg, in vf610_nfc_set_field() 252 static void vf610_nfc_done(struct mtd_info *mtd) in vf610_nfc_done() 277 static u8 vf610_nfc_get_id(struct mtd_info *mtd, int col) in vf610_nfc_get_id() 292 static u8 vf610_nfc_get_status(struct mtd_info *mtd) in vf610_nfc_get_status() 326 static void vf610_nfc_addr_cycle(struct mtd_info *mtd, int column, int page) in vf610_nfc_addr_cycle() 340 static inline void vf610_nfc_ecc_mode(struct mtd_info *mtd, int ecc_mode) in vf610_nfc_ecc_mode() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/mtd/nand/raw/ |
| H A D | mpc5121_nfc.c | 119 static void mpc5121_nfc_done(struct mtd_info *mtd); 122 static inline u16 nfc_read(struct mtd_info *mtd, uint reg) in nfc_read() 131 static inline void nfc_write(struct mtd_info *mtd, uint reg, u16 val) in nfc_write() 140 static inline void nfc_set(struct mtd_info *mtd, uint reg, u16 bits) in nfc_set() 146 static inline void nfc_clear(struct mtd_info *mtd, uint reg, u16 bits) in nfc_clear() 152 static inline void mpc5121_nfc_send_addr(struct mtd_info *mtd, u16 addr) in mpc5121_nfc_send_addr() 160 static inline void mpc5121_nfc_send_cmd(struct mtd_info *mtd, u16 cmd) in mpc5121_nfc_send_cmd() 168 static inline void mpc5121_nfc_send_prog_page(struct mtd_info *mtd) in mpc5121_nfc_send_prog_page() 176 static inline void mpc5121_nfc_send_read_page(struct mtd_info *mtd) in mpc5121_nfc_send_read_page() 184 static inline void mpc5121_nfc_send_read_id(struct mtd_info *mtd) in mpc5121_nfc_send_read_id() [all …]
|