aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/chips
diff options
context:
space:
mode:
authorJoern Engel <joern@wh.fh-wedel.de>2006-05-22 17:18:29 -0400
committerJoern Engel <joern@wh.fh-wedel.de>2006-05-22 17:18:29 -0400
commit5fa433942ba4e399f7e28764c9db4ade89e91d40 (patch)
tree29a2691729645bf27fd2d7d8d61a5c720c6569c1 /drivers/mtd/chips
parentc8b229de2b05c2b3e8d282ce260935a88ac030ca (diff)
[MTD] Introduce MTD_BIT_WRITEABLE
o Add a flag MTD_BIT_WRITEABLE for devices that allow single bits to be cleared. o Replace MTD_PROGRAM_REGIONS with a cleared MTD_BIT_WRITEABLE flag for STMicro and Intel Sibley flashes with internal ECC. Those flashes disallow clearing of single bits, unlike regular NOR flashes, so the new flag models their behaviour better. o Remove MTD_ECC. After the STMicro/Sibley merge, this flag is only set and never checked. Signed-off-by: Joern Engel <joern@wh.fh-wedel.de>
Diffstat (limited to 'drivers/mtd/chips')
-rw-r--r--drivers/mtd/chips/cfi_cmdset_0001.c2
-rw-r--r--drivers/mtd/chips/cfi_cmdset_0020.c3
2 files changed, 2 insertions, 3 deletions
diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c
index 35c3689bc5c1..0d435814aaa1 100644
--- a/drivers/mtd/chips/cfi_cmdset_0001.c
+++ b/drivers/mtd/chips/cfi_cmdset_0001.c
@@ -548,7 +548,7 @@ static int cfi_intelext_partition_fixup(struct mtd_info *mtd,
548 mtd->writesize = cfi->interleave << prinfo->ProgRegShift; 548 mtd->writesize = cfi->interleave << prinfo->ProgRegShift;
549 MTD_PROGREGION_CTRLMODE_VALID(mtd) = cfi->interleave * prinfo->ControlValid; 549 MTD_PROGREGION_CTRLMODE_VALID(mtd) = cfi->interleave * prinfo->ControlValid;
550 MTD_PROGREGION_CTRLMODE_INVALID(mtd) = cfi->interleave * prinfo->ControlInvalid; 550 MTD_PROGREGION_CTRLMODE_INVALID(mtd) = cfi->interleave * prinfo->ControlInvalid;
551 mtd->flags |= MTD_PROGRAM_REGIONS; 551 mtd->flags &= ~MTD_BIT_WRITEABLE;
552 printk(KERN_DEBUG "%s: program region size/ctrl_valid/ctrl_inval = %d/%d/%d\n", 552 printk(KERN_DEBUG "%s: program region size/ctrl_valid/ctrl_inval = %d/%d/%d\n",
553 map->name, mtd->writesize, 553 map->name, mtd->writesize,
554 MTD_PROGREGION_CTRLMODE_VALID(mtd), 554 MTD_PROGREGION_CTRLMODE_VALID(mtd),
diff --git a/drivers/mtd/chips/cfi_cmdset_0020.c b/drivers/mtd/chips/cfi_cmdset_0020.c
index d745285fccf8..fae70a5db540 100644
--- a/drivers/mtd/chips/cfi_cmdset_0020.c
+++ b/drivers/mtd/chips/cfi_cmdset_0020.c
@@ -238,8 +238,7 @@ static struct mtd_info *cfi_staa_setup(struct map_info *map)
238 mtd->unlock = cfi_staa_unlock; 238 mtd->unlock = cfi_staa_unlock;
239 mtd->suspend = cfi_staa_suspend; 239 mtd->suspend = cfi_staa_suspend;
240 mtd->resume = cfi_staa_resume; 240 mtd->resume = cfi_staa_resume;
241 mtd->flags = MTD_CAP_NORFLASH; 241 mtd->flags = MTD_CAP_NORFLASH & ~MTD_BIT_WRITEABLE;
242 mtd->flags |= MTD_PROGRAM_REGIONS; /* FIXME: Not all STMicro flashes have this */
243 mtd->writesize = 8; /* FIXME: Should be 0 for STMicro flashes w/out ECC */ 242 mtd->writesize = 8; /* FIXME: Should be 0 for STMicro flashes w/out ECC */
244 map->fldrv = &cfi_staa_chipdrv; 243 map->fldrv = &cfi_staa_chipdrv;
245 __module_get(THIS_MODULE); 244 __module_get(THIS_MODULE);