
In message 20080715095143.GF30428@www.tglx.de you wrote:
This got change by commit 93c56f212c [cfi_flash: support of long cmd in U-boot.]
Long is the wrong type because it will behave differently on 64bit machnines in a way that is probably not expected. u32 should be enough.
Well, if you write "u32" in the commit message...
-static void flash_make_cmd (flash_info_t * info, ulong cmd, void *cmdbuf) +static void flash_make_cmd (flash_info_t * info, uint cmd, void *cmdbuf) { int i; int cword_offset; @@ -316,9 +316,9 @@ static void flash_make_cmd (flash_info_t * info, ulong cmd, void *cmdbuf) val = *((uchar*)&cmd + cword_offset); #else cp_offset = i - 1;
val = *((uchar*)&cmd + sizeof(ulong) - cword_offset - 1);
val = *((uchar*)&cmd + sizeof(uint) - cword_offset - 1);
#endif
cp[cp_offset] = (cword_offset >= sizeof(ulong)) ? 0x00 : val;
cp[cp_offset] = (cword_offset >= sizeof(uint)) ? 0x00 : val;
...
...you should also use "u32" (and not uint) in the patch.
Please fix.
Best regards,
Wolfgang Denk