Searched refs:mtd (Results 1 - 25 of 131) sorted by relevance

123456

/asus-wl-520gu-7.0.1.45/src/router/rc/
H A Dmtd.h12 * $Id: mtd.h,v 1.1.1.1 2008/10/15 03:28:48 james26_jang Exp $
20 * @param mtd path to or partition name of MTD device
24 extern int mtd_open(const char *mtd, int flags);
28 * @param mtd path to or partition name of MTD device
31 extern int mtd_erase(const char *mtd);
36 * @param mtd path to or partition name of MTD device
39 extern int mtd_write(const char *path, const char *mtd);
/asus-wl-520gu-7.0.1.45/src/router/rc.orig/
H A Dmtd.h12 * $Id: mtd.h,v 1.1.1.1 2008/10/15 03:28:48 james26_jang Exp $
20 * @param mtd path to or partition name of MTD device
24 extern int mtd_open(const char *mtd, int flags);
28 * @param mtd path to or partition name of MTD device
31 extern int mtd_erase(const char *mtd);
36 * @param mtd path to or partition name of MTD device
39 extern int mtd_write(const char *path, const char *mtd);
/asus-wl-520gu-7.0.1.45/src/linux/linux/drivers/mtd/chips/
H A Dmap_rom.c16 #include <linux/mtd/map.h>
31 struct mtd_info *mtd; local
33 mtd = kmalloc(sizeof(*mtd), GFP_KERNEL);
34 if (!mtd)
37 memset(mtd, 0, sizeof(*mtd));
40 mtd->priv = map;
41 mtd->name = map->name;
42 mtd
57 maprom_read(struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf) argument
66 maprom_nop(struct mtd_info *mtd) argument
71 maprom_write(struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf) argument
[all...]
H A Dmap_absent.c27 #include <linux/mtd/map.h>
47 struct mtd_info *mtd; local
49 mtd = kmalloc(sizeof(*mtd), GFP_KERNEL);
50 if (!mtd) {
54 memset(mtd, 0, sizeof(*mtd));
57 mtd->priv = map;
58 mtd->name = map->name;
59 mtd
73 map_absent_read(struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf) argument
79 map_absent_write(struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf) argument
85 map_absent_erase(struct mtd_info *mtd, struct erase_info *instr) argument
90 map_absent_sync(struct mtd_info *mtd) argument
95 map_absent_destroy(struct mtd_info *mtd) argument
[all...]
H A Dmap_ram.c15 #include <linux/mtd/map.h>
33 struct mtd_info *mtd; local
38 mtd = kmalloc(sizeof(*mtd), GFP_KERNEL);
39 if (!mtd)
42 memset(mtd, 0, sizeof(*mtd));
45 mtd->priv = map;
46 mtd->name = map->name;
47 mtd
64 mapram_read(struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf) argument
73 mapram_write(struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf) argument
82 mapram_erase(struct mtd_info *mtd, struct erase_info *instr) argument
98 mapram_nop(struct mtd_info *mtd) argument
[all...]
/asus-wl-520gu-7.0.1.45/src/router/iproute2/reference/linux/mtd/
H A Dmtd.h2 /* $Id: mtd.h,v 1.1.1.1 2008/10/15 03:29:28 james26_jang Exp $ */
12 #include <linux/mtd/compatmac.h>
116 struct mtd_info *mtd; member in struct:erase_info
165 int (*erase) (struct mtd_info *mtd, struct erase_info *instr);
168 int (*point) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char **mtdbuf);
171 void (*unpoint) (struct mtd_info *mtd, u_char * addr);
174 int (*read) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf);
175 int (*write) (struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf);
177 int (*read_ecc) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf, u_char *eccbuf);
178 int (*write_ecc) (struct mtd_info *mtd, loff_
213 get_mtd_device(struct mtd_info *mtd, int num) argument
225 put_mtd_device(struct mtd_info *mtd) argument
[all...]
H A Dgen_probe.h10 #include <linux/mtd/flashchip.h>
11 #include <linux/mtd/map.h>
12 #include <linux/mtd/cfi.h>
H A Dconcat.h20 void mtd_concat_destroy(struct mtd_info *mtd);
H A Dmap.h10 #include <linux/mtd/mtd.h>
19 fill in the mtd->module with your own module address, and register
22 The mtd->priv field will point to the struct map_info, and any further
24 mtd->priv->fldrv_priv field. This allows the map driver to get at
78 static inline void map_destroy(struct mtd_info *mtd) argument
80 struct map_info *map = mtd->priv;
83 map->fldrv->destroy(mtd);
88 kfree(mtd);
/asus-wl-520gu-7.0.1.45/src/linux/linux/include/linux/mtd/
H A Dmtd.h2 /* $Id: mtd.h,v 1.1.1.1 2008/10/15 03:27:31 james26_jang Exp $ */
12 #include <linux/mtd/compatmac.h>
116 struct mtd_info *mtd; member in struct:erase_info
165 int (*erase) (struct mtd_info *mtd, struct erase_info *instr);
168 int (*point) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char **mtdbuf);
171 void (*unpoint) (struct mtd_info *mtd, u_char * addr);
174 int (*read) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf);
175 int (*write) (struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf);
177 int (*read_ecc) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf, u_char *eccbuf);
178 int (*write_ecc) (struct mtd_info *mtd, loff_
213 get_mtd_device(struct mtd_info *mtd, int num) argument
225 put_mtd_device(struct mtd_info *mtd) argument
[all...]
H A Dgen_probe.h10 #include <linux/mtd/flashchip.h>
11 #include <linux/mtd/map.h>
12 #include <linux/mtd/cfi.h>
H A Dconcat.h20 void mtd_concat_destroy(struct mtd_info *mtd);
H A Dmap.h10 #include <linux/mtd/mtd.h>
19 fill in the mtd->module with your own module address, and register
22 The mtd->priv field will point to the struct map_info, and any further
24 mtd->priv->fldrv_priv field. This allows the map driver to get at
78 static inline void map_destroy(struct mtd_info *mtd) argument
80 struct map_info *map = mtd->priv;
83 map->fldrv->destroy(mtd);
88 kfree(mtd);
/asus-wl-520gu-7.0.1.45/src/linux/linux/drivers/mtd/
H A Dmtdpart.c21 #include <linux/mtd/mtd.h>
22 #include <linux/mtd/partitions.h>
30 struct mtd_info mtd; member in struct:mtd_part
50 static int part_read (struct mtd_info *mtd, loff_t from, size_t len, argument
53 struct mtd_part *part = PART(mtd);
54 if (from >= mtd->size)
56 else if (from + len > mtd->size)
57 len = mtd->size - from;
62 static int part_read_oob (struct mtd_info *mtd, loff_ argument
74 part_write(struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf) argument
88 part_write_oob(struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf) argument
102 part_writev(struct mtd_info *mtd, const struct iovec *vecs, unsigned long count, loff_t to, size_t *retlen) argument
112 part_readv(struct mtd_info *mtd, struct iovec *vecs, unsigned long count, loff_t from, size_t *retlen) argument
120 part_erase(struct mtd_info *mtd, struct erase_info *instr) argument
131 part_lock(struct mtd_info *mtd, loff_t ofs, size_t len) argument
139 part_unlock(struct mtd_info *mtd, loff_t ofs, size_t len) argument
147 part_sync(struct mtd_info *mtd) argument
153 part_suspend(struct mtd_info *mtd) argument
159 part_resume(struct mtd_info *mtd) argument
[all...]
H A Dmtdchar.c12 #include <linux/mtd/mtd.h>
17 static void mtd_notify_add(struct mtd_info* mtd);
18 static void mtd_notify_remove(struct mtd_info* mtd);
32 struct mtd_info *mtd=(struct mtd_info *)file->private_data; local
45 file->f_pos =mtd->size + offset;
53 else if (file->f_pos >= mtd->size)
54 file->f_pos = mtd->size - 1;
65 struct mtd_info *mtd; local
76 mtd
101 struct mtd_info *mtd; local
119 struct mtd_info *mtd = (struct mtd_info *)file->private_data; local
171 struct mtd_info *mtd = (struct mtd_info *)file->private_data; local
220 struct mtd_info *mtd = (struct mtd_info *)file->private_data; local
431 mtd_notify_add(struct mtd_info* mtd) argument
451 mtd_notify_remove(struct mtd_info* mtd) argument
[all...]
H A Dafs.c3 drivers/mtd/afs.c: ARM Flash Layout/Partitioning
35 #include <linux/mtd/mtd.h>
36 #include <linux/mtd/map.h>
37 #include <linux/mtd/partitions.h>
61 afs_read_footer(struct mtd_info *mtd, u_int *img_start, u_int *iis_start, argument
65 u_int ptr = off + mtd->erasesize - sizeof(fs);
69 ret = mtd->read(mtd, ptr, sizeof(fs), &sz, (u_char *) &fs);
74 printk(KERN_ERR "AFS: mtd rea
112 afs_read_iis(struct mtd_info *mtd, struct image_info_struct *iis, u_int ptr) argument
128 parse_afs_partitions(struct mtd_info *mtd, struct mtd_partition **pparts) argument
[all...]
H A Dmtdblock_ro.c14 #include <linux/mtd/mtd.h>
15 #include <linux/mtd/compatmac.h>
37 static void mtd_notify_add(struct mtd_info* mtd);
38 static void mtd_notify_remove(struct mtd_info* mtd);
49 struct mtd_info *mtd; /* Locked */ member in struct:mtdblk_dev
60 struct mtd_info *mtd; local
72 mtd = get_mtd_device(NULL, dev);
73 if (!mtd)
75 if (MTD_ABSENT == mtd
321 mtd_notify_add(struct mtd_info* mtd) argument
335 mtd_notify_remove(struct mtd_info* mtd) argument
[all...]
H A Dmtdconcat.c16 #include <linux/mtd/mtd.h>
17 #include <linux/mtd/concat.h>
26 struct mtd_info mtd; member in struct:mtd_concat
51 static int concat_read (struct mtd_info *mtd, loff_t from, size_t len, argument
54 struct mtd_concat *concat = CONCAT(mtd);
95 static int concat_write (struct mtd_info *mtd, loff_t to, size_t len, argument
98 struct mtd_concat *concat = CONCAT(mtd);
102 if (!(mtd->flags & MTD_WRITEABLE))
150 static int concat_dev_erase(struct mtd_info *mtd, struc argument
180 concat_erase(struct mtd_info *mtd, struct erase_info *instr) argument
309 concat_lock(struct mtd_info *mtd, loff_t ofs, size_t len) argument
350 concat_unlock(struct mtd_info *mtd, loff_t ofs, size_t len) argument
391 concat_sync(struct mtd_info *mtd) argument
403 concat_suspend(struct mtd_info *mtd) argument
417 concat_resume(struct mtd_info *mtd) argument
653 mtd_concat_destroy(struct mtd_info *mtd) argument
[all...]
H A Dmtdblock.c14 #include <linux/mtd/mtd.h>
15 #include <linux/mtd/compatmac.h>
37 static void mtd_notify_add(struct mtd_info* mtd);
38 static void mtd_notify_remove(struct mtd_info* mtd);
49 struct mtd_info *mtd; /* Locked */ member in struct:mtdblk_dev
87 static int erase_write (struct mtd_info *mtd, unsigned long pos, argument
101 erase.mtd = mtd;
110 ret = MTD_ERASE(mtd,
138 struct mtd_info *mtd = mtdblk->mtd; local
168 struct mtd_info *mtd = mtdblk->mtd; local
237 struct mtd_info *mtd = mtdblk->mtd; local
285 struct mtd_info *mtd; local
599 mtd_notify_add(struct mtd_info* mtd) argument
613 mtd_notify_remove(struct mtd_info* mtd) argument
[all...]
/asus-wl-520gu-7.0.1.45/src/linux/linux/drivers/mtd/devices/
H A Dsflash.c19 #include <linux/mtd/compatmac.h>
20 #include <linux/mtd/mtd.h>
21 #include <linux/mtd/partitions.h>
38 extern struct mtd_partition * init_mtd_partitions(struct mtd_info *mtd, size_t size);
45 struct mtd_info mtd; member in struct:sflash_mtd
79 sflash_mtd_read(struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf) argument
81 struct sflash_mtd *sflash = (struct sflash_mtd *) mtd->priv;
87 if ((from + len) > mtd->size)
110 sflash_mtd_write(struct mtd_info *mtd, loff_ argument
143 sflash_mtd_erase(struct mtd_info *mtd, struct erase_info *erase) argument
[all...]
H A Dmtdram.c2 * mtdram - a test mtd device
16 #include <linux/mtd/compatmac.h>
17 #include <linux/mtd/mtd.h>
40 // We could store these in the mtd structure, but we only support 1 device..
45 ram_erase(struct mtd_info *mtd, struct erase_info *instr) argument
48 if (instr->addr + instr->len > mtd->size) {
49 DEBUG(MTD_DEBUG_LEVEL1, "ram_erase() out of bounds (%ld > %ld)\n", (long)(instr->addr + instr->len), (long)mtd->size);
53 memset((char *)mtd->priv + instr->addr, 0xff, instr->len);
62 static int ram_point (struct mtd_info *mtd, loff_ argument
72 ram_unpoint(struct mtd_info *mtd, u_char *addr) argument
77 ram_read(struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf) argument
92 ram_write(struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf) argument
[all...]
H A Dlart.c22 * - http://www.linux-mtd.infradead.org/tech/
47 #include <linux/mtd/mtd.h>
49 #include <linux/mtd/partitions.h>
367 static int flash_erase (struct mtd_info *mtd,struct erase_info *instr) argument
377 if (instr->addr + instr->len > mtd->size) return (-EINVAL);
388 for (i = 0; i < mtd->numeraseregions && instr->addr >= mtd->eraseregions[i].offset; i++) ;
397 if (instr->addr & (mtd->eraseregions[i].erasesize - 1)) return (-EINVAL);
409 for (; i < mtd
441 flash_read(struct mtd_info *mtd,loff_t from,size_t len,size_t *retlen,u_char *buf) argument
520 flash_write(struct mtd_info *mtd,loff_t to,size_t len,size_t *retlen,const u_char *buf) argument
585 static struct mtd_info mtd; variable in typeref:struct:mtd_info
[all...]
H A Dpmc551.c27 #include <linux/mtd/mtd.h>
28 #include <linux/mtd/pmc551.h>
29 #include <linux/mtd/compatmac.h>
39 static int pmc551_erase (struct mtd_info *mtd, struct erase_info *instr) argument
41 struct mypriv *priv = (struct mypriv *)mtd->priv;
55 if ( end > mtd->size ) {
57 printk(KERN_DEBUG "pmc551_erase() out of bounds (%ld > %ld)\n", (long)end, (long)mtd->size);
67 pmc551_point (mtd, instr->addr, instr->len, &retlen, &ptr);
69 if ( soff_hi == eoff_hi || mtd
104 pmc551_point(struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char **mtdbuf) argument
137 pmc551_unpoint(struct mtd_info *mtd, u_char *addr) argument
145 pmc551_read(struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf) argument
207 pmc551_write(struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf) argument
[all...]
H A Dms02-nv.c14 #include <linux/mtd/mtd.h>
57 static int ms02nv_read(struct mtd_info *mtd, loff_t from, argument
60 struct ms02nv_private *mp = (struct ms02nv_private *)mtd->priv;
62 if (from + len > mtd->size)
71 static int ms02nv_write(struct mtd_info *mtd, loff_t to, argument
74 struct ms02nv_private *mp = (struct ms02nv_private *)mtd->priv;
76 if (to + len > mtd->size)
118 struct mtd_info *mtd; local
154 mtd
265 struct mtd_info *mtd = root_ms02nv_mtd; local
[all...]
/asus-wl-520gu-7.0.1.45/src/linux/linux/drivers/mtd/nand/
H A Dnand.c2 * drivers/mtd/nand.c
21 #include <linux/mtd/mtd.h>
22 #include <linux/mtd/nand.h>
23 #include <linux/mtd/nand_ids.h>
28 #include <linux/mtd/nand_ecc.h>
35 ((struct nand_chip *) mtd->priv)->CTRL_ADDR)
37 nand_command(mtd, NAND_CMD_RESET, -1, -1); \
44 static int nand_read (struct mtd_info *mtd, loff_t from, size_t len,
46 static int nand_read_ecc (struct mtd_info *mtd, loff_
65 nand_command(struct mtd_info *mtd, unsigned command, int column, int page_addr) argument
131 nand_read(struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf) argument
146 nand_read_ecc(struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf, u_char *ecc_code) argument
339 nand_read_oob(struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf) argument
424 nand_write(struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf) argument
439 nand_write_ecc(struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf, u_char *ecc_code) argument
697 nand_write_oob(struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf) argument
835 nand_writev(struct mtd_info *mtd, const struct iovec *vecs, unsigned long count, loff_t to, size_t *retlen) argument
1095 nand_erase(struct mtd_info *mtd, struct erase_info *instr) argument
1244 nand_sync(struct mtd_info *mtd) argument
1289 nand_scan(struct mtd_info *mtd) argument
[all...]

Completed in 286 milliseconds

123456