diff options
author | Spencer Oliver <ntfreak@users.sourceforge.net> | 2011-01-04 12:29:49 +0000 |
---|---|---|
committer | Spencer Oliver <ntfreak@users.sourceforge.net> | 2011-01-04 12:29:49 +0000 |
commit | 0cd84000daab056dea61eb9d60cca538a3716acd (patch) | |
tree | 693d56f745e551f3cabc1ec9ffaf8a7f8d8ff0a1 /src/target/mips32_pracc.c | |
parent | dc1c5a750043a34ff94d51558b5473f567d84604 (diff) |
mips32: add fastdata loader working area
Add a working area that is preserved between calls to
mips_m4k_bulk_write_memory - this gives us a speed increase
of approx 3kb/sec during flash writes to the pic32mx.
This area is released during a resume/reset.
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
Diffstat (limited to 'src/target/mips32_pracc.c')
-rw-r--r-- | src/target/mips32_pracc.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/target/mips32_pracc.c b/src/target/mips32_pracc.c index 236f3894..a4ea2d36 100644 --- a/src/target/mips32_pracc.c +++ b/src/target/mips32_pracc.c @@ -985,7 +985,12 @@ int mips32_pracc_fastdata_xfer(struct mips_ejtag *ejtag_info, struct working_are } /* write program into RAM */ - mips32_pracc_write_mem32(ejtag_info, source->address, ARRAY_SIZE(handler_code), handler_code); + if (write_t != ejtag_info->fast_access_save) + { + mips32_pracc_write_mem32(ejtag_info, source->address, ARRAY_SIZE(handler_code), handler_code); + /* save previous operation to speed to any consecutive read/writes */ + ejtag_info->fast_access_save = write_t; + } LOG_DEBUG("%s using 0x%.8" PRIx32 " for write handler", __func__, source->address); |