switch to jtag_add_callback() - USB performance fix
git-svn-id: svn://svn.berlios.de/openocd/trunk@1733 b42882b7-edfa-0310-969c-e2dbd0fdcd60__archive__
parent
978a4bb4b4
commit
4fe5a010c2
|
@ -290,6 +290,12 @@ int xscale_read_dcsr(target_t *target)
|
||||||
return jtag_execute_queue();
|
return jtag_execute_queue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void xscale_getbuf(u8 *in)
|
||||||
|
{
|
||||||
|
*((u32 *)in)=buf_get_u32(in, 0, 32);
|
||||||
|
}
|
||||||
|
|
||||||
int xscale_receive(target_t *target, u32 *buffer, int num_words)
|
int xscale_receive(target_t *target, u32 *buffer, int num_words)
|
||||||
{
|
{
|
||||||
if (num_words==0)
|
if (num_words==0)
|
||||||
|
@ -326,8 +332,6 @@ int xscale_receive(target_t *target, u32 *buffer, int num_words)
|
||||||
fields[1].tap = xscale->jtag_info.tap;
|
fields[1].tap = xscale->jtag_info.tap;
|
||||||
fields[1].num_bits = 32;
|
fields[1].num_bits = 32;
|
||||||
fields[1].out_value = NULL;
|
fields[1].out_value = NULL;
|
||||||
u8 tmp[4];
|
|
||||||
fields[1].in_value = tmp;
|
|
||||||
|
|
||||||
|
|
||||||
fields[2].tap = xscale->jtag_info.tap;
|
fields[2].tap = xscale->jtag_info.tap;
|
||||||
|
@ -351,13 +355,15 @@ int xscale_receive(target_t *target, u32 *buffer, int num_words)
|
||||||
fields[0].in_value = &field0[i];
|
fields[0].in_value = &field0[i];
|
||||||
|
|
||||||
jtag_add_pathmove(3, path);
|
jtag_add_pathmove(3, path);
|
||||||
jtag_add_dr_scan_now(3, fields, TAP_IDLE);
|
|
||||||
|
fields[1].in_value = (u8 *)(field1+i);
|
||||||
|
jtag_add_dr_scan(3, fields, TAP_IDLE);
|
||||||
|
|
||||||
|
jtag_add_callback(xscale_getbuf, (u8 *)(field1+i));
|
||||||
|
|
||||||
jtag_check_value_mask(fields+0, &field0_check_value, &field0_check_mask);
|
jtag_check_value_mask(fields+0, &field0_check_value, &field0_check_mask);
|
||||||
jtag_check_value_mask(fields+2, &field2_check_value, &field2_check_mask);
|
jtag_check_value_mask(fields+2, &field2_check_value, &field2_check_mask);
|
||||||
|
|
||||||
field1[i]=buf_get_u32(tmp, 0, 32);
|
|
||||||
|
|
||||||
words_scheduled++;
|
words_scheduled++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue