From: Aaron Williams Date: Fri, 25 Mar 2011 23:32:39 -0700 Subject: [U-Boot] CFI flash broken for 8-bit bus In-Reply-To: <4D8B785B.8060602@dawes.za.net> References: <201103172102.33681.Aaron.Williams@caviumnetworks.com> <201103232007.21642.Aaron.Williams@caviumnetworks.com> <4D8B785B.8060602@dawes.za.net> Message-ID: <201103252332.39961.Aaron.Williams@caviumnetworks.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de I am still doing some testing and just added a fix today so that if a flash chip that supports both 8 and 16-bits is on an 8-bit bus the interface is set to 8-bits. I'll try and get patches out next week. So far it's working fairly well on all of our boards, most of which have an 8- bit bus but one has a 16-bit bus. I had to change all of the defined addresses for AMD parts and calculate the 16 and 32-bit addresses by applying a mask. The CFI code *should* work if there's an 8-bit part on a 16-bit bus, but it probably will not support two 8-bit parts in parallel. That should be doable with some work. -Aaron On Thursday, March 24, 2011 09:59:07 AM Rogan Dawes wrote: > On 2011/03/24 5:07 AM, Aaron Williams wrote: > > I have it working on our 8-bit boards properly now, though I've only done > > some limited testing. > > > > I basically put in the correct addresses into cfi_flash.h and updated > > various addresses for 8-bit support. The problem was that the CFI code > > was written using the 16-bit addresses which don't work for an 8-bit > > bus. > > > > I added a mask which is used to calculate the correct address for 16 and > > 32- bit busses. I have only been able to test with 8-bit and 16-bit > > Spansion devices though. > > > > -Aaron > > Hi Aaron, > > I'm happy to test it, when you post the patch. > > Regards, > > Rogan