
Hi, Wolfgang,
It's so pity that the flash got wrong 'num_erase_regions' issue is still in u-boot 1.2.0.
The byte by byte accessing is not preferred. But the flash_read_ushort() and flash_read_long() in drivers/cfi_flash.c are both implemented by byte accessing. How about it?
Can the instruction ' retval = (addr[0] << 16) | (addr[(info->portwidth)] << 24) | (addr[(2 * info->portwidth)]) | (addr[(3 * info->portwidth)] << 8);' In flash_read_long() be replaced by memcpy() function?
Thanks! Zhang Wei
Memcopy might be OK for flash tables but I am not sure if we use the same function to access status registers. I would rather access flash using bus wide accesses instead of byte by byte. Maybe it is safe but I do not know how it behaves in various platforms and bus interface units of various processors. I would take the safe route.
Best regards, Tolunay