• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/arch/mips/brcm-boards/bcm947xx/

Lines Matching defs:mtd

38 #include <linux/mtd/mtd.h>
39 #include <linux/mtd/partitions.h>
483 struct mtd_info *mtd = NULL;
492 mtd = get_mtd_device_nm("crash");
494 if (!IS_ERR(mtd)) {
499 if (buf_len > mtd->size)
500 buf_len = mtd->size;
503 mtd->read(mtd, 0, sizeof(buf), &len, buf);
510 mtd->write(mtd, 0, buf_len, &len, buffer);
582 static uint lookup_flash_rootfs_offset(struct mtd_info *mtd, int *trx_off, size_t size, uint32 *trx_size)
605 if (mtd->read(mtd, off, sizeof(buf), &len, buf) ||
620 if (mtd->read(mtd, off, sizeof(buf), &len, buf) || len != sizeof(buf))
629 mtd->name, off / mtd->erasesize);
637 mtd->name, off / mtd->erasesize);
644 mtd->name, off / mtd->erasesize);
653 init_mtd_partitions(struct mtd_info *mtd, size_t size)
676 if (mtd->read(mtd, off, sizeof(buf), &len, buf) ||
698 mtd->name, off / BLOCK_SIZE);
706 mtd->name, off / BLOCK_SIZE);
713 mtd->name, off / BLOCK_SIZE);
720 mtd->name);
726 bcm947xx_parts[i].size = ROUNDUP(NVRAM_SPACE, mtd->erasesize);
733 bcm947xx_parts[i].size = (mtd->erasesize) * 1; /* 64K */
735 bcm947xx_parts[i].size = (mtd->erasesize) * 1; /* 64K */
737 bcm947xx_parts[i].size = (mtd->erasesize) * 1; /* 64K */
739 bcm947xx_parts[i].size = (mtd->erasesize) * 1; /* 64K */
774 lookup_nflash_rootfs_offset(hndnand_t *nfl, struct mtd_info *mtd, int offset, size_t size, uint32 *trx_size)
797 blocksize = mtd->erasesize;
807 "%s: nflash_read return %d\n", mtd->name, ret);
828 mtd->name, off / blocksize);
836 mtd->name, off / blocksize);
843 mtd->name, off / blocksize);
856 init_nflash_mtd_partitions(hndnand_t *nfl, struct mtd_info *mtd, size_t size)
890 if (bootsz > mtd->erasesize) {
895 bootsz = mtd->erasesize;
931 shift = lookup_nflash_rootfs_offset(nfl, mtd, offset,
961 shift = lookup_nflash_rootfs_offset(nfl, mtd, image_second_offset,