mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-23 05:56:14 -04:00
[MTD] Introduce writesize
At least two flashes exists that have the concept of a minimum write unit, similar to NAND pages, but no other NAND characteristics. Therefore, rename the minimum write unit to "writesize" for all flashes, including NAND. Signed-off-by: Joern Engel <joern@wh.fh-wedel.de>
This commit is contained in:
@@ -545,12 +545,12 @@ static int cfi_intelext_partition_fixup(struct mtd_info *mtd,
|
||||
if (extp->MinorVersion >= '4') {
|
||||
struct cfi_intelext_programming_regioninfo *prinfo;
|
||||
prinfo = (struct cfi_intelext_programming_regioninfo *)&extp->extra[offs];
|
||||
MTD_PROGREGION_SIZE(mtd) = 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_PROGRAM_REGIONS;
|
||||
printk(KERN_DEBUG "%s: program region size/ctrl_valid/ctrl_inval = %d/%d/%d\n",
|
||||
map->name, MTD_PROGREGION_SIZE(mtd),
|
||||
map->name, mtd->writesize,
|
||||
MTD_PROGREGION_CTRLMODE_VALID(mtd),
|
||||
MTD_PROGREGION_CTRLMODE_INVALID(mtd));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user