diff options
author | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-05-11 07:40:42 +0000 |
---|---|---|
committer | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-05-11 07:40:42 +0000 |
commit | 68cea6e952aceb66730d1882a163cfb8a012e04d (patch) | |
tree | 1b9a979517f5a4bc153863718cd7c6c146f5eb6b /src | |
parent | 4e477364fd793de58594103b7c7b747bd0476b76 (diff) | |
download | openocd_libswd-68cea6e952aceb66730d1882a163cfb8a012e04d.tar.gz openocd_libswd-68cea6e952aceb66730d1882a163cfb8a012e04d.tar.bz2 openocd_libswd-68cea6e952aceb66730d1882a163cfb8a012e04d.tar.xz openocd_libswd-68cea6e952aceb66730d1882a163cfb8a012e04d.zip |
switch to jtag_add_callback() - USB performance fix
git-svn-id: svn://svn.berlios.de/openocd/trunk@1730 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src')
-rw-r--r-- | src/target/arm9tdmi.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/src/target/arm9tdmi.c b/src/target/arm9tdmi.c index 63846cf2..0a262490 100644 --- a/src/target/arm9tdmi.c +++ b/src/target/arm9tdmi.c @@ -202,11 +202,10 @@ int arm9tdmi_clock_out(arm_jtag_t *jtag_info, u32 instr, u32 out, u32 *in, int s if (in) { - u8 tmp[4]; - fields[0].in_value=tmp; - jtag_add_dr_scan_now(3, fields, TAP_INVALID); + fields[0].in_value=(u8 *)in; + jtag_add_dr_scan(3, fields, TAP_INVALID); - *in=le_to_h_u32(tmp); + jtag_add_callback(arm_le_to_h_u32, (u8 *)in); } else { @@ -251,8 +250,7 @@ int arm9tdmi_clock_data_in(arm_jtag_t *jtag_info, u32 *in) fields[0].tap = jtag_info->tap; fields[0].num_bits = 32; fields[0].out_value = NULL; - u8 tmp[4]; - fields[0].in_value = tmp; + fields[0].in_value = (u8 *)in; fields[1].tap = jtag_info->tap; fields[1].num_bits = 3; @@ -264,9 +262,9 @@ int arm9tdmi_clock_data_in(arm_jtag_t *jtag_info, u32 *in) fields[2].out_value = NULL; fields[2].in_value = NULL; - jtag_add_dr_scan_now(3, fields, TAP_INVALID); + jtag_add_dr_scan(3, fields, TAP_INVALID); - *in=le_to_h_u32(tmp); + jtag_add_callback(arm_le_to_h_u32, (u8 *)in); jtag_add_runtest(0, TAP_INVALID); @@ -293,6 +291,12 @@ int arm9tdmi_clock_data_in(arm_jtag_t *jtag_info, u32 *in) extern void arm_endianness(u8 *tmp, void *in, int size, int be, int flip); +static int arm9endianness(u8 *in, jtag_callback_data_t size, jtag_callback_data_t be) +{ + arm_endianness(in, in, (int)size, (int)be, 0); + return ERROR_OK; +} + /* clock the target, and read the databus * the *in pointer points to a buffer where elements of 'size' bytes * are stored in big (be==1) or little (be==0) endianness @@ -313,8 +317,7 @@ int arm9tdmi_clock_data_in_endianness(arm_jtag_t *jtag_info, void *in, int size, fields[0].tap = jtag_info->tap; fields[0].num_bits = 32; fields[0].out_value = NULL; - u8 tmp[4]; - fields[0].in_value = tmp; + fields[0].in_value = (u8 *)in; fields[1].tap = jtag_info->tap; fields[1].num_bits = 3; @@ -326,10 +329,9 @@ int arm9tdmi_clock_data_in_endianness(arm_jtag_t *jtag_info, void *in, int size, fields[2].out_value = NULL; fields[2].in_value = NULL; - jtag_add_dr_scan_now(3, fields, TAP_INVALID); - - arm_endianness(tmp, in, size, be, 0); + jtag_add_dr_scan(3, fields, TAP_INVALID); + jtag_add_callback3(arm9endianness, in, (jtag_callback_data_t)size, (jtag_callback_data_t)be); jtag_add_runtest(0, TAP_INVALID); |