public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: ebiederman@lnxi.com (Eric W. Biederman)
To: Ben Dooks <ben-mtd@fluff.org>,  linux-mtd@lists.infradead.org
Cc: Christopher Hoover <ch@hpl.hp.com>,
	David Woodhouse <dwmw2@infradead.org>,
	Thayne Harbaugh <tharbaugh@lnxi.com>
Subject: [CFT] FIX CFI cmdset 0002 for x16 and x32 devices.
Date: 23 Sep 2004 22:29:03 -0600	[thread overview]
Message-ID: <m3pt4cqohc.fsf_-_@maxwell.lnxi.com> (raw)
In-Reply-To: <m3r7ossm5q.fsf@maxwell.lnxi.com>

ebiederman@lnxi.com (Eric W. Biederman) writes:

> So it looks like the TODO item is to just look up what cfi standard
> says are the unlock addresses for cfi command set 2. And make certain
> the cfi hard codes are correct and nothing should be broken.

Looking at cfi specification and the AMD/Fujitsu specific
portion of it.  This is what the CFI address assignment code
needs to look like:

		/* Set the default CFI lock/unlock addresses */
		cfi->addr_unlock1 = 0x555;
		cfi->addr_unlock2 = 0x2aa;
		/* Modify the unlock address if we are in compatibility mode */
		if (	/* x16 in x8 mode */
			((cfi->device_type == CFI_DEVICETYPE_X8) && 
				(cfi->cfiq->InterfaceDesc == 2)) ||
			/* x32 in x16 mode */
			((cfi->device_type == CFI_DEVICETYPE_X16) &&
				(cfi->cfiq->InterfaceDesc == 4))) 
		{
			cfi->addr_unlock1 = 0xaaa;
			cfi->addr_unlock2 = 0x555;
		}


The previous code to handle this was quite bogus.  Unless I completely
cannot read the code.

I have committed this change and corresponding change to use
cfi_send_gen_cmd.

Will people please test this?

If I don't hear any bug reports I will assume everything is perfect
and start pushing this code upstream.  

Eric

  reply	other threads:[~2004-09-24  4:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-20 23:44 Fix to jedec_probe unlock addresses Ben Dooks
2004-09-23  1:48 ` Eric W. Biederman
2004-09-23 21:01   ` Ben Dooks
2004-09-23 21:36     ` Eric W. Biederman
2004-09-24  4:29       ` Eric W. Biederman [this message]
2004-09-28 12:15         ` [CFT] FIX CFI cmdset 0002 for x16 and x32 devices Ben Dooks

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=m3pt4cqohc.fsf_-_@maxwell.lnxi.com \
    --to=ebiederman@lnxi.com \
    --cc=ben-mtd@fluff.org \
    --cc=ch@hpl.hp.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=tharbaugh@lnxi.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox