From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tolunay Orkun Date: Tue, 07 Nov 2006 12:14:03 -0600 Subject: [U-Boot-Users] [PATCH] Where does U-Boot's CFI driver check for top/bottom boot? In-Reply-To: <9E50B2A5FE44294CBF877745D9A4125FB8A907@az33exm24.fsl.freescale.net> References: <9E50B2A5FE44294CBF877745D9A4125FB8A907@az33exm24.fsl.freescale.net> Message-ID: <4550CCEB.3020403@orkun.us> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Spence Nick-rxtd10 wrote: > > > Tolunay Orkun wrote: >> Subject: Re: [U-Boot-Users] [PATCH] Where does U-Boot's CFI >> driver check for top/bottom boot? >> >> Here is the patch (attached) that handles top boot geometry >> reversal case on AMD flash. >> > > You probably need to add a check that ext_addr is non-zero. If the > extended query table is not present then you can't read the version > number (otherwise you read the reserved section at 0h which is > undefined) I thought about it and it is simple to do. That line that sets the ext_addr was already present for Intel case (to check legacy lock feature from extended query table) so I just relocated out of the case statement. Still, I do not know of any actual CFI compliant flash that lacks an extended query table. Perhaps, it might have been relevant to old non-CFI JEDEC flash which we do not handle with this driver. I do not want to introduce code that will not be applicable. What do you think? I guess I can put the check for robustness just in case there happens to be an odd one in the market. Tolunay