From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wang Jian Date: Tue, 03 Jan 2006 23:34:51 +0800 Subject: [U-Boot-Users] Suggestion on flash init In-Reply-To: <20060103140842.42E073540BC@atlas.denx.de> References: <20060103205317.0711.LARK@linux.net.cn> <20060103140842.42E073540BC@atlas.denx.de> Message-ID: <20060103232431.EB1F.LARK@linux.net.cn> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Wolfgang Denk, On Tue, 03 Jan 2006 15:08:42 +0100, Wolfgang Denk wrote: > In message <20060103205317.0711.LARK@linux.net.cn> you wrote: > > > > In my situation, S29AL016M works in x8 mode, which has different command > > sequence from in x16 mode. > > If you look closer it is not so different at all. > > > x16 mode sector erase > > addr[0x555] = 0xAA; > > addr[0x2AA] = 0x55; > > addr[0x555] = 0x80; > > addr[0x555] = 0xAA; > > addr[0x2AA] = 0x55; > > addr[0x000] = 0x30; > ... > > x8 mode sector erase > > addr[0xAAA] = 0xAA; > > addr[0x555] = 0x55; > > addr[0xAAA] = 0x80; > > addr[0xAAA] = 0xAA; > > addr[0x555] = 0x55; > > addr[0x000] = 0x30; > > 0x555 = 0xAAA >> 1 > 0x2AA = 0x555 >> 1 > > > I have little knowledge about other flash chips, so it is not easy for > > me to write clean patch for cfi_flash.c, although I want to. > > The code is actually the very same, just taking into account the > different addressing mode. > I am not sure if other kind of AMD flash chips use such x8/x16 command sequence. I am afraid that I will fix one thing and break other things. -- lark