[PATCH] mtd: cfi_cmdset_0001 - fixup for PC28F512P33TFA
Christoph Fritz
chf.fritz at googlemail.com
Mon Mar 31 13:32:31 EDT 2014
Add a fixup (quirk) for Micron NOR flash PC28F512P33TFA: This patch
disables option 'suspend erase' due to "internal timing issues on
some revisions of the P3x" which is pointed out by Micron TechNote-PDF
"Adapting the Linux Kernel for Micron P30, P33, and J3 Flash Memory" [1].
Without this patch, errors occur during heavy flash usage mostly in minus
degree temperature environments.
It's very likely that other P3x chips suffer from the same issue.
[1]: https://www.micron.com/~/media/Documents/Products/Technical%20Note/NOR%20Flash/tn1206_p30_p33_j3_linux.pdf
Signed-off-by: Christoph Fritz <chf.fritz at googlemail.com>
Tested-by: Marius Achilles <M.Achilles at phytec.de>
---
drivers/mtd/chips/cfi_cmdset_0001.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c
index 7751443..eb951b1 100644
--- a/drivers/mtd/chips/cfi_cmdset_0001.c
+++ b/drivers/mtd/chips/cfi_cmdset_0001.c
@@ -279,6 +279,18 @@ static void fixup_use_write_buffers(struct mtd_info *mtd)
}
}
+static void fixup_micron_pc28f512p33(struct mtd_info *mtd)
+{
+ struct map_info *map = mtd->priv;
+ struct cfi_private *cfi = map->fldrv_priv;
+ struct cfi_pri_intelext *cfip = cfi->cmdset_priv;
+
+ if (cfip->FeatureSupport & 2) {
+ printk(KERN_INFO "Disable Suspend Erase\n");
+ cfip->FeatureSupport &= ~2;
+ }
+}
+
/*
* Some chips power-up with all sectors locked by default.
*/
@@ -309,6 +321,7 @@ static struct cfi_fixup cfi_fixup_table[] = {
#endif
{ CFI_MFR_ST, 0x00ba, /* M28W320CT */ fixup_st_m28w320ct },
{ CFI_MFR_ST, 0x00bb, /* M28W320CB */ fixup_st_m28w320cb },
+ { CFI_MFR_INTEL, 0x8964, /* PC28F512P33 */ fixup_micron_pc28f512p33 },
{ CFI_MFR_INTEL, CFI_ID_ANY, fixup_unlock_powerup_lock },
{ 0, 0, NULL }
};
--
1.7.10.4
More information about the linux-mtd
mailing list