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

Wolfgang Denk
2006-12-22T17:17:27Z

In message <2176B872C0407E44887F07CCAA869293832458@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.