aboutsummaryrefslogtreecommitdiff
path: root/src/jtag/drivers/usb_blaster
diff options
context:
space:
mode:
authorAndreas Fritiofson <andreas.fritiofson@gmail.com>2016-12-14 01:33:17 +0100
committerTomas Vanek <vanekt@fbl.cz>2019-06-04 21:48:39 +0100
commit8b9560349fb78887d8e353e20b303966d9ac2d1b (patch)
treeae6719df8f8a73cecdecd9ce2d38056126f3e900 /src/jtag/drivers/usb_blaster
parenteea508d9afa184684bf5a4e2788b6cd4b5fdc9ab (diff)
Convert DEBUG_JTAG_IO to LOG_DEBUG_IO
Change-Id: Ifee9723a57fea93a7022be3299f69680860f236b Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/3910 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Diffstat (limited to 'src/jtag/drivers/usb_blaster')
-rw-r--r--src/jtag/drivers/usb_blaster/usb_blaster.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/jtag/drivers/usb_blaster/usb_blaster.c b/src/jtag/drivers/usb_blaster/usb_blaster.c
index 8ccf8717..55b511e1 100644
--- a/src/jtag/drivers/usb_blaster/usb_blaster.c
+++ b/src/jtag/drivers/usb_blaster/usb_blaster.c
@@ -174,7 +174,7 @@ static int ublast_buf_read(uint8_t *buf, unsigned size, uint32_t *bytes_read)
int ret = info.drv->read(info.drv, buf, size, bytes_read);
char *str = hexdump(buf, *bytes_read);
- DEBUG_JTAG_IO("(size=%d, buf=[%s]) -> %u", size, str,
+ LOG_DEBUG_IO("(size=%d, buf=[%s]) -> %u", size, str,
*bytes_read);
free(str);
return ret;
@@ -185,7 +185,7 @@ static int ublast_buf_write(uint8_t *buf, int size, uint32_t *bytes_written)
int ret = info.drv->write(info.drv, buf, size, bytes_written);
char *str = hexdump(buf, *bytes_written);
- DEBUG_JTAG_IO("(size=%d, buf=[%s]) -> %u", size, str,
+ LOG_DEBUG_IO("(size=%d, buf=[%s]) -> %u", size, str,
*bytes_written);
free(str);
return ret;
@@ -266,7 +266,7 @@ static void ublast_queue_byte(uint8_t abyte)
info.buf[info.bufidx++] = abyte;
if (nb_buf_remaining() == 0)
ublast_flush_buffer();
- DEBUG_JTAG_IO("(byte=0x%02x)", abyte);
+ LOG_DEBUG_IO("(byte=0x%02x)", abyte);
}
/**
@@ -337,7 +337,7 @@ static void ublast_clock_tms(int tms)
{
uint8_t out;
- DEBUG_JTAG_IO("(tms=%d)", !!tms);
+ LOG_DEBUG_IO("(tms=%d)", !!tms);
info.tms = !!tms;
info.tdi = 0;
out = ublast_build_out(SCAN_OUT);
@@ -354,7 +354,7 @@ static void ublast_idle_clock(void)
{
uint8_t out = ublast_build_out(SCAN_OUT);
- DEBUG_JTAG_IO(".");
+ LOG_DEBUG_IO(".");
ublast_queue_byte(out);
}
@@ -375,7 +375,7 @@ static void ublast_clock_tdi(int tdi, enum scan_type type)
{
uint8_t out;
- DEBUG_JTAG_IO("(tdi=%d)", !!tdi);
+ LOG_DEBUG_IO("(tdi=%d)", !!tdi);
info.tdi = !!tdi;
out = ublast_build_out(SCAN_OUT);
@@ -400,7 +400,7 @@ static void ublast_clock_tdi_flip_tms(int tdi, enum scan_type type)
{
uint8_t out;
- DEBUG_JTAG_IO("(tdi=%d)", !!tdi);
+ LOG_DEBUG_IO("(tdi=%d)", !!tdi);
info.tdi = !!tdi;
info.tms = !info.tms;
@@ -430,7 +430,7 @@ static void ublast_queue_bytes(uint8_t *bytes, int nb_bytes)
info.bufidx + nb_bytes);
exit(-1);
}
- DEBUG_JTAG_IO("(nb_bytes=%d, bytes=[0x%02x, ...])", nb_bytes,
+ LOG_DEBUG_IO("(nb_bytes=%d, bytes=[0x%02x, ...])", nb_bytes,
bytes ? bytes[0] : 0);
if (bytes)
memcpy(&info.buf[info.bufidx], bytes, nb_bytes);
@@ -457,7 +457,7 @@ static void ublast_tms_seq(const uint8_t *bits, int nb_bits, int skip)
{
int i;
- DEBUG_JTAG_IO("(bits=%02x..., nb_bits=%d)", bits[0], nb_bits);
+ LOG_DEBUG_IO("(bits=%02x..., nb_bits=%d)", bits[0], nb_bits);
for (i = skip; i < nb_bits; i++)
ublast_clock_tms((bits[i / 8] >> (i % 8)) & 0x01);
ublast_idle_clock();
@@ -469,7 +469,7 @@ static void ublast_tms_seq(const uint8_t *bits, int nb_bits, int skip)
*/
static void ublast_tms(struct tms_command *cmd)
{
- DEBUG_JTAG_IO("(num_bits=%d)", cmd->num_bits);
+ LOG_DEBUG_IO("(num_bits=%d)", cmd->num_bits);
ublast_tms_seq(cmd->bits, cmd->num_bits, 0);
}
@@ -487,7 +487,7 @@ static void ublast_path_move(struct pathmove_command *cmd)
{
int i;
- DEBUG_JTAG_IO("(num_states=%d, last_state=%d)",
+ LOG_DEBUG_IO("(num_states=%d, last_state=%d)",
cmd->num_states, cmd->path[cmd->num_states - 1]);
for (i = 0; i < cmd->num_states; i++) {
if (tap_state_transition(tap_get_state(), false) == cmd->path[i])
@@ -512,7 +512,7 @@ static void ublast_state_move(tap_state_t state, int skip)
uint8_t tms_scan;
int tms_len;
- DEBUG_JTAG_IO("(from %s to %s)", tap_state_name(tap_get_state()),
+ LOG_DEBUG_IO("(from %s to %s)", tap_state_name(tap_get_state()),
tap_state_name(state));
if (tap_get_state() == state)
return;
@@ -541,7 +541,7 @@ static int ublast_read_byteshifted_tdos(uint8_t *buf, int nb_bytes)
unsigned int retlen;
int ret = ERROR_OK;
- DEBUG_JTAG_IO("%s(buf=%p, num_bits=%d)", __func__, buf, nb_bytes * 8);
+ LOG_DEBUG_IO("%s(buf=%p, num_bits=%d)", __func__, buf, nb_bytes * 8);
ublast_flush_buffer();
while (ret == ERROR_OK && nb_bytes > 0) {
ret = ublast_buf_read(buf, nb_bytes, &retlen);
@@ -573,7 +573,7 @@ static int ublast_read_bitbang_tdos(uint8_t *buf, int nb_bits)
unsigned int retlen;
uint8_t tmp[8];
- DEBUG_JTAG_IO("%s(buf=%p, num_bits=%d)", __func__, buf, nb_bits);
+ LOG_DEBUG_IO("%s(buf=%p, num_bits=%d)", __func__, buf, nb_bits);
/*
* Ensure all previous bitbang writes were issued to the dongle, so that
@@ -688,7 +688,7 @@ static void ublast_queue_tdi(uint8_t *bits, int nb_bits, enum scan_type scan)
static void ublast_runtest(int cycles, tap_state_t state)
{
- DEBUG_JTAG_IO("%s(cycles=%i, end_state=%d)", __func__, cycles, state);
+ LOG_DEBUG_IO("%s(cycles=%i, end_state=%d)", __func__, cycles, state);
ublast_state_move(TAP_IDLE, 0);
ublast_queue_tdi(NULL, cycles, SCAN_OUT);
@@ -697,7 +697,7 @@ static void ublast_runtest(int cycles, tap_state_t state)
static void ublast_stableclocks(int cycles)
{
- DEBUG_JTAG_IO("%s(cycles=%i)", __func__, cycles);
+ LOG_DEBUG_IO("%s(cycles=%i)", __func__, cycles);
ublast_queue_tdi(NULL, cycles, SCAN_OUT);
}
@@ -727,7 +727,7 @@ static int ublast_scan(struct scan_command *cmd)
ublast_state_move(TAP_DRSHIFT, 0);
log_buf = hexdump(buf, DIV_ROUND_UP(scan_bits, 8));
- DEBUG_JTAG_IO("%s(scan=%s, type=%s, bits=%d, buf=[%s], end_state=%d)", __func__,
+ LOG_DEBUG_IO("%s(scan=%s, type=%s, bits=%d, buf=[%s], end_state=%d)", __func__,
cmd->ir_scan ? "IRSCAN" : "DRSCAN",
type2str[type],
scan_bits, log_buf, cmd->end_state);
@@ -749,7 +749,7 @@ static int ublast_scan(struct scan_command *cmd)
static void ublast_usleep(int us)
{
- DEBUG_JTAG_IO("%s(us=%d)", __func__, us);
+ LOG_DEBUG_IO("%s(us=%d)", __func__, us);
jtag_sleep(us);
}