From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Roese Date: Mon, 27 Apr 2009 09:31:16 +0200 Subject: [U-Boot] [U-BOOT] cfi_flash.c fails to program NOR Flash SST39LF040 In-Reply-To: References: Message-ID: <200904270931.16297.sr@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 =====================================================================