Browse Source

- added patch to change pathmove handling

https://lists.berlios.de/pipermail/openocd-development/2008-January/000678.html

(thanks to Øyvind for the patch)

git-svn-id: svn://svn.berlios.de/openocd/trunk@286 b42882b7-edfa-0310-969c-e2dbd0fdcd60
tags/v0.1.0
mifi 16 years ago
parent
commit
8f6d142b95
10 changed files with 11 additions and 63 deletions
  1. +0
    -2
      src/jtag/amt_jtagaccel.c
  2. +0
    -2
      src/jtag/at91rm9200.c
  3. +0
    -2
      src/jtag/ep93xx.c
  4. +0
    -2
      src/jtag/ft2232.c
  5. +0
    -2
      src/jtag/gw16012.c
  6. +11
    -45
      src/jtag/jtag.c
  7. +0
    -4
      src/jtag/jtag.h
  8. +0
    -2
      src/jtag/parport.c
  9. +0
    -1
      src/jtag/presto.c
  10. +0
    -1
      src/jtag/usbprog.c

+ 0
- 2
src/jtag/amt_jtagaccel.c View File

@@ -119,8 +119,6 @@ jtag_interface_t amt_jtagaccel_interface =
.execute_queue = amt_jtagaccel_execute_queue,

.support_pathmove = 0,

.speed = amt_jtagaccel_speed,
.register_commands = amt_jtagaccel_register_commands,
.init = amt_jtagaccel_init,


+ 0
- 2
src/jtag/at91rm9200.c View File

@@ -134,8 +134,6 @@ jtag_interface_t at91rm9200_interface =

.execute_queue = bitbang_execute_queue,

.support_pathmove = 0,

.speed = at91rm9200_speed,
.register_commands = at91rm9200_register_commands,
.init = at91rm9200_init,


+ 0
- 2
src/jtag/ep93xx.c View File

@@ -66,8 +66,6 @@ jtag_interface_t ep93xx_interface =
.execute_queue = bitbang_execute_queue,

.support_pathmove = 0,

.speed = ep93xx_speed,
.register_commands = ep93xx_register_commands,
.init = ep93xx_init,


+ 0
- 2
src/jtag/ft2232.c View File

@@ -160,8 +160,6 @@ jtag_interface_t ft2232_interface =
.execute_queue = ft2232_execute_queue,
.support_pathmove = 1,
.speed = ft2232_speed,
.register_commands = ft2232_register_commands,
.init = ft2232_init,


+ 0
- 2
src/jtag/gw16012.c View File

@@ -107,8 +107,6 @@ jtag_interface_t gw16012_interface =
.execute_queue = gw16012_execute_queue,

.support_pathmove = 0,

.speed = gw16012_speed,
.register_commands = gw16012_register_commands,
.init = gw16012_init,


+ 11
- 45
src/jtag/jtag.c View File

@@ -728,52 +728,18 @@ int jtag_add_pathmove(int num_states, enum tap_state *path)
return ERROR_JTAG_NOT_IMPLEMENTED;
}
if (jtag->support_pathmove)
{
/* allocate memory for a new list member */
*last_cmd = cmd_queue_alloc(sizeof(jtag_command_t));
last_comand_pointer = &((*last_cmd)->next);
(*last_cmd)->next = NULL;
(*last_cmd)->type = JTAG_PATHMOVE;
/* allocate memory for a new list member */
*last_cmd = cmd_queue_alloc(sizeof(jtag_command_t));
last_comand_pointer = &((*last_cmd)->next);
(*last_cmd)->next = NULL;
(*last_cmd)->type = JTAG_PATHMOVE;

(*last_cmd)->cmd.pathmove = cmd_queue_alloc(sizeof(pathmove_command_t));
(*last_cmd)->cmd.pathmove->num_states = num_states;
(*last_cmd)->cmd.pathmove->path = cmd_queue_alloc(sizeof(enum tap_state) * num_states);
(*last_cmd)->cmd.pathmove = cmd_queue_alloc(sizeof(pathmove_command_t));
(*last_cmd)->cmd.pathmove->num_states = num_states;
(*last_cmd)->cmd.pathmove->path = cmd_queue_alloc(sizeof(enum tap_state) * num_states);
for (i = 0; i < num_states; i++)
(*last_cmd)->cmd.pathmove->path[i] = path[i];
}
else
{
/* validate the desired path, and see if it fits a default path */
int begin = 0;
int end = 0;
int j;
for (i = 0; i < num_states; i++)
{
for (j = i; j < num_states; j++)
{
if (tap_move_map[path[j]] != -1)
{
end = j;
break;
}
}
if (begin - end <= 7) /* a default path spans no more than 7 states */
{
jtag_add_statemove(path[end]);
}
else
{
ERROR("encountered a TAP path that can't be fulfilled by default paths");
return ERROR_JTAG_NOT_IMPLEMENTED;
}
i = end;
}
}
for (i = 0; i < num_states; i++)
(*last_cmd)->cmd.pathmove->path[i] = path[i];

if (cmd_queue_cur_state == TAP_TLR && cmd_queue_end_state != TAP_TLR)
jtag_call_event_callbacks(JTAG_TRST_RELEASED);


+ 0
- 4
src/jtag/jtag.h View File

@@ -187,10 +187,6 @@ typedef struct jtag_interface_s
*/
int (*execute_queue)(void);
/* optional command support
*/
int support_pathmove;
/* interface initalization
*/
int (*speed)(int speed);


+ 0
- 2
src/jtag/parport.c View File

@@ -159,8 +159,6 @@ jtag_interface_t parport_interface =
.execute_queue = bitbang_execute_queue,

.support_pathmove = 1,

.speed = parport_speed,
.register_commands = parport_register_commands,
.init = parport_init,


+ 0
- 1
src/jtag/presto.c View File

@@ -61,7 +61,6 @@ jtag_interface_t presto_interface =
{
.name = "presto",
.execute_queue = bitq_execute_queue,
.support_pathmove = 1,
.speed = presto_jtag_speed,
.register_commands = presto_jtag_register_commands,
.init = presto_jtag_init,


+ 0
- 1
src/jtag/usbprog.c View File

@@ -64,7 +64,6 @@ jtag_interface_t usbprog_interface =
{
.name = "usbprog",
.execute_queue = usbprog_execute_queue,
.support_pathmove = 0,
.speed = usbprog_speed,
.register_commands = usbprog_register_commands,
.init = usbprog_init,


Loading…
Cancel
Save