public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [U-BOOT] cfi_flash.c fails to program NOR Flash SST39LF040
Date: Mon, 27 Apr 2009 09:31:16 +0200	[thread overview]
Message-ID: <200904270931.16297.sr@denx.de> (raw)
In-Reply-To: <ec1aee9f0904231939h2aafea6fs6995aa78ca49e5a4@mail.gmail.com>

On Friday 24 April 2009, Po-Yu Chuang wrote:
> I have a board on which there is a NOR Flash SST39LF040.
>
> Previously, I copied flash.c from other boards.
>
> Now I am trying to migrate NOR Flash driver to use CFI, but it fails
> to program sectors which
> are not on the 0x10000 boundaries.
>
> I found that in function flash_write_cfiword()
> @drivers/mtd/cfi_flash.c it issues command
> with address relative to sector address.
> However, according to SST39 series data sheet, it seems that we should
> issue command
> with address relative to flash base address?
>
> After I modified flash_write_cfiword() to issue command to sector 0,
> everything works fine.
>
> Is it a bug?

Did you define CONFIG_FLASH_CFI_LEGACY (and CONFIG_SYS_FLASH_LEGACY_512Kx8)? 
IIRC then the SST FLASH chips are not completely CFI compatible. So you need 
to enable the JEDEC framework.

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================

  reply	other threads:[~2009-04-27  7:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-24  2:39 [U-Boot] [U-BOOT] cfi_flash.c fails to program NOR Flash SST39LF040 Po-Yu Chuang
2009-04-27  7:31 ` Stefan Roese [this message]
2009-04-28  3:12   ` Po-Yu Chuang
2009-07-03  7:37     ` Po-Yu Chuang
2009-07-03  7:46       ` Stefan Roese
2009-07-03  9:11         ` Po-Yu Chuang
2009-07-06  8:58           ` Stefan Roese

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=200904270931.16297.sr@denx.de \
    --to=sr@denx.de \
    --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