Files
sw_openocd/src/target/openrisc/or1k_tap_xilinx_bscan.c
Antonio Borneo 382148e4dd openocd: fix SPDX tag format for files .c
With the old checkpatch we cannot use the correct format for the
SPDX tags in the file .c, in fact the C99 comments are not allowed
and we had to use the block comment.

With the new checkpatch, let's switch to the correct SPDX format.

Change created automatically through the command:
	sed -i \
	's,^/\* *\(SPDX-License-Identifier: .*[^ ]\) *\*/$,// \1,' \
	$(find src/ contrib/ -name \*.c)

Change-Id: I6da16506baa7af718947562505dd49606d124171
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7153
Tested-by: jenkins
2022-09-18 08:22:01 +00:00

53 lines
1.3 KiB
C

// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2013 by Sergio Chico *
* sergio.chico@gmail.com *
***************************************************************************/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "or1k_tap.h"
#include "or1k.h"
#include <jtag/jtag.h>
#define OR1K_XILINX_TAP_INST_USER1 0x02
static int or1k_tap_xilinx_bscan_init(struct or1k_jtag *jtag_info)
{
LOG_DEBUG("Initialising Xilinx Internal JTAG TAP");
/* Put TAP into state where it can talk to the debug interface
* by shifting in correct value to IR.
*/
/* Ensure TAP is reset - maybe not necessary*/
jtag_add_tlr();
struct jtag_tap *tap = jtag_info->tap;
struct scan_field field;
uint8_t ir_value = OR1K_XILINX_TAP_INST_USER1;
field.num_bits = tap->ir_length;
field.out_value = &ir_value;
field.in_value = NULL;
jtag_add_ir_scan(tap, &field, TAP_IDLE);
return jtag_execute_queue();
}
static struct or1k_tap_ip xilinx_bscan_tap = {
.name = "xilinx_bscan",
.init = or1k_tap_xilinx_bscan_init,
};
int or1k_tap_xilinx_bscan_register(void)
{
list_add_tail(&xilinx_bscan_tap.list, &tap_list);
return 0;
}