
22 Dec
2006
22 Dec
'06
6:17 p.m.
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@denx.de
Save energy: Drive a smaller shell.