[U-Boot-Users] 答复: [U-Boot-Users] [PATCH] Fixed cfi flash read uchar bug.

Wolfgang Denk wd at denx.de
Fri Dec 22 18:17:27 CET 2006

In message <2176B872C0407E44887F07CCAA869293832458 at zch01exm21.fsl.freescale.net> you wrote:
> Yes, the memcpy() is just a byte copy. But a x16 read can be emulated by
> two x8 read. And in fact, the flash_read_ushort(), flash_read_long() in
> cfi_flash.c are using the same implementation.

But these are supposed to read more than one byte.

> In addition, the original code only reads 8bit, not the full 16bit. My
> patch ensures the full 16bit data are read completely.

I still don't understand why flash_read_uchar() should read more than
one byte? If you need a 16 bit read operation I would expect  you  to
use flash_read_ushort() instead.

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
Save energy:  Drive a smaller shell.

More information about the U-Boot mailing list