All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Hawkins <dwh@ovro.caltech.edu>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] minimum bdi config to read flash on 85xx
Date: Wed, 12 Sep 2007 11:00:57 -0700	[thread overview]
Message-ID: <46E82959.2090107@ovro.caltech.edu> (raw)
In-Reply-To: <f87675ee0709121023u259f6c93y68a77bc283c0d8ba@mail.gmail.com>

Hi Robert,

> Thanks all for the help so far. I'm going to jump back in the
> discussion at this part in the thread. We ran out of S29GL01GP chips
> so we temporarily moved to the S29GL512P 64MB chip, with a chip size
> of 4000000. The good news is after jumpering the board to the correct
> addresses we can do a "mdf 0xfc000000" and get all F's . We can also
> do a "erase 0xfc000000 CHIP" and the command completes successfully.
> 
> When we do a "prog 0xfc000000 uboot.bin bin" however, we get
> ""Programming flash memory failed" . Our questions at this point are:

Before assuming an address that reads 0xFFFFFFFF is really
your flash, you did double-check that the Flash CE# and OE#
signals are active for those accesses correct?

> 1) If we can do an erase as shown above does that mean our unlocking
> sequence has been performed correctly?

As I have commented before; if you're unsure, *do it manually*,
read the manufacturer ID first, and sector protection, or
whatever.

> What's confusing us here is that the "0x555 0xAA 0x2AA 0x55" sequence
> seems to be the same for our current S29GL512P, the S29GL01GP, Ben's
> S29GL064M, and the MPC8548CDS chip , the AM29LV641D. Maybe some CFI
> standard thing?

Don't be confused; read the data sheet :)

Yes, its a CFI thing. However, non-CFI JEDEC flash has something
similar.

> Anyways. Ben's sequence and an example I found for the
> CDS board is this:
> 
> ; Enable flash programming
> WM16 0xfe000000 0x0060 ;clear flash lock-bits
> WM16 0xfe000000 0x00d0
> DELAY 1000
> WM16 0xfe000000 0xffff

I don't see an unlock sequence here though. Perhaps there
is an unlock-bypass command earlier on.

> In our case 0xfe000000 becomes 0xfc000000.  We found a 8540ads with
> the same code.  In the 8548cds case they seem to use the equivalent
> for 0xFF800000 with WM32. In all these examples where not sure where
> these addresses come from as they don't seem to be clearly from the
> respective manuals.

I explained earlier the fact that the processor starts off
with a default memory map that you can then override.
So 0xFF800000 is the default map with an 8MB window at
the top of memory, while 0xFE000000 is a 32MB window setup
by writes to the local bus registers (OR/BR or whatever
they're called).

> We also can execute the unlock command successfully, with this entry
> in our config files:
> 
> ERASE 0xFc000000 CHIP; Erase whole Chip

If the chip started out with 0xFFFFFFFF, then you can't
really say you've had success :)

> 2) Any other ideas on why we can read and erase but not write our flash?
> 
> Thanks all, been quite a ride but I think we're almost ready to get
> into debugging our u-boot code.

Go back to basics first;

1. Confirm that accesses to the addresses you believe the
    Flash are located generate CE# and OE#

    (I'm sure you did this, but you didn't re-state it)

2. Use memory commands to read the manufacturer ID

3. Use memory commands to write a word

4. Use memory commands to erase that sector

5. Repeat 3

6. Use memory commands to erase the chip

Then try the software equivalents.
Then try programming U-boot.

Cheers,
Dave

  reply	other threads:[~2007-09-12 18:00 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-04 18:11 [U-Boot-Users] minimum bdi config to read flash on 85xx robert lazarski
2007-09-04 18:26 ` David Hawkins
2007-09-04 19:45   ` Ben Warren
2007-09-04 20:50     ` robert lazarski
2007-09-04 21:12       ` Ben Warren
2007-09-04 21:15       ` David Hawkins
2007-09-05 15:05         ` robert lazarski
2007-09-05 16:35           ` David Hawkins
2007-09-05 19:53             ` robert lazarski
2007-09-05 21:19               ` David Hawkins
2007-09-06 21:03                 ` Luiz Neto
2007-09-06 21:20                   ` Ben Warren
2007-09-06 22:12                     ` David Hawkins
2007-09-06 22:06                   ` David Hawkins
2007-09-07  1:41                     ` Luiz Neto
2007-09-07  2:00                       ` David Hawkins
     [not found]                         ` <50d8dde80709072035j3c066e81wab5216e78d47f89c@mail.gmail.com>
2007-09-08  3:46                           ` David Hawkins
2007-09-12 17:23                         ` robert lazarski
2007-09-12 18:00                           ` David Hawkins [this message]
2007-09-12 18:13                             ` Jerry Van Baren
2007-09-12 18:23                               ` David Hawkins
2007-09-12 18:29                               ` David Hawkins
2007-09-12 18:39                                 ` Jerry Van Baren
2007-09-12 18:44                                   ` David Hawkins
2007-09-12 19:19                                     ` robert lazarski
2007-09-12 19:41                                       ` David Hawkins
2007-09-12 20:06                                         ` Jerry Van Baren
2007-09-12 20:16                                           ` David Hawkins
2007-09-12 20:40                                             ` Jerry Van Baren
2007-09-12 21:39                                               ` David Hawkins
2007-09-14 18:21                                         ` robert lazarski
2007-09-14 18:34                                           ` Jerry Van Baren
2007-09-14 18:43                                           ` Ben Warren
2007-09-14 19:12                                           ` David Hawkins
2007-09-14 20:05                                             ` robert lazarski
2007-09-14 20:14                                               ` Ben Warren
2013-05-27 13:01                                                 ` [U-Boot] " Monica
2013-05-27 13:37                                                   ` Fabio Estevam
2013-05-28  5:35                                                     ` Monica
2007-09-14 20:16                                               ` [U-Boot-Users] " Jerry Van Baren
2007-09-14 20:34                                                 ` Leon Woestenberg
2007-09-14 21:04                                                 ` Scott Mann
2007-09-14 20:31                                               ` David Hawkins
2007-09-06 22:43                   ` Clemens Koller

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=46E82959.2090107@ovro.caltech.edu \
    --to=dwh@ovro.caltech.edu \
    --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 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.