From mboxrd@z Thu Jan 1 00:00:00 1970 From: Timur Tabi Date: Wed, 01 Nov 2006 11:08:38 -0600 Subject: [U-Boot-Users] Sector size with CFI driver? In-Reply-To: <200611011803.46043.sr@denx.de> References: <4547AB63.8090802@freescale.com> <4548CC8F.1040001@freescale.com> <4548D228.8060103@freescale.com> <200611011803.46043.sr@denx.de> Message-ID: <4548D496.3090605@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 Stefan Roese wrote: > On Wednesday 01 November 2006 17:58, Timur Tabi wrote: >> Timur Tabi wrote: >>> + >>> +#ifdef CONFIG_MPC8349ITX >>> + for (i = num_erase_regions-1; i >= 0; i--) { /* top >>> boot */ +#else >>> for (i = 0; i < num_erase_regions; i++) { >>> +#endif >>> + >> Ok, I put the above change into cfi_flash.c, and now it works! Can someone >> explain to me why? Does U-Boot not normally support "top boot" flash? If >> so, is there a better way of doing this? > > Seems like your FLASH doesn't really support the CFI "Device Geometry > Definition". Both versions (top & bottom boot block) most likely report the > same layout. Assuming this is true (and I will try to find out), can you recommend how you want me to implement a fix for my board? Should I do something like #define CFG_CFI_DEV_GEO_BROKEN in my board header file, and then do something like: +#ifdef CFG_CFI_DEV_GEO_BROKEN + for (i = num_erase_regions-1; i >= 0; i--) { +#else for (i = 0; i < num_erase_regions; i++) { +#endif This is really ugly, I know, but I need help coming up with a method that you guys will accept. -- Timur Tabi Linux Kernel Developer @ Freescale