Hello all, Attached some patches to speed up (external) flash programming on MIPS platforms. I optimized some of the assembly code in mips32_pracc.c. While using a parallel port Wiggler I went from 1000+ seconds programming time to 649 seconds. Thats a 35% speed increase. I've added some background information on the optimisations in the source so others should understand what is going on.
This patch includes my previous patch to add 5 JTAG clocks! I also hacked flash/cfi.c a bit more. The original version uses the toggle bit to determine whether a flash operation is ready. This is OK for erasing but when using a slow interface like the wiggler the programming is probably done when the next read operation is performed. When using toggle detection during programming, at least 2 read cycles are required to detect the absense of the toggling. I added a new function that detects whether the programmed value is being read from the device. If yes then the programming is done. This hack doesn't add a whole lot of speed improvement so I didn't care to make it work for any bus width / flash width. Its definitely not patch-worthy. If someone cares to takes it a step further I can mail my version of cfi.c. Nico Coesel
mips32_pracc.h.speedup.patch
Description: mips32_pracc.h.speedup.patch
mips32.h.speedup.patch
Description: mips32.h.speedup.patch
mips32_pracc.c.speedup.patch
Description: mips32_pracc.c.speedup.patch
_______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development