From: Dmitry Krivoschokov <dkrivoschokov@dev.rtsoft.ru>
To: linux-mtd@lists.infradead.org
Subject: flash status after unlocking
Date: Wed, 24 Aug 2005 14:06:44 +0400 [thread overview]
Message-ID: <430C46B4.10406@dev.rtsoft.ru> (raw)
Hi all,
it appears that cfi flash unlocking routines always leaves a flash chip
in status mode (if CONFIG_MTD_XIP is not set).
But in some cases it is desired that the chip remains in read array
mode, for linear cramfs at least.
So I've added code to put a chip in read array mode after unlocking, see
patch below (the patch against 2.4 kernel, sorry), tested on OMAP1610.
The patch is for Intel's command set only, though it is easy to add the
fix to others.
If no complaints for the fix I can test it with the latest kernel and
submit a patch.
Thanks,
Dmitry
diff -upr linux-2.4.orig/drivers/mtd/chips/cfi_cmdset_0001.c
linux-2.4/drivers/mtd/chips/cfi_cmdset_0001.c
--- linux-2.4.orig/drivers/mtd/chips/cfi_cmdset_0001.c 2005-04-06
03:01:44.000000000 +0400
+++ linux-2.4/drivers/mtd/chips/cfi_cmdset_0001.c 2005-08-23
15:31:31.000000000 +0400
@@ -1920,6 +1920,13 @@ static int __xipram do_xxlock_oneblock(s
/* Done and happy. */
chip->state = FL_STATUS;
xip_enable(map, chip, adr);
+
+#ifndef CONFIG_MTD_XIP
+ if (chip->state != FL_POINT && chip->state != FL_READY) {
+ map_write(map, CMD(0xff), adr);
+ chip->state = FL_READY;
+ }
+#endif
put_chip(map, chip, adr);
spin_unlock(chip->mutex);
return 0;
next reply other threads:[~2005-08-26 11:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-24 10:06 Dmitry Krivoschokov [this message]
2005-08-26 14:26 ` flash status after unlocking Nicolas Pitre
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=430C46B4.10406@dev.rtsoft.ru \
--to=dkrivoschokov@dev.rtsoft.ru \
--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