Home
last modified time | relevance | path

Searched full:mtd (Results 1 – 25 of 416) sorted by relevance

12345678910>>...17

/linux/drivers/mtd/
H A Dmtdcore.c3 * Core registration and callback routines for MTD
35 #include <linux/mtd/mtd.h>
36 #include <linux/mtd/partitions.h>
37 #include <linux/mtd/concat.h>
47 struct mtd_info *mtd = dev_get_drvdata(dev); in mtd_cls_suspend() local
49 return mtd ? mtd_suspend(mtd) : 0; in mtd_cls_suspend()
54 struct mtd_info *mtd = dev_get_drvdata(dev); in mtd_cls_resume() local
56 if (mtd) in mtd_cls_resume()
95 struct mtd_info *mtd = dev_get_drvdata(dev); mtd_release() local
119 struct mtd_info *mtd = container_of(kref, struct mtd_info, refcnt); mtd_device_release() local
149 struct mtd_info *mtd = dev_get_drvdata(dev); mtd_type_show() local
188 struct mtd_info *mtd = dev_get_drvdata(dev); mtd_flags_show() local
197 struct mtd_info *mtd = dev_get_drvdata(dev); mtd_size_show() local
206 struct mtd_info *mtd = dev_get_drvdata(dev); mtd_erasesize_show() local
215 struct mtd_info *mtd = dev_get_drvdata(dev); mtd_writesize_show() local
224 struct mtd_info *mtd = dev_get_drvdata(dev); mtd_subpagesize_show() local
234 struct mtd_info *mtd = dev_get_drvdata(dev); mtd_oobsize_show() local
243 struct mtd_info *mtd = dev_get_drvdata(dev); mtd_oobavail_show() local
252 struct mtd_info *mtd = dev_get_drvdata(dev); mtd_numeraseregions_show() local
261 struct mtd_info *mtd = dev_get_drvdata(dev); mtd_name_show() local
270 struct mtd_info *mtd = dev_get_drvdata(dev); mtd_ecc_strength_show() local
280 struct mtd_info *mtd = dev_get_drvdata(dev); mtd_bitflip_threshold_show() local
289 struct mtd_info *mtd = dev_get_drvdata(dev); mtd_bitflip_threshold_store() local
305 struct mtd_info *mtd = dev_get_drvdata(dev); mtd_ecc_step_size_show() local
315 struct mtd_info *mtd = dev_get_drvdata(dev); mtd_corrected_bits_show() local
325 struct mtd_info *mtd = dev_get_drvdata(dev); mtd_ecc_failures_show() local
335 struct mtd_info *mtd = dev_get_drvdata(dev); mtd_bad_blocks_show() local
345 struct mtd_info *mtd = dev_get_drvdata(dev); mtd_bbt_blocks_show() local
401 struct mtd_info *mtd = s->private; mtd_ooblayout_show() local
435 mtd_debugfs_populate(struct mtd_info * mtd) mtd_debugfs_populate() argument
458 mtd_mmap_capabilities(struct mtd_info * mtd) mtd_mmap_capabilities() argument
477 struct mtd_info *mtd; mtd_reboot_notifier() local
511 mtd_wunit_to_pairing_info(struct mtd_info * mtd,int wunit,struct mtd_pairing_info * info) mtd_wunit_to_pairing_info() argument
554 mtd_pairing_info_to_wunit(struct mtd_info * mtd,const struct mtd_pairing_info * info) mtd_pairing_info_to_wunit() argument
582 mtd_pairing_groups(struct mtd_info * mtd) mtd_pairing_groups() argument
596 struct mtd_info *mtd = priv; mtd_nvmem_reg_read() local
607 mtd_nvmem_add(struct mtd_info * mtd) mtd_nvmem_add() argument
639 mtd_check_of_node(struct mtd_info * mtd) mtd_check_of_node() argument
703 add_mtd_device(struct mtd_info * mtd) add_mtd_device() argument
878 del_mtd_device(struct mtd_info * mtd) del_mtd_device() argument
907 mtd_set_dev_defaults(struct mtd_info * mtd) mtd_set_dev_defaults() argument
923 mtd_otp_size(struct mtd_info * mtd,bool is_user) mtd_otp_size() argument
955 mtd_otp_nvmem_register(struct mtd_info * mtd,const char * compatible,int size,nvmem_reg_read_t reg_read) mtd_otp_nvmem_register() argument
994 struct mtd_info *mtd = priv; mtd_nvmem_user_otp_reg_read() local
1008 struct mtd_info *mtd = priv; mtd_nvmem_fact_otp_reg_read() local
1019 mtd_otp_nvmem_add(struct mtd_info * mtd) mtd_otp_nvmem_add() argument
1120 mtd_device_parse_register(struct mtd_info * mtd,const char * const * types,struct mtd_part_parser_data * parser_data,const struct mtd_partition * parts,int nr_parts) mtd_device_parse_register() argument
1242 struct mtd_info *mtd; register_mtd_user() local
1268 struct mtd_info *mtd; unregister_mtd_user() local
1294 get_mtd_device(struct mtd_info * mtd,int num) get_mtd_device() argument
1329 __get_mtd_device(struct mtd_info * mtd) __get_mtd_device() argument
1366 struct mtd_info *mtd = NULL; of_get_mtd_device_by_node() local
1398 struct mtd_info *mtd = NULL, *other; get_mtd_device_nm() local
1425 put_mtd_device(struct mtd_info * mtd) put_mtd_device() argument
1434 __put_mtd_device(struct mtd_info * mtd) __put_mtd_device() argument
1463 mtd_erase(struct mtd_info * mtd,struct erase_info * instr) mtd_erase() argument
1515 mtd_point(struct mtd_info * mtd,loff_t from,size_t len,size_t * retlen,void ** virt,resource_size_t * phys) mtd_point() argument
1537 mtd_unpoint(struct mtd_info * mtd,loff_t from,size_t len) mtd_unpoint() argument
1556 mtd_get_unmapped_area(struct mtd_info * mtd,unsigned long len,unsigned long offset,unsigned long flags) mtd_get_unmapped_area() argument
1574 mtd_update_ecc_stats(struct mtd_info * mtd,struct mtd_info * master,const struct mtd_ecc_stats * old_stats) mtd_update_ecc_stats() argument
1593 mtd_read(struct mtd_info * mtd,loff_t from,size_t len,size_t * retlen,u_char * buf) mtd_read() argument
1612 mtd_write(struct mtd_info * mtd,loff_t to,size_t len,size_t * retlen,const u_char * buf) mtd_write() argument
1636 mtd_panic_write(struct mtd_info * mtd,loff_t to,size_t len,size_t * retlen,const u_char * buf) mtd_panic_write() argument
1658 mtd_check_oob_ops(struct mtd_info * mtd,loff_t offs,struct mtd_oob_ops * ops) mtd_check_oob_ops() argument
1691 mtd_read_oob_std(struct mtd_info * mtd,loff_t from,struct mtd_oob_ops * ops) mtd_read_oob_std() argument
1707 mtd_write_oob_std(struct mtd_info * mtd,loff_t to,struct mtd_oob_ops * ops) mtd_write_oob_std() argument
1723 mtd_io_emulated_slc(struct mtd_info * mtd,loff_t start,bool read,struct mtd_oob_ops * ops) mtd_io_emulated_slc() argument
1786 mtd_read_oob(struct mtd_info * mtd,loff_t from,struct mtd_oob_ops * ops) mtd_read_oob() argument
1830 mtd_write_oob(struct mtd_info * mtd,loff_t to,struct mtd_oob_ops * ops) mtd_write_oob() argument
1874 mtd_ooblayout_ecc(struct mtd_info * mtd,int section,struct mtd_oob_region * oobecc) mtd_ooblayout_ecc() argument
1908 mtd_ooblayout_free(struct mtd_info * mtd,int section,struct mtd_oob_region * oobfree) mtd_ooblayout_free() argument
1942 mtd_ooblayout_find_region(struct mtd_info * mtd,int byte,int * sectionp,struct mtd_oob_region * oobregion,int (* iter)(struct mtd_info *,int section,struct mtd_oob_region * oobregion)) mtd_ooblayout_find_region() argument
1988 mtd_ooblayout_find_eccregion(struct mtd_info * mtd,int eccbyte,int * section,struct mtd_oob_region * oobregion) mtd_ooblayout_find_eccregion() argument
2011 mtd_ooblayout_get_bytes(struct mtd_info * mtd,u8 * buf,const u8 * oobbuf,int start,int nbytes,int (* iter)(struct mtd_info *,int section,struct mtd_oob_region * oobregion)) mtd_ooblayout_get_bytes() argument
2054 mtd_ooblayout_set_bytes(struct mtd_info * mtd,const u8 * buf,u8 * oobbuf,int start,int nbytes,int (* iter)(struct mtd_info *,int section,struct mtd_oob_region * oobregion)) mtd_ooblayout_set_bytes() argument
2092 mtd_ooblayout_count_bytes(struct mtd_info * mtd,int (* iter)(struct mtd_info *,int section,struct mtd_oob_region * oobregion)) mtd_ooblayout_count_bytes() argument
2126 mtd_ooblayout_get_eccbytes(struct mtd_info * mtd,u8 * eccbuf,const u8 * oobbuf,int start,int nbytes) mtd_ooblayout_get_eccbytes() argument
2146 mtd_ooblayout_set_eccbytes(struct mtd_info * mtd,const u8 * eccbuf,u8 * oobbuf,int start,int nbytes) mtd_ooblayout_set_eccbytes() argument
2166 mtd_ooblayout_get_databytes(struct mtd_info * mtd,u8 * databuf,const u8 * oobbuf,int start,int nbytes) mtd_ooblayout_get_databytes() argument
2186 mtd_ooblayout_set_databytes(struct mtd_info * mtd,const u8 * databuf,u8 * oobbuf,int start,int nbytes) mtd_ooblayout_set_databytes() argument
2202 mtd_ooblayout_count_freebytes(struct mtd_info * mtd) mtd_ooblayout_count_freebytes() argument
2216 mtd_ooblayout_count_eccbytes(struct mtd_info * mtd) mtd_ooblayout_count_eccbytes() argument
2227 mtd_get_fact_prot_info(struct mtd_info * mtd,size_t len,size_t * retlen,struct otp_info * buf) mtd_get_fact_prot_info() argument
2240 mtd_read_fact_prot_reg(struct mtd_info * mtd,loff_t from,size_t len,size_t * retlen,u_char * buf) mtd_read_fact_prot_reg() argument
2254 mtd_get_user_prot_info(struct mtd_info * mtd,size_t len,size_t * retlen,struct otp_info * buf) mtd_get_user_prot_info() argument
2267 mtd_read_user_prot_reg(struct mtd_info * mtd,loff_t from,size_t len,size_t * retlen,u_char * buf) mtd_read_user_prot_reg() argument
2281 mtd_write_user_prot_reg(struct mtd_info * mtd,loff_t to,size_t len,size_t * retlen,const u_char * buf) mtd_write_user_prot_reg() argument
2304 mtd_lock_user_prot_reg(struct mtd_info * mtd,loff_t from,size_t len) mtd_lock_user_prot_reg() argument
2316 mtd_erase_user_prot_reg(struct mtd_info * mtd,loff_t from,size_t len) mtd_erase_user_prot_reg() argument
2329 mtd_lock(struct mtd_info * mtd,loff_t ofs,uint64_t len) mtd_lock() argument
2349 mtd_unlock(struct mtd_info * mtd,loff_t ofs,uint64_t len) mtd_unlock() argument
2369 mtd_is_locked(struct mtd_info * mtd,loff_t ofs,uint64_t len) mtd_is_locked() argument
2389 mtd_block_isreserved(struct mtd_info * mtd,loff_t ofs) mtd_block_isreserved() argument
2405 mtd_block_isbad(struct mtd_info * mtd,loff_t ofs) mtd_block_isbad() argument
2421 mtd_block_markbad(struct mtd_info * mtd,loff_t ofs) mtd_block_markbad() argument
2470 default_mtd_writev(struct mtd_info * mtd,const struct kvec * vecs,unsigned long count,loff_t to,size_t * retlen) default_mtd_writev() argument
2502 mtd_writev(struct mtd_info * mtd,const struct kvec * vecs,unsigned long count,loff_t to,size_t * retlen) mtd_writev() argument
2543 mtd_kmalloc_up_to(const struct mtd_info * mtd,size_t * size) mtd_kmalloc_up_to() argument
2575 struct mtd_info *mtd; mtd_proc_show() local
[all...]
H A Dmtdconcat.c3 * MTD device concatenation layer
18 #include <linux/mtd/mtd.h>
19 #include <linux/mtd/concat.h>
31 * Given a pointer to the MTD object in the mtd_concat structure,
37 * MTD methods which look up the relevant subdevice, translate the
42 concat_read(struct mtd_info *mtd, loff_t from, size_t len, in concat_read() argument
45 struct mtd_concat *concat = CONCAT(mtd); in concat_read()
71 mtd->ecc_stats.failed++; in concat_read()
74 mtd->ecc_stats.corrected++; in concat_read()
94 concat_panic_write(struct mtd_info *mtd, loff_t to, size_t len, in concat_panic_write() argument
[all …]
H A Dmtd_virt_concat.c3 * Virtual concat MTD device driver
10 #include <linux/mtd/mtd.h>
12 #include <linux/mtd/partitions.h>
16 #include <linux/mtd/concat.h>
71 struct mtd_info *mtd; in mtd_virt_concat_destroy_joins() local
74 mtd = &item->concat->mtd; in mtd_virt_concat_destroy_joins()
76 mtd_device_unregister(mtd); in mtd_virt_concat_destroy_joins()
77 kfree(mtd->name); in mtd_virt_concat_destroy_joins()
79 mtd_concat_destroy(mtd); in mtd_virt_concat_destroy_joins()
85 * mtd_virt_concat_destroy - Destroy the concat that includes the mtd object
[all …]
H A Dmtdblock.c3 * Direct MTD block device access
18 #include <linux/mtd/mtd.h>
19 #include <linux/mtd/blktrans.h>
44 static int erase_write (struct mtd_info *mtd, unsigned long pos, in erase_write() argument
57 ret = mtd_erase(mtd, &erase); in erase_write()
61 pos, len, mtd->name); in erase_write()
69 ret = mtd_write(mtd, pos, len, &retlen, buf); in erase_write()
80 struct mtd_info *mtd = mtdblk->mbd.mtd; in write_cached_data() local
87 "at 0x%lx, size 0x%x\n", mtd->name, in write_cached_data()
90 ret = erase_write (mtd, mtdblk->cache_offset, in write_cached_data()
[all …]
/linux/include/linux/mtd/
H A Dmtd.h17 #include <mtd/mtd-abi.h>
37 uint64_t offset; /* At which this region starts, from the beginning of the MTD */
64 * Note, some MTD drivers do not allow you to write more than one OOB area at
65 * one go. If you try to do that on such an MTD device, -EINVAL will be
66 * returned. If you want to make your implementation portable on all kind of MTD
107 int (*ecc)(struct mtd_info *mtd, int section,
109 int (*free)(struct mtd_info *mtd, int section,
168 * write-unit <-> (pair + group) conversions, we ask the MTD drivers to
171 * MTD users will then be able to query these information by using the
174 * @ngroups is here to help MTD users iterating over all the pages in a
[all …]
/linux/drivers/mtd/nand/onenand/
H A Donenand_base.c26 #include <linux/mtd/mtd.h>
27 #include <linux/mtd/onenand.h>
28 #include <linux/mtd/partitions.h>
66 static int flexonenand_ooblayout_ecc(struct mtd_info *mtd, int section, in flexonenand_ooblayout_ecc() argument
78 static int flexonenand_ooblayout_free(struct mtd_info *mtd, int section, in flexonenand_ooblayout_free() argument
102 static int onenand_ooblayout_128_ecc(struct mtd_info *mtd, int section, in onenand_ooblayout_128_ecc() argument
114 static int onenand_ooblayout_128_free(struct mtd_info *mtd, int section, in onenand_ooblayout_128_free() argument
138 static int onenand_ooblayout_32_64_ecc(struct mtd_info *mtd, int section, in onenand_ooblayout_32_64_ecc() argument
150 static int onenand_ooblayout_32_64_free(struct mtd_info *mtd, int section, in onenand_ooblayout_32_64_free() argument
153 int sections = (mtd->oobsize / 32) * 2; in onenand_ooblayout_32_64_free()
[all …]
H A Donenand_bbt.c15 #include <linux/mtd/mtd.h>
16 #include <linux/mtd/onenand.h>
47 * @mtd: MTD device structure
56 static int create_bbt(struct mtd_info *mtd, uint8_t *buf, struct nand_bbt_descr *bd, int chip) in create_bbt() argument
58 struct onenand_chip *this = mtd->priv; in create_bbt()
94 ret = onenand_bbt_read_oob(mtd, in create_bbt()
106 mtd->ecc_stats.badblocks++; in create_bbt()
113 rgn = flexonenand_region(mtd, from); in create_bbt()
114 from += mtd->eraseregions[rgn].erasesize; in create_bbt()
125 * @mtd: MTD device structure
[all …]
H A Donenand_samsung.c18 #include <linux/mtd/mtd.h>
19 #include <linux/mtd/onenand.h>
20 #include <linux/mtd/partitions.h>
123 struct mtd_info *mtd; member
218 struct onenand_chip *this = onenand->mtd->priv; in s3c_onenand_readw()
268 struct onenand_chip *this = onenand->mtd->priv; in s3c_onenand_writew()
310 static int s3c_onenand_wait(struct mtd_info *mtd, int state) in s3c_onenand_wait() argument
358 mtd->ecc_stats.failed++; in s3c_onenand_wait()
376 static int s3c_onenand_command(struct mtd_info *mtd, int cmd, loff_t addr, in s3c_onenand_command() argument
379 struct onenand_chip *this = mtd->priv; in s3c_onenand_command()
[all …]
/linux/drivers/mtd/ubi/
H A Dgluebi.c9 * This is a small driver which implements fake MTD devices on top of UBI
11 * MTD-oriented software (including all the legacy software) work on top of
14 * Gluebi emulates MTD devices of "MTD_UBIVOLUME" type. Their minimal I/O unit
15 * size (@mtd->writesize) is equivalent to the UBI minimal I/O unit. The
26 #include <linux/mtd/ubi.h>
27 #include <linux/mtd/mtd.h>
36 * @mtd: emulated MTD device description object
44 struct mtd_info mtd; member
77 * gluebi_get_device - get MTD device reference.
78 * @mtd: the MTD device description object
[all …]
H A Dbuild.c13 * When UBI is initialized, it attaches all the MTD devices specified as the
14 * module load parameters or the kernel boot parameters. If MTD devices were
15 * specified, UBI does not attach any MTD device, but it is possible to do
26 #include <linux/mtd/partitions.h>
35 /* Maximum length of the 'mtd=' parameter */
38 /* Maximum number of comma-separated items in the 'mtd=' parameter */
51 * struct mtd_dev_param - MTD device parameter description data structure.
52 * @name: MTD character device node path, MTD device name, or MTD device number
74 /* MTD devices specification parameters */
385 ret = sprintf(buf, "%d\n", ubi->mtd->index); in dev_attribute_show()
[all …]
/linux/Documentation/ABI/testing/
H A Dsysfs-class-mtd1 What: /sys/class/mtd/
4 Contact: linux-mtd@lists.infradead.org
6 The mtd/ class subdirectory belongs to the MTD subsystem
7 (MTD core).
9 What: /sys/class/mtd/mtdX/
12 Contact: linux-mtd@lists.infradead.org
14 The /sys/class/mtd/mtd{0,1,2,3,...} directories correspond
19 What: /sys/class/mtd/mtdXro/
22 Contact: linux-mtd@lists.infradead.org
25 nodes for /sys/class/mtd/mtdX/ .
[all …]
/linux/drivers/mtd/chips/
H A Dmap_ram.c15 #include <linux/mtd/mtd.h>
16 #include <linux/mtd/map.h>
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);
37 struct mtd_info *mtd; in map_ram_probe() local
60 mtd = kzalloc_obj(*mtd); in map_ram_probe()
61 if (!mtd) in map_ram_probe()
65 mtd->priv = map; in map_ram_probe()
66 mtd->name = map->name; in map_ram_probe()
67 mtd->type = MTD_RAM; in map_ram_probe()
[all …]
H A Dmap_rom.c16 #include <linux/mtd/mtd.h>
17 #include <linux/mtd/map.h>
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);
46 struct mtd_info *mtd; in map_rom_probe() local
48 mtd = kzalloc_obj(*mtd); in map_rom_probe()
49 if (!mtd) in map_rom_probe()
53 mtd->priv = map; in map_rom_probe()
54 mtd->name = map->name; in map_rom_probe()
[all …]
H A Dmap_absent.c6 * This map driver is used to allocate "placeholder" MTD
9 * registration of MTD device nodes regardless of probe outcome.
27 #include <linux/mtd/mtd.h>
28 #include <linux/mtd/map.h>
47 struct mtd_info *mtd; in map_absent_probe() local
49 mtd = kzalloc_obj(*mtd); in map_absent_probe()
50 if (!mtd) { in map_absent_probe()
55 mtd->priv = map; in map_absent_probe()
56 mtd->name = map->name; in map_absent_probe()
57 mtd->type = MTD_ABSENT; in map_absent_probe()
[all …]
/linux/drivers/mtd/devices/
H A Dmtdram.c2 * mtdram - a test mtd device
18 #include <linux/mtd/mtd.h>
19 #include <linux/mtd/mtdram.h>
34 // We could store these in the mtd structure, but we only support 1 device..
37 static int check_offs_len(struct mtd_info *mtd, loff_t ofs, uint64_t len) in check_offs_len() argument
42 if (mtd_mod_by_eb(ofs, mtd)) { in check_offs_len()
48 if (mtd_mod_by_eb(len, mtd)) { in check_offs_len()
56 static int ram_erase(struct mtd_info *mtd, struct erase_info *instr) in ram_erase() argument
58 if (check_offs_len(mtd, instr->addr, instr->len)) in ram_erase()
60 memset((char *)mtd->priv + instr->addr, 0xff, instr->len); in ram_erase()
[all …]
H A Dpowernv_flash.c3 * OPAL PNOR flash MTD abstraction
16 #include <linux/mtd/mtd.h>
17 #include <linux/mtd/partitions.h>
26 * This driver creates the a Linux MTD abstraction for platform PNOR flash
31 struct mtd_info mtd; member
42 * Don't return -ERESTARTSYS if we can't get a token, the MTD core
46 static int powernv_flash_async_op(struct mtd_info *mtd, enum flash_op op, in powernv_flash_async_op() argument
49 struct powernv_flash *info = (struct powernv_flash *)mtd->priv; in powernv_flash_async_op()
50 struct device *dev = &mtd->dev; in powernv_flash_async_op()
87 * If we return the mtd core will free the in powernv_flash_async_op()
[all …]
H A Dsst25l.c21 #include <linux/mtd/mtd.h>
22 #include <linux/mtd/partitions.h>
49 struct mtd_info mtd; member
60 #define to_sst25l_flash(x) container_of(x, struct sst25l_flash, mtd)
166 static int sst25l_erase(struct mtd_info *mtd, struct erase_info *instr) in sst25l_erase() argument
168 struct sst25l_flash *flash = to_sst25l_flash(mtd); in sst25l_erase()
173 if ((uint32_t)instr->len % mtd->erasesize) in sst25l_erase()
176 if ((uint32_t)instr->addr % mtd->erasesize) in sst25l_erase()
198 addr += mtd->erasesize; in sst25l_erase()
206 static int sst25l_read(struct mtd_info *mtd, loff_t from, size_t len, in sst25l_read() argument
[all …]
/linux/drivers/mtd/tests/
H A Dstresstest.c5 * Test random reads, writes and erases on MTD device.
16 #include <linux/mtd/mtd.h>
26 MODULE_PARM_DESC(dev, "MTD device number to use");
32 static struct mtd_info *mtd; variable
73 if (offs >= mtd->erasesize) in do_read()
74 offs -= mtd->erasesize; in do_read()
75 if (offs + len > mtd->erasesize) in do_read()
76 len = mtd->erasesize - offs; in do_read()
78 addr = (loff_t)eb * mtd->erasesize + offs; in do_read()
79 return mtdtest_read(mtd, addr, len, readbuf); in do_read()
[all …]
H A Dspeedtest.c5 * Test read and write speed of a MTD device.
17 #include <linux/mtd/mtd.h>
26 MODULE_PARM_DESC(dev, "MTD device number to use");
33 static struct mtd_info *mtd; variable
47 loff_t addr = (loff_t)ebnum * mtd->erasesize; in multiblock_erase()
51 ei.len = mtd->erasesize * blocks; in multiblock_erase()
53 err = mtd_erase(mtd, &ei); in multiblock_erase()
65 loff_t addr = (loff_t)ebnum * mtd->erasesize; in write_eraseblock()
67 return mtdtest_write(mtd, addr, mtd->erasesize, iobuf); in write_eraseblock()
73 loff_t addr = (loff_t)ebnum * mtd->erasesize; in write_eraseblock_by_page()
[all …]
H A Dreadtest.c5 * Check MTD device read.
16 #include <linux/mtd/mtd.h>
24 MODULE_PARM_DESC(dev, "MTD device number to use");
26 static struct mtd_info *mtd; variable
38 loff_t addr = (loff_t)ebnum * mtd->erasesize; in read_eraseblock_by_page()
44 ret = mtdtest_read(mtd, addr, pgsize, buf); in read_eraseblock_by_page()
49 if (mtd->oobsize) { in read_eraseblock_by_page()
55 ops.ooblen = mtd->oobsize; in read_eraseblock_by_page()
60 ret = mtd_read_oob(mtd, addr, &ops); in read_eraseblock_by_page()
62 ops.oobretlen != mtd->oobsize) { in read_eraseblock_by_page()
[all …]
H A Dnandbiterrs.c35 #include <linux/mtd/mtd.h>
37 #include <linux/mtd/rawnand.h>
43 MODULE_PARM_DESC(dev, "MTD device number to use");
67 static struct mtd_info *mtd; /* MTD device */ variable
95 return mtdtest_write(mtd, offset, mtd->writesize, wbuffer); in write_page()
108 ops.len = mtd->writesize; in rewrite_page()
116 err = mtd_write_oob(mtd, offset, &ops); in rewrite_page()
117 if (err || ops.retlen != mtd->writesize) { in rewrite_page()
137 /* Saving last mtd stats */ in read_page()
138 memcpy(&oldstats, &mtd->ecc_stats, sizeof(oldstats)); in read_page()
[all …]
/linux/drivers/net/ethernet/sfc/siena/
H A Dmtd.c9 #include <linux/mtd/mtd.h>
16 #define to_efx_mtd_partition(mtd) \ argument
17 container_of(mtd, struct efx_mtd_partition, mtd)
19 /* MTD interface */
21 static int efx_mtd_erase(struct mtd_info *mtd, struct erase_info *erase) in efx_mtd_erase() argument
23 struct efx_nic *efx = mtd->priv; in efx_mtd_erase()
25 return efx->type->mtd_erase(mtd, erase->addr, erase->len); in efx_mtd_erase()
28 static void efx_mtd_sync(struct mtd_info *mtd) in efx_mtd_sync() argument
30 struct efx_mtd_partition *part = to_efx_mtd_partition(mtd); in efx_mtd_sync()
31 struct efx_nic *efx = mtd->priv; in efx_mtd_sync()
[all …]
/linux/drivers/net/ethernet/sfc/
H A Dmtd.c9 #include <linux/mtd/mtd.h>
16 #define to_efx_mtd_partition(mtd) \ argument
17 container_of(mtd, struct efx_mtd_partition, mtd)
19 /* MTD interface */
21 static int efx_mtd_erase(struct mtd_info *mtd, struct erase_info *erase) in efx_mtd_erase() argument
23 struct efx_nic *efx = mtd->priv; in efx_mtd_erase()
25 return efx->type->mtd_erase(mtd, erase->addr, erase->len); in efx_mtd_erase()
28 static void efx_mtd_sync(struct mtd_info *mtd) in efx_mtd_sync() argument
30 struct efx_mtd_partition *part = to_efx_mtd_partition(mtd); in efx_mtd_sync()
31 struct efx_nic *efx = mtd->priv; in efx_mtd_sync()
[all …]
/linux/drivers/net/ethernet/sfc/falcon/
H A Dmtd.c9 #include <linux/mtd/mtd.h>
16 #define to_ef4_mtd_partition(mtd) \ argument
17 container_of(mtd, struct ef4_mtd_partition, mtd)
19 /* MTD interface */
21 static int ef4_mtd_erase(struct mtd_info *mtd, struct erase_info *erase) in ef4_mtd_erase() argument
23 struct ef4_nic *efx = mtd->priv; in ef4_mtd_erase()
25 return efx->type->mtd_erase(mtd, erase->addr, erase->len); in ef4_mtd_erase()
28 static void ef4_mtd_sync(struct mtd_info *mtd) in ef4_mtd_sync() argument
30 struct ef4_mtd_partition *part = to_ef4_mtd_partition(mtd); in ef4_mtd_sync()
31 struct ef4_nic *efx = mtd->priv; in ef4_mtd_sync()
[all …]
/linux/drivers/mtd/maps/
H A Dplat-ram.c2 /* drivers/mtd/maps/plat-ram.c
20 #include <linux/mtd/mtd.h>
21 #include <linux/mtd/map.h>
22 #include <linux/mtd/partitions.h>
23 #include <linux/mtd/plat-ram.h>
27 /* private structure for each mtd platform ram device created */
31 struct mtd_info *mtd; member
77 if (info->mtd) { in platram_remove()
78 mtd_device_unregister(info->mtd); in platram_remove()
79 map_destroy(info->mtd); in platram_remove()
[all …]

12345678910>>...17