[U-Boot-Users] Unaligned Flash Writing with drivers/cfi_flash.c

Michael Bendzick michaelb at logicpd.com
Wed Jul 14 18:27:46 CEST 2004


In the CFI flash driver (drivers/cfi_flash.c), is it intended that the
writes to the buffer in function flash_write_cfibuffer using the
instructions such as "*dst.wp++ = *src.wp++;" work on unaligned addresses,
i.e. 0x01 for source and 0x02 for destination?

I find that, as should be expected, memory copy operations don't like
working with unaligned addresses.  However, when using the cfi_flash.c
driver with buffered writes disabled, unaligned addresses aren't a problem.

I see three options:
--A user just knows not to perform operations that copy from bad addresses.
--The driver copes with weird requests (and the code grows larger in size).
--An error message pops out saying that the addresses don't align (and the
code grows larger in size).

Right now, I observe that my OMAP1510 Innovator board just crashes or
resets.  The less knowledgable user might like to know why that happens.

Should the code be patched to fit one of these (or a fourth) options, or
just left as is?

-Michael Bendzick
Systems and Software Engineering
Logic Product Development
michael.b at logicpd.com
612-436-5122
www.logicpd.com





More information about the U-Boot mailing list