|
OpenOCD
|

Go to the source code of this file.
Data Structures | |
| struct | cklink_ctx |
Functions | |
| static uint8_t | cklink_checksum (const uint8_t *buf, unsigned int len) |
| static int | cklink_execute_queue (struct jtag_command *cmd_queue) |
| static int | cklink_execute_reset (struct cklink_ctx *ck, struct jtag_command *cmd) |
| static int | cklink_execute_runtest (struct cklink_ctx *ck, struct jtag_command *cmd) |
| static int | cklink_execute_scan (struct cklink_ctx *ck, struct jtag_command *cmd) |
| static int | cklink_execute_stableclocks (struct cklink_ctx *ck, struct jtag_command *cmd) |
| static int | cklink_execute_tlr_reset (struct cklink_ctx *ck) |
| static int | cklink_execute_tms (struct jtag_command *cmd) |
| static int | cklink_flush_pending_ir (struct cklink_ctx *ck) |
| static unsigned int | cklink_frame_end (struct cklink_ctx *ck, unsigned int pos) |
| static unsigned int | cklink_frame_start (struct cklink_ctx *ck, uint8_t opcode) |
| static int | cklink_idle_cycles (struct cklink_ctx *ck, unsigned int num_bits) |
| static int | cklink_init (void) |
| static int | cklink_jtag_scan (struct cklink_ctx *ck, unsigned int ir_bits, const uint8_t *ir_tdi, uint8_t *ir_tdo, unsigned int dr_bits, const uint8_t *dr_tdi, uint8_t *dr_tdo) |
| static int | cklink_khz (int khz, int *jtag_speed) |
| static uint8_t | cklink_khz_to_div (int khz) |
| static int | cklink_probe_init (struct cklink_ctx *ck) |
| static int | cklink_quit (void) |
| static int | cklink_selfreg_read (struct cklink_ctx *ck, uint8_t reg, uint8_t *value) |
| static int | cklink_selfreg_write (struct cklink_ctx *ck, uint8_t reg, const uint8_t *value) |
| static int | cklink_speed (int speed) |
| static int | cklink_speed_div (int speed, int *khz) |
| static int | cklink_usb_xfer (struct cklink_ctx *ck, uint8_t opcode, unsigned int txlen, unsigned int *rxlen) |
| static int | cklink_write_csr (struct cklink_ctx *ck, uint8_t clk, uint8_t mode) |
Variables | |
| struct adapter_driver | cklink_adapter_driver |
| static const uint16_t | cklink_default_pids [] |
| static const uint16_t | cklink_default_vids [] |
| static struct cklink_ctx * | cklink_handle |
| static struct jtag_interface | cklink_jtag_interface |
| #define CKLINK_CLK_DIV_MIN CKLINK_SR0_RUN_CLK_BYTE |
|
static |
Definition at line 118 of file cklink.c.
Referenced by cklink_frame_end(), and cklink_usb_xfer().
|
static |
Definition at line 532 of file cklink.c.
References cklink_execute_reset(), cklink_execute_runtest(), cklink_execute_scan(), cklink_execute_stableclocks(), cklink_execute_tlr_reset(), cklink_execute_tms(), cklink_flush_pending_ir(), cklink_handle, cmd, ERROR_JTAG_INIT_FAILED, ERROR_JTAG_NOT_IMPLEMENTED, ERROR_JTAG_QUEUE_FAILED, ERROR_OK, JTAG_PATHMOVE, JTAG_RESET, JTAG_RUNTEST, JTAG_SCAN, JTAG_SLEEP, jtag_sleep(), JTAG_STABLECLOCKS, JTAG_TLR_RESET, JTAG_TMS, and LOG_ERROR.
|
static |
Definition at line 524 of file cklink.c.
References cklink_execute_tlr_reset(), cmd, and ERROR_OK.
Referenced by cklink_execute_queue().
|
static |
Definition at line 505 of file cklink.c.
References cklink_idle_cycles(), and cmd.
Referenced by cklink_execute_queue().
|
static |
Definition at line 341 of file cklink.c.
References bit_offset, buf_set_buf(), cklink_jtag_scan(), CKLINK_MAX_SCAN_BITS, CKLINK_MAX_SCAN_BYTES, CKLINK_PLACEHOLDER_IR_BITS, CKLINK_PLACEHOLDER_IR_VALUE, jtag_command::cmd, cmd, DIV_ROUND_UP, cklink_ctx::dropped_ir_warned, ERROR_FAIL, ERROR_JTAG_QUEUE_FAILED, ERROR_OK, scan_command::fields, scan_field::in_value, cklink_ctx::ir_bits, scan_command::ir_scan, cklink_ctx::ir_value, LOG_DEBUG, LOG_ERROR, LOG_WARNING, NULL, scan_field::num_bits, scan_field::out_value, cklink_ctx::pending_ir_cmd, jtag_command_container::scan, scan, cklink_ctx::scan_buf_size, cklink_ctx::scan_tdi, and cklink_ctx::scan_tdo.
Referenced by cklink_execute_queue().
|
static |
Definition at line 510 of file cklink.c.
References cklink_idle_cycles(), and cmd.
Referenced by cklink_execute_queue().
|
static |
Definition at line 483 of file cklink.c.
References CKLINK_SR0_MODE_CJTAG, CKLINK_SR0_MODE_JTAG, cklink_write_csr(), cklink_ctx::csr_clk, ERROR_OK, cklink_ctx::ir_bits, cklink_ctx::ir_value, NULL, cklink_ctx::pending_ir_cmd, TAP_RESET, and tap_set_state.
Referenced by cklink_execute_queue(), and cklink_execute_reset().
|
static |
Definition at line 516 of file cklink.c.
References cmd, ERROR_JTAG_NOT_IMPLEMENTED, and LOG_ERROR.
Referenced by cklink_execute_queue().
|
static |
Definition at line 314 of file cklink.c.
References buf_set_buf(), cklink_jtag_scan(), CKLINK_MAX_SCAN_BYTES, jtag_command::cmd, ERROR_OK, scan_field::in_value, cklink_ctx::ir_bits, cklink_ctx::ir_value, NULL, scan_field::num_bits, cklink_ctx::pending_ir_cmd, jtag_command_container::scan, and scan.
Referenced by cklink_execute_queue().
|
static |
Definition at line 189 of file cklink.c.
References cklink_checksum(), CKLINK_FRAME_END, CKLINK_USB_BUF_SIZE, and cklink_ctx::tx_buf.
Referenced by cklink_jtag_scan(), cklink_selfreg_read(), and cklink_selfreg_write().
|
static |
Definition at line 182 of file cklink.c.
References CKLINK_FRAME_START, and cklink_ctx::tx_buf.
Referenced by cklink_jtag_scan(), cklink_selfreg_read(), and cklink_selfreg_write().
|
static |
Definition at line 295 of file cklink.c.
References cklink_jtag_scan(), CKLINK_MAX_SCAN_BITS, CKLINK_MAX_SCAN_BYTES, ERROR_OK, and NULL.
Referenced by cklink_execute_runtest(), and cklink_execute_stableclocks().
|
static |
Definition at line 623 of file cklink.c.
References adapter_get_required_serial(), adapter_usb_get_pids(), adapter_usb_get_vids(), cklink_default_pids, cklink_default_vids, cklink_handle, cklink_probe_init(), CKLINK_USB_INTERFACE, ERROR_JTAG_INIT_FAILED, ERROR_OK, jtag_libusb_close(), jtag_libusb_open(), LOG_ERROR, LOG_INFO, NULL, serial, TAP_RESET, tap_set_state, and cklink_ctx::usb_dev.
|
static |
Definition at line 233 of file cklink.c.
References cklink_frame_end(), CKLINK_FRAME_OVERHEAD, cklink_frame_start(), CKLINK_MAX_SCAN_BITS, CKLINK_OP_JTAG_BATCH, CKLINK_RESP_PAYLOAD_OFFSET, cklink_usb_xfer(), DIV_ROUND_UP, ERROR_FAIL, ERROR_OK, cklink_ctx::ir_bits, LOG_ERROR, LOG_WARNING, cklink_ctx::long_scan_warned, cklink_ctx::rx_buf, and cklink_ctx::tx_buf.
Referenced by cklink_execute_scan(), cklink_flush_pending_ir(), cklink_idle_cycles(), and cklink_probe_init().
|
static |
Definition at line 705 of file cklink.c.
References CKLINK_CLK_SOURCE_KHZ, cklink_khz_to_div(), ERROR_JTAG_NOT_IMPLEMENTED, ERROR_OK, LOG_ERROR, and LOG_WARNING.
|
static |
Definition at line 471 of file cklink.c.
References CKLINK_CLK_DIV_MAX, CKLINK_CLK_DIV_MIN, and CKLINK_CLK_SOURCE_KHZ.
Referenced by cklink_khz(), and cklink_speed().
|
static |
Definition at line 581 of file cklink.c.
References cklink_jtag_scan(), CKLINK_PLACEHOLDER_IR_BITS, CKLINK_PLACEHOLDER_IR_VALUE, CKLINK_SELFREG_BYTES, cklink_selfreg_read(), cklink_selfreg_write(), CKLINK_SR0_MODE_JTAG, CKLINK_SR0_RUN_CLK_BYTE, CKLINK_SR0_SETUP_CLK_BYTE, CKLINK_SR1_INIT_VALUE, CKLINK_SR8_INIT_VALUE, CKLINK_SR_CSR, CKLINK_SR_JTAG_CONFIG, CKLINK_SR_MTCR_WAIT, cklink_write_csr(), cklink_ctx::csr_clk, ERROR_OK, h_u32_to_le(), LOG_WARNING, and NULL.
Referenced by cklink_init().
|
static |
Definition at line 671 of file cklink.c.
References cklink_handle, CKLINK_USB_INTERFACE, ERROR_OK, jtag_libusb_close(), NULL, cklink_ctx::scan_tdi, cklink_ctx::scan_tdo, and cklink_ctx::usb_dev.
|
static |
Definition at line 208 of file cklink.c.
References cklink_frame_end(), CKLINK_FRAME_OVERHEAD, cklink_frame_start(), CKLINK_OP_SELFREG_READ, CKLINK_RESP_PAYLOAD_OFFSET, CKLINK_SELFREG_BYTES, cklink_usb_xfer(), ERROR_FAIL, ERROR_OK, LOG_ERROR, cklink_ctx::rx_buf, and cklink_ctx::tx_buf.
Referenced by cklink_probe_init().
|
static |
Definition at line 197 of file cklink.c.
References cklink_frame_end(), cklink_frame_start(), CKLINK_OP_SELFREG_WRITE, CKLINK_SELFREG_BYTES, cklink_usb_xfer(), NULL, and cklink_ctx::tx_buf.
Referenced by cklink_probe_init(), and cklink_write_csr().
|
static |
Definition at line 686 of file cklink.c.
References CKLINK_CLK_SOURCE_KHZ, cklink_handle, cklink_khz_to_div(), CKLINK_SR0_MODE_JTAG, cklink_write_csr(), cklink_ctx::csr_clk, ERROR_OK, and LOG_DEBUG.
|
static |
|
static |
Definition at line 128 of file cklink.c.
References cklink_checksum(), CKLINK_EP_IN, CKLINK_EP_OUT, CKLINK_FRAME_END, CKLINK_FRAME_OVERHEAD, CKLINK_FRAME_START, CKLINK_OP_JTAG_BATCH, CKLINK_USB_BUF_SIZE, CKLINK_USB_TIMEOUT_MS, ERROR_FAIL, ERROR_OK, jtag_libusb_bulk_read(), jtag_libusb_bulk_write(), LOG_DEBUG, LOG_ERROR, cklink_ctx::rx_buf, cklink_ctx::tx_buf, and cklink_ctx::usb_dev.
Referenced by cklink_jtag_scan(), cklink_selfreg_read(), and cklink_selfreg_write().
|
static |
Definition at line 463 of file cklink.c.
References CKLINK_CSR, CKLINK_SELFREG_BYTES, cklink_selfreg_write(), CKLINK_SR_CSR, h_u32_to_le(), and mode.
Referenced by cklink_execute_tlr_reset(), cklink_probe_init(), and cklink_speed().
| struct adapter_driver cklink_adapter_driver |
|
static |
|
static |
|
static |
Definition at line 103 of file cklink.c.
Referenced by cklink_execute_queue(), cklink_init(), cklink_quit(), and cklink_speed().
|
static |