From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tolunay Orkun Date: Tue, 31 Oct 2006 14:53:28 -0600 Subject: [U-Boot-Users] Sector size with CFI driver? In-Reply-To: <4547AB63.8090802@freescale.com> References: <4547AB63.8090802@freescale.com> Message-ID: <4547B7C8.1070202@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 Timur Tabi wrote: > When using the CFI driver, how is the sector size determined? > > The reason I ask is that I have two different versions of U-Boot for my board, > both developed in-house. One version is based on 1.1.3, and the other on > 1.1.5. The 1.1.5 version cannot erase/program the last sector on the first > flash bank. Also, the 1.1.3 says this when I do flinfo: > > Bank # 1: CFI conformant FLASH (16 x 16) Size: 8 MB in 135 Sectors > Erase timeout 16384 ms, write timeout 1 ms, buffer write timeout 1 ms, > buffer size 1 > Sector Start Addresses: > FE000000 FE002000 FE004000 FE006000 FE008000 > FE00A000 FE00C000 FE00E000 FE010000 FE020000 > > And the 1.1.5 version says: > > Bank # 1: CFI compatible FLASH (16 port width with 16 chip width) > Command set is AMD/Fujitsu standard. Driver is polling DQ6 for status checking. > Size: 8 MB in 135 Sectors > Erase timeout 16384 ms, write timeout 0 ms, buffer write timeout 1 ms, > buffer size 1 > Sector Start Addresses: > FE000000 FE010000 FE020000 FE030000 FE040000 > FE050000 FE060000 FE070000 FE080000 FE090000 > > As you can see the sector sizes are different, but everything else is the same. It looks like you are using a bottom boot block flash and there are 8 smaller sectors of 8KiB and 127 larger sectors of 64KiB. You will have to debug the 1.1.5 version to see why it is not seeing the 8 small sectors. If both builds are using cfi_driver.c then a bug must have been introduced recently.