/external/u-boot/drivers/mtd/ |
mtd-uclass.c | 9 #include <mtd.h> 12 * Implement a MTD uclass which should include most flash drivers. 16 UCLASS_DRIVER(mtd) = { variable 18 .name = "mtd",
|
cfi_mtd.c | 13 #include <linux/mtd/mtd.h> 14 #include <linux/mtd/concat.h> 15 #include <mtd/cfi_flash.h> 23 static int cfi_mtd_erase(struct mtd_info *mtd, struct erase_info *instr) 25 flash_info_t *fi = mtd->priv; 67 static int cfi_mtd_read(struct mtd_info *mtd, loff_t from, size_t len, 70 flash_info_t *fi = mtd->priv; 79 static int cfi_mtd_write(struct mtd_info *mtd, loff_t to, size_t len, 82 flash_info_t *fi = mtd->priv 204 struct mtd_info *mtd; local [all...] |
mtdconcat.c | 3 * MTD device concatenation layer 25 #include <linux/mtd/mtd.h> 26 #include <linux/mtd/concat.h> 37 struct mtd_info mtd; member in struct:mtd_concat 50 * Given a pointer to the MTD object in the mtd_concat structure, 56 * MTD methods which look up the relevant subdevice, translate the 61 concat_read(struct mtd_info *mtd, loff_t from, size_t len, 64 struct mtd_concat *concat = CONCAT(mtd); 94 mtd->ecc_stats.failed++ [all...] |
altera_qspi.c | 12 #include <mtd.h> 58 static void altera_qspi_get_locked_range(struct mtd_info *mtd, loff_t *ofs, 63 struct mtd_info *mtd = info->mtd; local 69 altera_qspi_get_locked_range(mtd, &ofs, &len); 85 struct mtd_info *mtd = info->mtd; local 90 instr.mtd = mtd; 91 instr.addr = mtd->erasesize * s_first 105 struct mtd_info *mtd = info->mtd; local 308 struct mtd_info *mtd; local [all...] |
mtdpart.c | 3 * Simple MTD partitioning layer 26 #include <linux/mtd/mtd.h> 27 #include <linux/mtd/partitions.h> 42 struct mtd_info mtd; member in struct:mtd_part 49 * Given a pointer to the MTD object in the mtd_part structure, we can retrieve 80 * MTD methods which simply translate the effective address and pass through 84 static int part_read(struct mtd_info *mtd, loff_t from, size_t len, 87 struct mtd_part *part = PART(mtd); 95 mtd->ecc_stats.failed + [all...] |
/external/u-boot/env/ |
onenand.c | 20 #include <linux/mtd/mtd.h> 21 #include <linux/mtd/onenand.h> 24 #define ONENAND_ENV_SIZE(mtd) (ONENAND_MAX_ENV_SIZE - ENV_HEADER_SIZE) 30 struct mtd_info *mtd = &onenand_mtd; local 50 if (mtd->writesize) 52 mtd_read(mtd, env_addr, ONENAND_MAX_ENV_SIZE, 55 mtd->writesize = MAX_ONENAND_PAGESIZE; 69 struct mtd_info *mtd = &onenand_mtd; local 93 instr.mtd = mtd [all...] |
nand.c | 131 struct mtd_info *mtd; local 134 mtd = get_nand_dev_by_index(0); 135 if (!mtd) 138 blocksize = mtd->erasesize; 142 if (nand_block_isbad(mtd, offset)) { 146 if (nand_write(mtd, offset, &len, char_ptr)) 167 struct mtd_info *mtd; local 170 mtd = get_nand_dev_by_index(0); 171 if (!mtd) 175 if (nand_erase_opts(mtd, &location->erase_opts) 252 struct mtd_info *mtd; local 361 struct mtd_info *mtd = get_nand_dev_by_index(0); local [all...] |
/external/u-boot/fs/yaffs2/ |
yaffs_mtdif.c | 22 #include <linux/mtd/mtd.h> 25 #include <linux/mtd/rawnand.h> 65 struct mtd_info *mtd = (struct mtd_info *)(dev->driver_context); local 73 retval = mtd_write(mtd, addr, dev->data_bytes_per_chunk, 88 retval = mtd_write_oob(mtd, addr, &ops); 100 struct mtd_info *mtd = (struct mtd_info *)(dev->driver_context); local 109 retval = mtd_read(mtd, addr, dev->data_bytes_per_chunk, 123 retval = mtd_read_oob(mtd, addr, &ops); 136 struct mtd_info *mtd = (struct mtd_info *)(dev->driver_context) local [all...] |
yaffs_mtdif2.c | 14 /* mtd interface for YAFFS2 */ 25 #include <linux/mtd/mtd.h> 44 struct mtd_info *mtd = yaffs_dev_to_mtd(dev); local 86 retval = mtd_write_oob(mtd, addr, &ops); 97 struct mtd_info *mtd = yaffs_dev_to_mtd(dev); local 124 retval = mtd_read(mtd, addr, dev->param.total_bytes_per_chunk, 133 retval = mtd_read_oob(mtd, addr, &ops); 175 struct mtd_info *mtd = (struct mtd_info *)(dev->driver_context); local 182 mtd_block_markbad(mtd, 196 struct mtd_info *mtd = (struct mtd_info *)(dev->driver_context); local [all...] |
yaffs_uboot_glue.c | 163 struct mtd_info *mtd = NULL; local 169 mtd = get_nand_dev_by_index(flash_dev); 170 if (!mtd) { 190 end_block = lldiv(mtd->size, mtd->erasesize - 1); 197 chip = mtd_to_nand(mtd); 209 if (chk->driver_context == mtd && 223 dev->driver_context = mtd; 226 dev->param.chunks_per_block = mtd->erasesize / mtd->writesize [all...] |
/external/u-boot/board/isee/igep00x0/ |
igep00x0.c | 19 #include <linux/mtd/mtd.h> 20 #include <linux/mtd/rawnand.h> 21 #include <linux/mtd/onenand.h> 76 int onenand_board_init(struct mtd_info *mtd) 79 struct onenand_chip *this = mtd->priv; 245 struct mtd_info *mtd = get_mtd_device(NULL, 0); local 246 if (mtd) { 250 if (strncmp(mtd->name, "onenand0", 8) == 0) 252 snprintf(ids, sizeof(ids), "%s=%s", mtd->name, linux_name) [all...] |
/external/u-boot/drivers/dfu/ |
dfu_nand.c | 17 #include <linux/mtd/mtd.h> 27 struct mtd_info *mtd; local 39 mtd = get_nand_dev_by_index(nand_curr_device); 43 !mtd) { 49 ret = nand_read_skip_bad(mtd, start, &count, &actual, 61 ret = nand_erase_opts(mtd, &opts); 65 ret = nand_write_skip_bad(mtd, start, &count, &actual, 147 struct mtd_info *mtd = get_nand_dev_by_index(nand_curr_device); local 152 !mtd) { [all...] |
/external/u-boot/drivers/fastboot/ |
fb_nand.c | 13 #include <linux/mtd/mtd.h> 18 struct mtd_info *mtd; member in struct:fb_nand_sparse 33 struct mtd_info **mtd, 43 pr_err("Cannot initialize MTD partitions\n"); 62 *mtd = get_nand_dev_by_index(dev->id->num); 67 static int _fb_nand_erase(struct mtd_info *mtd, struct part_info *part) 80 ret = nand_erase_opts(mtd, &opts); 90 static int _fb_nand_write(struct mtd_info *mtd, struct part_info *part, 100 return nand_write_skip_bad(mtd, offset, &length, written 158 struct mtd_info *mtd = NULL; local 175 struct mtd_info *mtd = NULL; local 239 struct mtd_info *mtd = NULL; local [all...] |
/external/u-boot/drivers/mtd/nand/ |
am335x_spl_bch.c | 15 #include <linux/mtd/nand_ecc.h> 18 static struct mtd_info *mtd; variable in typeref:struct:mtd_info 32 struct nand_chip *this = mtd_to_nand(mtd); 34 void (*hwctrl)(struct mtd_info *mtd, int cmd, 37 while (!this->dev_ready(mtd)) 47 hwctrl(mtd, cmd, NAND_CTRL_CLE | NAND_CTRL_CHANGE); 50 hwctrl(mtd, NAND_CMD_NONE, NAND_NCE | NAND_CTRL_CHANGE); 58 while (!this->dev_ready(mtd)) 69 hwctrl(mtd, offs & 0xff, 71 hwctrl(mtd, (offs >> 8) & 0xff, NAND_CTRL_ALE); /* A[11:9] * [all...] |
nand.c | 11 #include <linux/mtd/concat.h> 39 int nand_mtd_to_devnum(struct mtd_info *mtd) 44 if (mtd && get_nand_dev_by_index(i) == mtd) 51 /* Register an initialized NAND mtd device with the U-Boot NAND command. */ 52 int nand_register(int devnum, struct mtd_info *mtd) 57 nand_info[devnum] = mtd; 60 mtd->name = dev_name[devnum]; 64 * Add MTD device so that we can reference it later 67 add_mtd_device(mtd); 82 struct mtd_info *mtd = nand_to_mtd(nand); local 109 struct mtd_info *mtd = get_nand_dev_by_index(i); local 116 struct mtd_info *mtd; local [all...] |
nand_spl_simple.c | 10 #include <linux/mtd/nand_ecc.h> 13 static struct mtd_info *mtd; variable in typeref:struct:mtd_info 28 struct nand_chip *this = mtd_to_nand(mtd); 31 while (!this->dev_ready(mtd)) 35 this->cmd_ctrl(mtd, cmd, NAND_CTRL_CLE | NAND_CTRL_CHANGE); 38 this->cmd_ctrl(mtd, offs, NAND_CTRL_ALE | NAND_CTRL_CHANGE); 39 this->cmd_ctrl(mtd, page_addr & 0xff, NAND_CTRL_ALE); /* A[16:9] */ 40 this->cmd_ctrl(mtd, (page_addr >> 8) & 0xff, 44 this->cmd_ctrl(mtd, (page_addr >> 16) & 0x0f, 48 this->cmd_ctrl(mtd, NAND_CMD_NONE, NAND_NCE | NAND_CTRL_CHANGE) [all...] |
mxs_nand_spl.c | 11 static struct mtd_info *mtd; variable in typeref:struct:mtd_info 14 static void mxs_nand_command(struct mtd_info *mtd, unsigned int command, 17 register struct nand_chip *chip = mtd_to_nand(mtd); 21 chip->cmd_ctrl(mtd, command, NAND_CLE); 25 chip->cmd_ctrl(mtd, column, NAND_ALE); 26 chip->cmd_ctrl(mtd, column >> 8, NAND_ALE); 29 chip->cmd_ctrl(mtd, page_addr, NAND_ALE); 30 chip->cmd_ctrl(mtd, page_addr >> 8, NAND_ALE); 33 chip->cmd_ctrl(mtd, page_addr >> 16, NAND_ALE); 35 chip->cmd_ctrl(mtd, NAND_CMD_NONE, 0) [all...] |
fsmc_nand.c | 15 #include <linux/mtd/nand_ecc.h> 16 #include <linux/mtd/fsmc_nand.h> 165 static void fsmc_nand_hwcontrol(struct mtd_info *mtd, int cmd, uint ctrl) 167 struct nand_chip *this = mtd_to_nand(mtd); 193 static int fsmc_bch8_correct_data(struct mtd_info *mtd, u_char *dat, 260 static int fsmc_read_hwecc(struct mtd_info *mtd, 312 void fsmc_enable_hwecc(struct mtd_info *mtd, int mode) 324 * @mtd: mtd info structure 336 static int fsmc_read_page_hwecc(struct mtd_info *mtd, struct nand_chip *chip 402 struct mtd_info *mtd; local 444 struct mtd_info *mtd; local [all...] |
/external/u-boot/board/logicpd/omap3som/ |
omap3logic.c | 28 #include <linux/mtd/rawnand.h> 239 struct mtd_info *mtd; local 241 mtd = get_nand_dev_by_index(dev); 242 nand_unlock(mtd, 0, mtd->size, 0);
|
/external/u-boot/cmd/ |
bootm.c | 31 #include <mtd/cfi_flash.h> 378 static int nand_imls_legacyimage(struct mtd_info *mtd, int nand_dev, 392 ret = nand_read_skip_bad(mtd, off, &len, NULL, mtd->size, imgdata); 418 static int nand_imls_fitimage(struct mtd_info *mtd, int nand_dev, loff_t off, 432 ret = nand_read_skip_bad(mtd, off, &len, NULL, mtd->size, imgdata); 453 struct mtd_info *mtd; local 467 mtd = get_nand_dev_by_index(nand_dev); 468 if (!mtd->name || !mtd->size [all...] |
jffs2.c | 16 * Parsing routines are based on driver/mtd/cmdline.c from the linux 2.4 32 * 'mtdids' - linux kernel mtd device id <-> u-boot device id mapping 36 * <idmap> := <dev-id>=<mtd-id> 38 * <dev-num> := mtd device number, 0... 39 * <mtd-id> := unique device tag used by linux kernel to find mtd device (mtd->name) 44 * mtdparts=mtdparts=<mtd-def>[;<mtd-def>...] 46 * <mtd-def> := <mtd-id>:<part-def>[,<part-def>... 168 struct mtd_info *mtd = get_nand_dev_by_index(num); local 245 struct mtd_info *mtd; local 296 struct mtd_info *mtd; local [all...] |
onenand.c | 17 #include <linux/mtd/mtd.h> 18 #include <linux/mtd/onenand.h> 22 static struct mtd_info *mtd; variable in typeref:struct:mtd_info 45 *size = mtd->size - *off; 48 if ((*off + *size) > mtd->size) { 49 printf("total chip size (0x%llx) exceeded!\n", mtd->size); 53 if (*size == mtd->size) 64 struct onenand_chip *this = mtd->priv; 79 ret = mtd_block_isbad(mtd, ofs) [all...] |
nand.c | 23 #include <linux/mtd/mtd.h> 41 static int nand_dump(struct mtd_info *mtd, ulong off, int only_oob, 50 off = last + mtd->writesize; 54 datbuf = memalign(ARCH_DMA_MINALIGN, mtd->writesize); 60 oobbuf = memalign(ARCH_DMA_MINALIGN, mtd->oobsize); 66 off &= ~(mtd->writesize - 1); 72 ops.len = mtd->writesize; 73 ops.ooblen = mtd->oobsize; 75 i = mtd_read_oob(mtd, addr, &ops) 118 struct mtd_info *mtd = get_nand_dev_by_index(dev); local 191 struct mtd_info *mtd = get_nand_dev_by_index(0); local 287 struct mtd_info *mtd; local 357 struct mtd_info *mtd = get_nand_dev_by_index(dev); local 380 struct mtd_info *mtd; local 937 struct mtd_info *mtd; local [all...] |
/external/u-boot/common/ |
splash_source.c | 49 struct mtd_info *mtd = get_nand_dev_by_index(nand_curr_device); local 50 return nand_read_skip_bad(mtd, offset, 52 mtd->size,
|
/external/u-boot/drivers/mtd/ubi/ |
io.c | 13 * underlying MTD devices. It also implements handy functions for reading and 34 * in case of NAND flash it is a NAND page, etc. This is reported by MTD in the 35 * @ubi->mtd->writesize field. But as an exception, UBI admits of using another 53 * A: because when writing a sub-page, MTD still writes a full 2K page but the 113 * o %-EBADMSG if the MTD subsystem reported about data integrity problems, for 160 err = mtd_read(ubi->mtd, addr, len, &read, buf); 277 err = mtd_write(ubi->mtd, addr, len, &written, buf); 305 * erase_callback - MTD erasure call-back. 306 * @ei: MTD erase information object. 308 * Note, even though MTD erase interface is asynchronous, all the curren 605 struct mtd_info *mtd = ubi->mtd; local 635 struct mtd_info *mtd = ubi->mtd; local [all...] |