zy1000: arm11 load is now faster
290kBytes/s @ 8MHz, no need to inline jtag_tap_next_enabled(). Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>__archive__
parent
afbf927663
commit
27401e4c80
|
@ -888,20 +888,46 @@ int arm11_run_instr_data_to_core_noack_inner(struct jtag_tap * tap, uint32_t opc
|
||||||
* with unaligned uint32_t * pointers... */
|
* with unaligned uint32_t * pointers... */
|
||||||
const uint8_t *t = (const uint8_t *)data;
|
const uint8_t *t = (const uint8_t *)data;
|
||||||
|
|
||||||
while (count--)
|
|
||||||
{
|
|
||||||
values[0] = *t++;
|
|
||||||
values[0] |= (*t++<<8);
|
|
||||||
values[0] |= (*t++<<16);
|
|
||||||
values[0] |= (*t++<<24);
|
|
||||||
|
|
||||||
if (count > 0)
|
/* bypass bits before and after */
|
||||||
|
int pre_bits = 0;
|
||||||
|
int post_bits = 0;
|
||||||
|
|
||||||
|
bool found = false;
|
||||||
|
struct jtag_tap *cur_tap, *nextTap;
|
||||||
|
for (cur_tap = jtag_tap_next_enabled(NULL); cur_tap!= NULL; cur_tap = nextTap)
|
||||||
{
|
{
|
||||||
jtag_add_dr_out(tap,
|
nextTap = jtag_tap_next_enabled(cur_tap);
|
||||||
2,
|
if (cur_tap == tap)
|
||||||
bits,
|
{
|
||||||
values,
|
found = true;
|
||||||
TAP_DRPAUSE);
|
} else
|
||||||
|
{
|
||||||
|
if (found)
|
||||||
|
{
|
||||||
|
post_bits++;
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
pre_bits++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
post_bits+=2;
|
||||||
|
|
||||||
|
|
||||||
|
while (--count > 0)
|
||||||
|
{
|
||||||
|
shiftValueInner(TAP_DRSHIFT, TAP_DRSHIFT, pre_bits, 0);
|
||||||
|
|
||||||
|
uint32_t value;
|
||||||
|
value = *t++;
|
||||||
|
value |= (*t++<<8);
|
||||||
|
value |= (*t++<<16);
|
||||||
|
value |= (*t++<<24);
|
||||||
|
|
||||||
|
shiftValueInner(TAP_DRSHIFT, TAP_DRSHIFT, 32, value);
|
||||||
|
shiftValueInner(TAP_DRSHIFT, TAP_DRPAUSE, post_bits, 0);
|
||||||
|
|
||||||
#if 1
|
#if 1
|
||||||
/* copy & paste from arm11_dbgtap.c */
|
/* copy & paste from arm11_dbgtap.c */
|
||||||
|
@ -916,7 +942,7 @@ int arm11_run_instr_data_to_core_noack_inner(struct jtag_tap * tap, uint32_t opc
|
||||||
ZY1000_POKE(ZY1000_JTAG_BASE + 0x28, 1);
|
ZY1000_POKE(ZY1000_JTAG_BASE + 0x28, 1);
|
||||||
ZY1000_POKE(ZY1000_JTAG_BASE + 0x28, 0);
|
ZY1000_POKE(ZY1000_JTAG_BASE + 0x28, 0);
|
||||||
ZY1000_POKE(ZY1000_JTAG_BASE + 0x28, 0);
|
ZY1000_POKE(ZY1000_JTAG_BASE + 0x28, 0);
|
||||||
waitIdle();
|
/* we don't have to wait for the queue to empty here. waitIdle(); */
|
||||||
ZY1000_POKE(ZY1000_JTAG_BASE + 0x20, TAP_DRSHIFT);
|
ZY1000_POKE(ZY1000_JTAG_BASE + 0x20, TAP_DRSHIFT);
|
||||||
#else
|
#else
|
||||||
static const tap_state_t arm11_MOVE_DRPAUSE_IDLE_DRPAUSE_with_delay[] =
|
static const tap_state_t arm11_MOVE_DRPAUSE_IDLE_DRPAUSE_with_delay[] =
|
||||||
|
@ -927,8 +953,13 @@ int arm11_run_instr_data_to_core_noack_inner(struct jtag_tap * tap, uint32_t opc
|
||||||
jtag_add_pathmove(ARRAY_SIZE(arm11_MOVE_DRPAUSE_IDLE_DRPAUSE_with_delay),
|
jtag_add_pathmove(ARRAY_SIZE(arm11_MOVE_DRPAUSE_IDLE_DRPAUSE_with_delay),
|
||||||
arm11_MOVE_DRPAUSE_IDLE_DRPAUSE_with_delay);
|
arm11_MOVE_DRPAUSE_IDLE_DRPAUSE_with_delay);
|
||||||
#endif
|
#endif
|
||||||
} else
|
}
|
||||||
{
|
|
||||||
|
values[0] = *t++;
|
||||||
|
values[0] |= (*t++<<8);
|
||||||
|
values[0] |= (*t++<<16);
|
||||||
|
values[0] |= (*t++<<24);
|
||||||
|
|
||||||
/* This will happen on the last iteration updating the current tap state
|
/* This will happen on the last iteration updating the current tap state
|
||||||
* so we don't have to track it during the common code path */
|
* so we don't have to track it during the common code path */
|
||||||
jtag_add_dr_out(tap,
|
jtag_add_dr_out(tap,
|
||||||
|
@ -936,8 +967,6 @@ int arm11_run_instr_data_to_core_noack_inner(struct jtag_tap * tap, uint32_t opc
|
||||||
bits,
|
bits,
|
||||||
values,
|
values,
|
||||||
TAP_IDLE);
|
TAP_IDLE);
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return jtag_execute_queue();
|
return jtag_execute_queue();
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue