From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Fri, 22 Dec 2006 18:17:27 +0100 Subject: [U-Boot-Users] =?gb2312?B?tPC4tDogW1UtQm9vdC1Vc2Vyc10gW1BBVENIXSBGaXhlZCBjZmkgZmxhc2g=?= =?gb2312?B?IHJlYWQgdWNoYXIgYnVnLiA=?= In-Reply-To: Your message of "Sat, 23 Dec 2006 00:34:18 +0800." <2176B872C0407E44887F07CCAA869293832458@zch01exm21.fsl.freescale.net> Message-ID: <20061222171728.E3333353BD9@atlas.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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.