linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Fritz <chf.fritz@googlemail.com>
To: Brian Norris <computersforpeace@gmail.com>,
	David Woodhouse <dwmw2@infradead.org>
Cc: Marius Achilles <M.Achilles@phytec.de>,
	linux-mtd@lists.infradead.org,
	Artem Bityutskiy <dedekind1@gmail.com>
Subject: [PATCH] mtd: cfi_cmdset_0001 - fixup for PC28F512P33TFA
Date: Mon, 31 Mar 2014 19:32:31 +0200	[thread overview]
Message-ID: <1396287151.4857.50.camel@mars> (raw)

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

             reply	other threads:[~2014-03-31 17:40 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-31 17:32 Christoph Fritz [this message]
2014-03-31 20:31 ` [PATCH] mtd: cfi_cmdset_0001 - fixup for PC28F512P33TFA 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1396287151.4857.50.camel@mars \
    --to=chf.fritz@googlemail.com \
    --cc=M.Achilles@phytec.de \
    --cc=computersforpeace@gmail.com \
    --cc=dedekind1@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).