summaryrefslogtreecommitdiff
path: root/src/flash
diff options
context:
space:
mode:
authorØyvind Harboe <oyvind.harboe@zylin.com>2011-04-01 00:00:39 +0200
committerØyvind Harboe <oyvind.harboe@zylin.com>2011-04-01 08:59:11 +0200
commit378567da4e40a31efed349fbe68deebd14079b94 (patch)
tree0f8c82534381cc867df0e4796b8db9d694582eb6 /src/flash
parent2615bf4398f393ee1e387128064093dcd44749c8 (diff)
downloadopenocd+libswd-378567da4e40a31efed349fbe68deebd14079b94.tar.gz
openocd+libswd-378567da4e40a31efed349fbe68deebd14079b94.tar.bz2
openocd+libswd-378567da4e40a31efed349fbe68deebd14079b94.tar.xz
openocd+libswd-378567da4e40a31efed349fbe68deebd14079b94.zip
mips: illustrates how to improve performance
Do not require unecessary roundtrips for clocking out data. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Diffstat (limited to 'src/flash')
-rw-r--r--src/flash/nor/pic32mx.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/flash/nor/pic32mx.c b/src/flash/nor/pic32mx.c
index 89fe9b05..b3c6da3e 100644
--- a/src/flash/nor/pic32mx.c
+++ b/src/flash/nor/pic32mx.c
@@ -774,11 +774,9 @@ COMMAND_HANDLER(pic32mx_handle_unlock_command)
}
/* unlock/erase device */
- mchip_cmd = MCHP_ASERT_RST;
- mips_ejtag_drscan_8(ejtag_info, &mchip_cmd);
+ mips_ejtag_drscan_8_out(ejtag_info, MCHP_ASERT_RST);
- mchip_cmd = MCHP_ERASE;
- mips_ejtag_drscan_8(ejtag_info, &mchip_cmd);
+ mips_ejtag_drscan_8_out(ejtag_info, MCHP_ERASE);
do {
mchip_cmd = MCHP_STATUS;
@@ -791,8 +789,7 @@ COMMAND_HANDLER(pic32mx_handle_unlock_command)
alive_sleep(1);
} while ((mchip_cmd & (1 << 2)) || (!(mchip_cmd & (1 << 3))));
- mchip_cmd = MCHP_DE_ASSERT_RST;
- mips_ejtag_drscan_8(ejtag_info, &mchip_cmd);
+ mips_ejtag_drscan_8_out(ejtag_info, MCHP_DE_ASSERT_RST);
/* select ejtag tap */
mips_ejtag_set_instr(ejtag_info, MTAP_SW_ETAP);