mips: load code in buffer mode
authorSalvador Arroyo <sarroyofdez@yahoo.es>
Fri, 23 Aug 2013 16:50:43 +0000 (18:50 +0200)
committerFreddie Chopin <freddie.chopin@gmail.com>
Fri, 9 May 2014 20:37:42 +0000 (20:37 +0000)
commite9497fbf75b3d5cf852151ce6e2549517e95e819
tree31534cabb09df8b59154579a90470faacfee0911
parent12f4564e883419c623a2aaf49bd12bf2a46639c9
mips: load code in buffer mode

Currently the functions mips32_checksum_memory() and mips32_blank_check_memory()
load the code word by word.
The bug in cache code is a good reason for doing so.
If there is no other reason we can load the code as a buffer to save time.
mips_m4k_write_memory() expect a buffer in target endianness, this is done by
target_buffer_set_u32_array().
Cleaned up exit code.
Tested on ar7241 big endian and pic32mx little endian with verify_image.
Flash erase check only tested in pic32mx.

Change-Id: Ib63ed98732b2e23b058e7349a0a57934b7604905
Signed-off-by: Salvador Arroyo <sarroyofdez@yahoo.es>
Reviewed-on: http://openocd.zylin.com/1562
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
src/target/mips32.c