drop Blackfin-specific register_value() in favor of common urj_tap_register_get_value()

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1748 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Mike Frysinger 15 years ago
parent 56792fb561
commit d6c5dd3a29

@ -20,6 +20,9 @@
Statically sort the structure lists so that we can mark them readonly and
thus share them across instances of urjtag.
* include/urjtag/bfin.h, src/bfin/bfin.c, src/bfin/bfin-part-bfin.c: Switch
from local register_value to common urj_tap_register_get_value.
2010-01-28 Mike Frysinger <vapier@gentoo.org>
* src/cmd/cmd_bfin.c: Replace one-insn-a-file option with dynamic instruction

@ -219,7 +219,6 @@ int part_is_bfin (urj_chain_t *, int);
void part_bypass (urj_chain_t *, int);
urj_tap_register_t *register_init_value (urj_tap_register_t *, uint64_t);
uint64_t register_value (urj_tap_register_t *);
int part_scan_select (urj_chain_t *, int, int);
int chain_scan_select (urj_chain_t *, int);

@ -21,10 +21,11 @@
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <urjtag/part.h>
#include <urjtag/data_register.h>
#include <urjtag/part_instruction.h>
#include <urjtag/tap_register.h>
#include <urjtag/bfin.h>
/* The helper functions for Blackfin DBGCTL and DBGSTAT operations. */
@ -38,7 +39,7 @@ bfin_dbgctl_init (urj_part_t *part, uint16_t v)
static uint16_t
bfin_dbgstat_value (urj_part_t *part)
{
return register_value (part->active_instruction->data_register->out);
return urj_tap_register_get_value (part->active_instruction->data_register->out);
}
static uint32_t

@ -103,18 +103,6 @@ register_init_value (urj_tap_register_t *tr, uint64_t value)
return tr;
}
uint64_t
register_value (urj_tap_register_t *tr)
{
uint64_t v = 0;
int i;
for (i = 0; i < tr->len; i++)
v = (v << 1) | tr->data[i];
return v;
}
static int
bfin_set_scan (urj_part_t *part, int scan)
{
@ -466,7 +454,7 @@ chain_emupc_get (urj_chain_t *chain, int save)
continue;
r = part->active_instruction->data_register->out;
BFIN_PART_EMUPC (part) = register_value (r);
BFIN_PART_EMUPC (part) = urj_tap_register_get_value (r);
if (save)
BFIN_PART_EMUPC_ORIG (part) = BFIN_PART_EMUPC (part);
}
@ -486,7 +474,7 @@ part_emupc_get (urj_chain_t *chain, int n, int save)
part = chain->parts->parts[n];
r = part->active_instruction->data_register->out;
BFIN_PART_EMUPC (part) = register_value (r);
BFIN_PART_EMUPC (part) = urj_tap_register_get_value (r);
if (save)
BFIN_PART_EMUPC_ORIG (part) = BFIN_PART_EMUPC (part);
@ -1043,7 +1031,7 @@ emudat_value (urj_tap_register_t *r)
{
uint64_t value;
value = register_value (r);
value = urj_tap_register_get_value (r);
value >>= (r->len - 32);
return value;

Loading…
Cancel
Save