Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 49353617 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* git://git.infradead.org/mtd-2.6: (49 commits)
  [MTD] [NAND] S3C2412 fix hw ecc
  [MTD] [NAND] Work around false compiler warning in CAFÉ driver
  [JFFS2] printk warning fixes
  [MTD] [MAPS] ichxrom warning fix
  [MTD] [MAPS] amd76xrom warning fix
  [MTD] [MAPS] esb2rom warning fixes
  [MTD] [MAPS] ck804xrom warning fix
  [MTD] [MAPS] netsc520 warning fix
  [MTD] [MAPS] sc520cdp warning fix
  [MTD] [ONENAND] onenand_base warning fix
  [MTD] [NAND] eXcite nand flash driver
  [MTD] Improve heuristic for detecting wrong-endian RedBoot partition table
  [MTD] Fix RedBoot partition parsing regression harder.
  [MTD] [NAND] S3C2410: Hardware ECC correction code
  [JFFS2] Use MTD_OOB_AUTO to automatically place cleanmarker on NAND
  [MTD] Clarify OOB-operation interface comments
  [MTD] remove unused ecctype,eccsize fields from struct mtd_info
  [MTD] [NOR] Intel: remove ugly PROGREGION macros
  [MTD] [NOR] STAA: use writesize instead off eccsize to represent ECC block
  [MTD] OneNAND: Invalidate bufferRAM after erase
  ...
parents 2874b391 4f659923
Loading
Loading
Loading
Loading
+19 −7
Original line number Original line Diff line number Diff line
@@ -397,9 +397,23 @@ struct mtd_info *cfi_cmdset_0001(struct map_info *map, int primary)
	cfi_fixup(mtd, fixup_table);
	cfi_fixup(mtd, fixup_table);


	for (i=0; i< cfi->numchips; i++) {
	for (i=0; i< cfi->numchips; i++) {
		cfi->chips[i].word_write_time = 1<<cfi->cfiq->WordWriteTimeoutTyp;
		if (cfi->cfiq->WordWriteTimeoutTyp)
		cfi->chips[i].buffer_write_time = 1<<cfi->cfiq->BufWriteTimeoutTyp;
			cfi->chips[i].word_write_time =
		cfi->chips[i].erase_time = 1000<<cfi->cfiq->BlockEraseTimeoutTyp;
				1<<cfi->cfiq->WordWriteTimeoutTyp;
		else
			cfi->chips[i].word_write_time = 50000;

		if (cfi->cfiq->BufWriteTimeoutTyp)
			cfi->chips[i].buffer_write_time =
				1<<cfi->cfiq->BufWriteTimeoutTyp;
		/* No default; if it isn't specified, we won't use it */

		if (cfi->cfiq->BlockEraseTimeoutTyp)
			cfi->chips[i].erase_time =
				1000<<cfi->cfiq->BlockEraseTimeoutTyp;
		else
			cfi->chips[i].erase_time = 2000000;

		cfi->chips[i].ref_point_counter = 0;
		cfi->chips[i].ref_point_counter = 0;
		init_waitqueue_head(&(cfi->chips[i].wq));
		init_waitqueue_head(&(cfi->chips[i].wq));
	}
	}
@@ -546,13 +560,11 @@ static int cfi_intelext_partition_fixup(struct mtd_info *mtd,
			struct cfi_intelext_programming_regioninfo *prinfo;
			struct cfi_intelext_programming_regioninfo *prinfo;
			prinfo = (struct cfi_intelext_programming_regioninfo *)&extp->extra[offs];
			prinfo = (struct cfi_intelext_programming_regioninfo *)&extp->extra[offs];
			mtd->writesize = cfi->interleave << prinfo->ProgRegShift;
			mtd->writesize = cfi->interleave << prinfo->ProgRegShift;
			MTD_PROGREGION_CTRLMODE_VALID(mtd) = cfi->interleave * prinfo->ControlValid;
			MTD_PROGREGION_CTRLMODE_INVALID(mtd) = cfi->interleave * prinfo->ControlInvalid;
			mtd->flags &= ~MTD_BIT_WRITEABLE;
			mtd->flags &= ~MTD_BIT_WRITEABLE;
			printk(KERN_DEBUG "%s: program region size/ctrl_valid/ctrl_inval = %d/%d/%d\n",
			printk(KERN_DEBUG "%s: program region size/ctrl_valid/ctrl_inval = %d/%d/%d\n",
			       map->name, mtd->writesize,
			       map->name, mtd->writesize,
			       MTD_PROGREGION_CTRLMODE_VALID(mtd),
			       cfi->interleave * prinfo->ControlValid,
			       MTD_PROGREGION_CTRLMODE_INVALID(mtd));
			       cfi->interleave * prinfo->ControlInvalid);
		}
		}


		/*
		/*
+1 −1
Original line number Original line Diff line number Diff line
@@ -662,7 +662,7 @@ static int cfi_staa_write_buffers (struct mtd_info *mtd, loff_t to,
 * a small buffer for this.
 * a small buffer for this.
 * XXX: If the buffer size is not a multiple of 2, this will break
 * XXX: If the buffer size is not a multiple of 2, this will break
 */
 */
#define ECCBUF_SIZE (mtd->eccsize)
#define ECCBUF_SIZE (mtd->writesize)
#define ECCBUF_DIV(x) ((x) & ~(ECCBUF_SIZE - 1))
#define ECCBUF_DIV(x) ((x) & ~(ECCBUF_SIZE - 1))
#define ECCBUF_MOD(x) ((x) &  (ECCBUF_SIZE - 1))
#define ECCBUF_MOD(x) ((x) &  (ECCBUF_SIZE - 1))
static int
static int
+0 −1
Original line number Original line Diff line number Diff line
@@ -569,7 +569,6 @@ void DoC2k_init(struct mtd_info *mtd)


	mtd->type = MTD_NANDFLASH;
	mtd->type = MTD_NANDFLASH;
	mtd->flags = MTD_CAP_NANDFLASH;
	mtd->flags = MTD_CAP_NANDFLASH;
	mtd->ecctype = MTD_ECC_RS_DiskOnChip;
	mtd->size = 0;
	mtd->size = 0;
	mtd->erasesize = 0;
	mtd->erasesize = 0;
	mtd->writesize = 512;
	mtd->writesize = 512;
+0 −1
Original line number Original line Diff line number Diff line
@@ -348,7 +348,6 @@ void DoCMil_init(struct mtd_info *mtd)


	mtd->type = MTD_NANDFLASH;
	mtd->type = MTD_NANDFLASH;
	mtd->flags = MTD_CAP_NANDFLASH;
	mtd->flags = MTD_CAP_NANDFLASH;
	mtd->ecctype = MTD_ECC_RS_DiskOnChip;
	mtd->size = 0;
	mtd->size = 0;


	/* FIXME: erase size is not always 8KiB */
	/* FIXME: erase size is not always 8KiB */
+0 −1
Original line number Original line Diff line number Diff line
@@ -472,7 +472,6 @@ void DoCMilPlus_init(struct mtd_info *mtd)


	mtd->type = MTD_NANDFLASH;
	mtd->type = MTD_NANDFLASH;
	mtd->flags = MTD_CAP_NANDFLASH;
	mtd->flags = MTD_CAP_NANDFLASH;
	mtd->ecctype = MTD_ECC_RS_DiskOnChip;
	mtd->size = 0;
	mtd->size = 0;


	mtd->erasesize = 0;
	mtd->erasesize = 0;
Loading