From: Jared Hulbert <jaredeh@gmail.com>
To: Todd Poynor <tpoynor@mvista.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: DEBUG_LOCK_BITS fix for Intel NOR flash
Date: Wed, 27 Apr 2005 09:01:31 -0700 [thread overview]
Message-ID: <6934efce05042709017bb77d95@mail.gmail.com> (raw)
In-Reply-To: <20050422195324.GA12115@slurryseal.ddns.mvista.com>
On 4/22/05, Todd Poynor <tpoynor@mvista.com> wrote:
> This patch seems to correctly access block lock status bits for at least
> one Intel StrataFlash model. Without at least half of this patch (the
> chip->start adjustment), DEBUG_LOCK_BITS won't work well with
> multi-partition flash, at the least.
>
> I also needed to change the code to follow the flowchart given in a
> recent StrataFlash datasheet: write command 0x90 followed by the block
> address + 2, then read block address + 2. The old code writes command
> 0x90 followed by hardcoded address 0x55, then reads block address + 2.
>
> Can anybody verify whether Intel flash models exist that require the
> 0x55 address for block lock query? If so, know of any way to
> distinguish the two cases?
>
> Absent any dissent this patch will go into CVS. (Why all the concern
> over a debug feature? Because I want to also write code to query lock
> status for other reasons.) Thanks -- Todd
>
> Index: linux-mtd/drivers/mtd/chips/cfi_cmdset_0001.c
> ===================================================================
> --- linux-mtd.orig/drivers/mtd/chips/cfi_cmdset_0001.c 2005-04-22 19:15:05.000000000 +0000
> +++ linux-mtd/drivers/mtd/chips/cfi_cmdset_0001.c 2005-04-22 19:39:12.000000000 +0000
> @@ -1823,8 +1823,9 @@
> struct cfi_private *cfi = map->fldrv_priv;
> int status, ofs_factor = cfi->interleave * cfi->device_type;
>
> + adr += chip->start;
> xip_disable(map, chip, adr+(2*ofs_factor));
> - cfi_send_gen_cmd(0x90, 0x55, 0, map, cfi, cfi->device_type, NULL);
> + map_write(map, CMD(0x90), adr+(2*ofs_factor));
> chip->state = FL_JEDEC_QUERY;
> status = cfi_read_query(map, adr+(2*ofs_factor));
> xip_enable(map, chip, 0);
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
>
Not sure where the 0x55 came from. This code looks generic enough to
work for multi and single partition Intel flash.
prev parent reply other threads:[~2005-04-27 16:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-22 19:53 DEBUG_LOCK_BITS fix for Intel NOR flash Todd Poynor
2005-04-27 16:01 ` Jared Hulbert [this message]
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=6934efce05042709017bb77d95@mail.gmail.com \
--to=jaredeh@gmail.com \
--cc=linux-mtd@lists.infradead.org \
--cc=tpoynor@mvista.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.