[U-Boot-Users] Suggestion on flash init

Wolfgang Denk wd at denx.de
Tue Jan 3 15:08:42 CET 2006


In message <20060103205317.0711.LARK at 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.

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Another Armenia, Belgium ... the weak innocents who always seem to be
located on a natural invasion route.
	-- Kirk, "Errand of Mercy", stardate 3198.4




More information about the U-Boot mailing list