From: Mike Frysinger <vapier@gentoo.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org,
David Woodhouse <dwmw2@infradead.org>,
Graf Yang <graf.yang@analog.com>
Subject: [PATCH 1/3] mtd: m25p80: disable SST software protection bits by default
Date: Mon, 5 Oct 2009 17:14:47 -0400 [thread overview]
Message-ID: <1254777289-32109-2-git-send-email-vapier@gentoo.org> (raw)
In-Reply-To: <1254777289-32109-1-git-send-email-vapier@gentoo.org>
From: Graf Yang <graf.yang@analog.com>
The SST SPI flashes is like Atmel SPI flashes in that the software
protection bits are set by default at power up, so clear them at init
time.
Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
drivers/mtd/devices/m25p80.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index 379c316..933267a 100644
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -775,11 +775,12 @@ static int __devinit m25p_probe(struct spi_device *spi)
dev_set_drvdata(&spi->dev, flash);
/*
- * Atmel serial flash tend to power up
- * with the software protection bits set
+ * Atmel and SST serial flash tend to power
+ * up with the software protection bits set
*/
- if (info->jedec_id >> 16 == 0x1f) {
+ if (info->jedec_id >> 16 == 0x1f ||
+ info->jedec_id >> 16 == 0xbf) {
write_enable(flash);
write_sr(flash, 0);
}
--
1.6.5.rc2
next prev parent reply other threads:[~2009-10-05 21:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-05 21:14 [PATCH 0/3] misc mtd patches for 2.6.32 Mike Frysinger
2009-10-05 21:14 ` Mike Frysinger [this message]
2009-10-05 21:14 ` [PATCH 2/3] mtd/maps: gpio-addr-flash: pull in linux/ headers rather than asm/ Mike Frysinger
2009-10-05 21:14 ` [PATCH 3/3] mtd/maps: gpio-addr-flash: depend on GPIO arch support Mike Frysinger
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=1254777289-32109-2-git-send-email-vapier@gentoo.org \
--to=vapier@gentoo.org \
--cc=akpm@linux-foundation.org \
--cc=dwmw2@infradead.org \
--cc=graf.yang@analog.com \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®