From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Chou Date: Wed, 24 Mar 2010 10:54:32 +0800 Subject: [U-Boot] [Nios2-dev] [PATCH] cfi flash: add status polling method for amd flash In-Reply-To: <4BA89A67.7010305@lumino.de> References: <1269314648-6289-1-git-send-email-thomas@wytron.com.tw> <4BA89A67.7010305@lumino.de> Message-ID: <4BA97EE8.3010504@wytron.com.tw> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 03/23/2010 06:39 PM, Michael Schnell wrote: >>> With 16 bit flash configurations I suppose the Avalon bus will do four Word reads instead of a single one >>> > Supposedly it will do two Word reads, of course, still resulting in the same problem. > Hi Michael, The write cycle of the avalon bus controller is correct. Just the read cycle (8 bits or 16 bits) caused problem with toggle status checking. There is no problem with Intel flash, because the busy checking is different. In u-boot, there are nios2 specific flash drivers (board/altera/common/flash.c and AMDLV065D.c) to handle status polling for amd flash. But they didn't use the cfi info to detect flash parameters. You have to define them for each board. I have tested 8 bits/16 bits amd flash and 16 bits intel flash on four altera dev boards without problem. - Thomas