From mboxrd@z Thu Jan 1 00:00:00 1970 From: Reinhard Meyer Date: Thu, 12 Aug 2010 15:14:20 +0200 Subject: [U-Boot] Non standard CFI detection tweaks In-Reply-To: <201008121440.01113.sr@denx.de> References: <4C3CC5E5.1040606@dawes.za.net> <201007200958.33622.sr@denx.de> <4C63E3E7.30300@dawes.za.net> <201008121440.01113.sr@denx.de> Message-ID: <4C63F3AC.4070201@emk-elektronik.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Stefan Roese wrote: > Hi Rogan, > > On Thursday 12 August 2010 14:07:03 Rogan Dawes wrote: >> I found the following configuration snippet for OpenOCD for the DNS323 >> at http://wiki.dns323.info/hardware:jtag: >> >> # driver addr size chip_width bus_width options >> flash bank cfi 0xff800000 0x800000 1 2 0 >> >> It seems that the key here is that the bus_width is set to 2, even >> though the chip_width is only 1. > > Seems not to be so uncommon: 8bit device on a 16bit external bus. It is mostly likely a 8/16 bit wide device in 8 bit mode on an 8 bit external bus. Then all CFI data appears twice. Reason: the chip presents CFI data correctly (from the flash point of view) in 16 bit mode (flash A0 connected to CPU A1). If connected in 8 bit mode (flash A0 connected to CPU A1, flash A-1 connected to CPU A0) it still presents the data at the same adresses but the CFI driver gets misled because its told to try for 8 bit wide flash. Since that was an issue long ago, I made the board/emk/common/flash.c (CFI) driver. Anyone is welcome to add that special handling for 16 bit flash connected in 8 bit mode to the general CFI driver :) Best Regards, Reinhard