public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] mtd: cfi_cmdset_0001 - fixup for PC28F512P33TFA
@ 2014-03-31 17:32 Christoph Fritz
  2014-03-31 20:31 ` Joakim Tjernlund
  0 siblings, 1 reply; 14+ messages in thread
From: Christoph Fritz @ 2014-03-31 17:32 UTC (permalink / raw)
  To: Brian Norris, David Woodhouse
  Cc: Marius Achilles, linux-mtd, Artem Bityutskiy

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@googlemail.com>
Tested-by: Marius Achilles <M.Achilles@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

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2014-04-07  9:54 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-31 17:32 [PATCH] mtd: cfi_cmdset_0001 - fixup for PC28F512P33TFA Christoph Fritz
2014-03-31 20:31 ` Joakim Tjernlund
2014-03-31 22:04   ` Christoph Fritz
2014-04-01  8:29     ` Joakim Tjernlund
     [not found]     ` <OFA7BCC382.7C5EA8B7-ONC1257CAD.002CA0C1-C1257CAD.002EAA92@LocalDomain>
2014-04-01 11:15       ` Joakim Tjernlund
2014-04-01 15:09         ` Christoph Fritz
2014-04-01 19:13           ` Joakim Tjernlund
2014-04-01 23:10             ` Christoph Fritz
2014-04-02  7:25               ` Joakim Tjernlund
2014-04-02  9:04                 ` Christian Riesch
2014-04-04 21:17                   ` Christoph Fritz
2014-04-07  8:41                     ` Christian Riesch
2014-04-07  9:54                       ` Christoph Fritz
     [not found]                 ` <CAAQYJAvRWt7fEyFbYf9UrK4f5TZDu48dyiVwSfm=MXZnzk5E8A@mail.gmail.com>
2014-04-02  9:18                   ` Christoph Fritz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox