diff options
-rw-r--r-- | drivers/mtd/chips/cfi_cmdset_0001.c | 6 | ||||
-rw-r--r-- | include/linux/mtd/mtd.h | 10 |
2 files changed, 2 insertions, 14 deletions
diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c index d40262518b25..f334959a335b 100644 --- a/drivers/mtd/chips/cfi_cmdset_0001.c +++ b/drivers/mtd/chips/cfi_cmdset_0001.c | |||
@@ -560,13 +560,11 @@ static int cfi_intelext_partition_fixup(struct mtd_info *mtd, | |||
560 | struct cfi_intelext_programming_regioninfo *prinfo; | 560 | struct cfi_intelext_programming_regioninfo *prinfo; |
561 | prinfo = (struct cfi_intelext_programming_regioninfo *)&extp->extra[offs]; | 561 | prinfo = (struct cfi_intelext_programming_regioninfo *)&extp->extra[offs]; |
562 | mtd->writesize = cfi->interleave << prinfo->ProgRegShift; | 562 | mtd->writesize = cfi->interleave << prinfo->ProgRegShift; |
563 | MTD_PROGREGION_CTRLMODE_VALID(mtd) = cfi->interleave * prinfo->ControlValid; | ||
564 | MTD_PROGREGION_CTRLMODE_INVALID(mtd) = cfi->interleave * prinfo->ControlInvalid; | ||
565 | mtd->flags &= ~MTD_BIT_WRITEABLE; | 563 | mtd->flags &= ~MTD_BIT_WRITEABLE; |
566 | printk(KERN_DEBUG "%s: program region size/ctrl_valid/ctrl_inval = %d/%d/%d\n", | 564 | printk(KERN_DEBUG "%s: program region size/ctrl_valid/ctrl_inval = %d/%d/%d\n", |
567 | map->name, mtd->writesize, | 565 | map->name, mtd->writesize, |
568 | MTD_PROGREGION_CTRLMODE_VALID(mtd), | 566 | cfi->interleave * prinfo->ControlValid, |
569 | MTD_PROGREGION_CTRLMODE_INVALID(mtd)); | 567 | cfi->interleave * prinfo->ControlInvalid); |
570 | } | 568 | } |
571 | 569 | ||
572 | /* | 570 | /* |
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index d644e57703ad..afab253ad60e 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h | |||
@@ -120,16 +120,6 @@ struct mtd_info { | |||
120 | u_int32_t ecctype; | 120 | u_int32_t ecctype; |
121 | u_int32_t eccsize; | 121 | u_int32_t eccsize; |
122 | 122 | ||
123 | /* | ||
124 | * Reuse some of the above unused fields in the case of NOR flash | ||
125 | * with configurable programming regions to avoid modifying the | ||
126 | * user visible structure layout/size. Only valid when the | ||
127 | * MTD_PROGRAM_REGIONS flag is set. | ||
128 | * (Maybe we should have an union for those?) | ||
129 | */ | ||
130 | #define MTD_PROGREGION_CTRLMODE_VALID(mtd) (mtd)->oobsize | ||
131 | #define MTD_PROGREGION_CTRLMODE_INVALID(mtd) (mtd)->ecctype | ||
132 | |||
133 | // Kernel-only stuff starts here. | 123 | // Kernel-only stuff starts here. |
134 | char *name; | 124 | char *name; |
135 | int index; | 125 | int index; |