[U-Boot-Users] Suggestion on flash init

Wang Jian lark at linux.net.cn
Tue Jan 3 14:16:03 CET 2006


Hi Denk,

Me again.

In my situation, S29AL016M works in x8 mode, which has different command
sequence from in x16 mode.

The following are from datasheet.

Providing
vu_char *addr = (vu_char *) info->start[sect];

x16 mode sector erase
addr[0x555] = 0xAA;
addr[0x2AA] = 0x55;
addr[0x555] = 0x80;
addr[0x555] = 0xAA;
addr[0x2AA] = 0x55;
addr[0x000] = 0x30;
udelay(50); // at least 50 us before polling for status

x16 mode program
addr[0x555] = 0xAA;
addr[0x2AA] = 0x55;
addr[0x555] = 0xA0;
addr[offset] = data;

x8 mode sector erase
addr[0xAAA] = 0xAA;
addr[0x555] = 0x55;
addr[0xAAA] = 0x80;
addr[0xAAA] = 0xAA;
addr[0x555] = 0x55;
addr[0x000] = 0x30;
udelay(50); // at least 50 us before polling for status

x8 mode program
addr[0xAAA] = 0xAA;
addr[0x555] = 0x55;
addr[0xAAA] = 0xA0;
addr[offset] = data;

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.

Regards

On Mon, 26 Dec 2005 09:49:10 +0800, Wang Jian <lark at linux.net.cn> wrote:

> Hi Wolfgang Denk,
> 
> 
> On Sun, 25 Dec 2005 17:34:49 +0100, Wolfgang Denk <wd at denx.de> wrote:
> 
> > In message <20051225190658.F3F9.LARK at linux.net.cn> you wrote:
> > > 
> > > I have tested cfi_flash.c for a while. Unfortuanately, it fails for
> > > Spansion S29AL016M. The chip can be recognized, chip information is all
> > > correct, but the erase and write routines fail.
> > 
> > Then please (lets) fix the problem instead of inventing the wheel again.
> 
> After a bad sleep, I read the manual again. This time, I find the cfi_flash.c
> DOES do as what manual says. I will set some debug information and find
> what happend. Stay tune.
> 

-- 
  lark





More information about the U-Boot mailing list