I've not encountered crashes as this issue will not be occured in case bus width is 8.
But this is obvious bug, right?
Applied as r1661, thanks.
amd_flash.c was inherited as a patch against the original openwince-jtag. It seems to me that the whole file is obsolete in the meantime. Do you have a board/hardware flash that actually relies on the code in amd_flash.c? I'd expect that all chips supported by amd_flash.c are covered by jedec.c/amd.c
Thanks for apply my patch.
I agree it's better we merge amd_flash.c and amd.c up. I'll try later.