From mboxrd@z Thu Jan 1 00:00:00 1970 From: Timur Tabi Date: Fri, 10 Nov 2006 16:44:07 -0600 Subject: [U-Boot-Users] [PATCH] CFI driver AMD Command Set Top boot geometry reversal, etc. [Updated] In-Reply-To: <4554EFCC.2000204@freescale.com> References: <4553BDEF.8030601@orkun.us> <200611101216.17435.sr@denx.de> <4554EFCC.2000204@freescale.com> Message-ID: <455500B7.5050506@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Timur Tabi wrote: > Stefan Roese wrote: > >> As you may notice, even the ID's are not correct (0020 and 22c4 are correct) >> and the geometry is not correct (bottom instead of top). > > It looks like the problem with the IDs (I have them too) is that > flash_read_jedec_ids() is broken. After sending the commands, the function > just reads the regular data instead of the command reply. Well, I think I fixed it. In flash_read_jedec_ids(), make this change: - flash_write_cmd(info, 0, 0, FLASH_CMD_READ_ID); + flash_write_cmd(info, 0, AMD_ADDR_START, FLASH_CMD_READ_ID); I got the value of AMD_ADDR_START from the MX29LV640BT/BB reference manual, which says that the third bus cycle should be a write of 90h to 555 or AAA, depending on the width. Now when I run flinfo, I get this: Bank # 1: CFI conformant FLASH (16 x 16) Size: 8 MB in 135 Sectors AMD Standard command set, Manufacturer ID: 0xC2, Device ID: 0xC9 Erase timeout: 16384 ms, write timeout: 1 ms If this fix is real, then it means that flash_read_jedec_ids() never worked for any AMD part. -- Timur Tabi Linux Kernel Developer @ Freescale