public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Timur Tabi <timur@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH] CFI driver AMD Command Set Top boot	geometry reversal, etc. [Updated]
Date: Fri, 10 Nov 2006 15:31:56 -0600	[thread overview]
Message-ID: <4554EFCC.2000204@freescale.com> (raw)
In-Reply-To: <200611101216.17435.sr@denx.de>

Stefan Roese wrote:

> As you may notice, even the ID's are not correct (0020 and 22c4 are correct) 
> and the geometry is not correct (bottom instead of top).

It looks like the problem with the IDs (I have them too) is that 
flash_read_jedec_ids() is broken.  After sending the commands, the function 
just reads the regular data instead of the command reply.

I'm reading the CFI spec, and I see this:

"The software must write a 90h to the first location in the device. If the
device returns a Manufacturer?s ID and Component ID, the flash device may be 
accessed as it has been in the past, based on the Manufacturer and Component 
ID. If the device does not return a Manufacturer and Component ID, then the 
device is not a flash memory and other routines are necessary to determine 
what type of device is installed."

The address that flash_read_jedec_ids() uses is fe000000, which is definitely 
the first byte of flash, so I don't know how it can claim that it isn't.  It 
gets even more screwy.  According to the flowchart in appendix A1, after 
writing 90h to fe000000, you're supposed to read back a 90h.  Well, I get a 
4h, which is what's normally there.  I presume these reads and writes only 
work if the memory hasn't been erased?  Because then, if I write anything to 
fe000000, I better get back the same value.

But isn't it possible to write to unerased flash anyway?  Erasing just changes 
all the zeros to ones, and writing can only change a 1 to a 0, so if I write a 
90h to a flash location, I should get back, 0, 90h, 80h, or 10h, right?

The flowchart says that if you don't get back 90h, you're supposed to restore 
the previous value.  But how can you restore it without erasing the entire sector?

Is it possible that my AMD flash chips just don't support the JEDEC interface 
at all, and only CFI?  Does the even make sense?

-- 
Timur Tabi
Linux Kernel Developer @ Freescale

  parent reply	other threads:[~2006-11-10 21:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-09 23:46 [U-Boot-Users] [PATCH] CFI driver AMD Command Set Top boot geometry reversal, etc. [Updated] Tolunay Orkun
2006-11-10 11:16 ` Stefan Roese
2006-11-10 15:47   ` Tolunay Orkun
2006-11-10 21:31   ` Timur Tabi [this message]
2006-11-10 22:44     ` Timur Tabi
2006-11-12  4:42       ` Tolunay Orkun
2006-11-12  8:13         ` Stefan Roese
2006-11-12 22:04           ` Tolunay Orkun
2006-11-13 13:05             ` Stefan Roese
2006-11-13 15:34         ` Timur Tabi

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=4554EFCC.2000204@freescale.com \
    --to=timur@freescale.com \
    --cc=u-boot@lists.denx.de \
    /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