OpenOCD
|
Go to the source code of this file.
Macros | |
#define | APB_AP_IDR 0x44770002 |
#define | RSH_CORESIGHT_CTL 0x0e00 |
#define | RSH_CORESIGHT_CTL_ACTION_MASK 0x2ULL |
#define | RSH_CORESIGHT_CTL_ACTION_SHIFT 1 |
#define | RSH_CORESIGHT_CTL_ADDR_MASK 0x7ffffffcULL |
#define | RSH_CORESIGHT_CTL_ADDR_SHIFT 2 |
#define | RSH_CORESIGHT_CTL_DATA_MASK 0xffffffff00000000ULL |
#define | RSH_CORESIGHT_CTL_DATA_SHIFT 32 |
#define | RSH_CORESIGHT_CTL_ERR_MASK 0x80000000ULL |
#define | RSH_CORESIGHT_CTL_ERR_SHIFT 31 |
#define | RSH_CORESIGHT_CTL_GO_MASK 0x1ULL |
#define | RSH_CORESIGHT_CTL_GO_SHIFT 0 |
#define | RSH_CS_GET_FIELD(reg, field) |
#define | RSH_CS_ROM_BASE 0x80000000 |
#define | RSH_CS_SET_FIELD(reg, field, value) |
#define | RSH_CS_TILE_BASE 0x44000000 |
#define | RSH_CS_TILE_SIZE 0x04000000 |
#define | RSH_MMIO_CHANNEL_RSHIM 0x1 |
#define | RSHIM_DEV_PATH_DEFAULT "/dev/rshim0/rshim" |
Functions | |
static void | ap_addr_2_tile (int *tile, uint32_t *addr) |
COMMAND_HANDLER (rshim_dap_device_command) | |
static int | coresight_read (uint32_t tile, uint32_t addr, uint32_t *value) |
static int | coresight_write (uint32_t tile, uint32_t addr, uint32_t wdata) |
static int | rshim_ap_q_abort (struct adiv5_dap *dap, uint8_t *ack) |
static int | rshim_ap_q_read (struct adiv5_ap *ap, unsigned int reg, uint32_t *data) |
static int | rshim_ap_q_write (struct adiv5_ap *ap, unsigned int reg, uint32_t data) |
static int | rshim_connect (struct adiv5_dap *dap) |
static int | rshim_dap_init (void) |
static int | rshim_dap_khz (int khz, int *jtag_speed) |
static int | rshim_dap_quit (void) |
static int | rshim_dap_reset (int req_trst, int req_srst) |
static int | rshim_dap_speed (int speed) |
static int | rshim_dap_speed_div (int speed, int *khz) |
static int | rshim_dev_read (int chan, int addr, uint64_t *value) |
static int | rshim_dev_write (int chan, int addr, uint64_t value) |
static void | rshim_disconnect (struct adiv5_dap *dap) |
static int | rshim_dp_q_read (struct adiv5_dap *dap, unsigned int reg, uint32_t *data) |
static int | rshim_dp_q_write (struct adiv5_dap *dap, unsigned int reg, uint32_t data) |
static int | rshim_dp_run (struct adiv5_dap *dap) |
Variables | |
static uint32_t | ap_bank |
static uint32_t | ap_csw |
static uint32_t | ap_drw |
static uint32_t | ap_sel |
static uint32_t | ap_tar |
static uint32_t | ap_tar_inc |
static uint32_t | dp_ctrl_stat |
static uint32_t | dp_id_code |
struct adapter_driver | rshim_dap_adapter_driver |
static const struct command_registration | rshim_dap_command_handlers [] |
static const struct dap_ops | rshim_dap_ops |
static int | rshim_dap_retval = ERROR_OK |
static const struct command_registration | rshim_dap_subcommand_handlers [] |
static const char *const | rshim_dap_transport [] = { "dapdirect_swd", NULL } |
static char * | rshim_dev_path |
static int | rshim_fd = -1 |
static int(* | rshim_read )(int chan, int addr, uint64_t *value) |
static int(* | rshim_write )(int chan, int addr, uint64_t value) |
#define RSH_CS_GET_FIELD | ( | reg, | |
field | |||
) |
#define RSH_CS_SET_FIELD | ( | reg, | |
field, | |||
value | |||
) |
|
static |
Definition at line 141 of file rshim.c.
References addr, RSH_CS_ROM_BASE, RSH_CS_TILE_BASE, and RSH_CS_TILE_SIZE.
Referenced by rshim_ap_q_read(), and rshim_ap_q_write().
COMMAND_HANDLER | ( | rshim_dap_device_command | ) |
Definition at line 435 of file rshim.c.
References CMD, CMD_ARGC, CMD_ARGV, command_print(), ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, and rshim_dev_path.
|
static |
Definition at line 193 of file rshim.c.
References ADDR, addr, ERROR_FAIL, ERROR_OK, LOG_ERROR, RSH_CORESIGHT_CTL, RSH_CS_GET_FIELD, RSH_CS_SET_FIELD, RSH_MMIO_CHANNEL_RSHIM, rshim_read, and rshim_write.
Referenced by rshim_ap_q_read().
|
static |
Definition at line 159 of file rshim.c.
References ADDR, addr, ERROR_FAIL, ERROR_OK, LOG_ERROR, RSH_CORESIGHT_CTL, RSH_CS_GET_FIELD, RSH_CS_SET_FIELD, RSH_MMIO_CHANNEL_RSHIM, rshim_read, and rshim_write.
Referenced by rshim_ap_q_write().
|
static |
|
static |
Definition at line 268 of file rshim.c.
References addr, ADIV5_AP_REG_IDR, ADIV5_MEM_AP_REG_BASE, ADIV5_MEM_AP_REG_BD0, ADIV5_MEM_AP_REG_BD1, ADIV5_MEM_AP_REG_BD2, ADIV5_MEM_AP_REG_BD3, ADIV5_MEM_AP_REG_CFG, ADIV5_MEM_AP_REG_CSW, ADIV5_MEM_AP_REG_DRW, ap_addr_2_tile(), ap_csw, adiv5_ap::ap_num, ap_tar, ap_tar_inc, APB_AP_IDR, coresight_read(), CSW_ADDRINC_MASK, adiv5_ap::dap, ERROR_FAIL, ERROR_OK, is_adiv6(), LOG_ERROR, LOG_INFO, RSH_CS_ROM_BASE, and rshim_dap_retval.
|
static |
Definition at line 332 of file rshim.c.
References addr, ADIV5_MEM_AP_REG_BD0, ADIV5_MEM_AP_REG_BD1, ADIV5_MEM_AP_REG_BD2, ADIV5_MEM_AP_REG_BD3, ADIV5_MEM_AP_REG_CSW, ADIV5_MEM_AP_REG_DRW, ADIV5_MEM_AP_REG_TAR, ap_addr_2_tile(), ap_bank, ap_csw, ap_drw, ap_tar, ap_tar_inc, coresight_write(), CSW_ADDRINC_MASK, adiv5_ap::dap, ERROR_FAIL, ERROR_OK, is_adiv6(), LOG_ERROR, and rshim_dap_retval.
|
static |
Definition at line 406 of file rshim.c.
References ERROR_FAIL, ERROR_OK, LOG_ERROR, rshim_dev_path, RSHIM_DEV_PATH_DEFAULT, rshim_dev_read(), rshim_dev_write(), rshim_fd, rshim_read, and rshim_write.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 98 of file rshim.c.
References addr, and rshim_fd.
Referenced by rshim_connect().
|
static |
Definition at line 120 of file rshim.c.
References addr, and rshim_fd.
Referenced by rshim_connect().
|
static |
|
static |
Definition at line 227 of file rshim.c.
References CDBGPWRUPACK, CSYSPWRUPACK, DP_CTRL_STAT, DP_DPIDR, dp_id_code, and ERROR_OK.
|
static |
Definition at line 249 of file rshim.c.
References ap_bank, ap_sel, dp_ctrl_stat, DP_CTRL_STAT, DP_SELECT, DP_SELECT_APBANK, DP_SELECT_APSEL, ERROR_OK, and LOG_INFO.
|
static |
Definition at line 396 of file rshim.c.
References ERROR_OK, and rshim_dap_retval.
|
static |
Definition at line 77 of file rshim.c.
Referenced by rshim_ap_q_write(), and rshim_dp_q_write().
|
static |
Definition at line 78 of file rshim.c.
Referenced by rshim_ap_q_read(), and rshim_ap_q_write().
|
static |
Definition at line 79 of file rshim.c.
Referenced by rshim_ap_q_write().
|
static |
Definition at line 77 of file rshim.c.
Referenced by rshim_dp_q_write().
|
static |
Definition at line 80 of file rshim.c.
Referenced by rshim_ap_q_read(), and rshim_ap_q_write().
|
static |
Definition at line 80 of file rshim.c.
Referenced by rshim_ap_q_read(), and rshim_ap_q_write().
|
static |
Definition at line 75 of file rshim.c.
Referenced by rshim_dp_q_write().
|
static |
Definition at line 76 of file rshim.c.
Referenced by rshim_dp_q_read().
struct adapter_driver rshim_dap_adapter_driver |
|
static |
|
static |
|
static |
Definition at line 92 of file rshim.c.
Referenced by rshim_ap_q_read(), rshim_ap_q_write(), and rshim_dp_run().
|
static |
|
static |
|
static |
Definition at line 96 of file rshim.c.
Referenced by COMMAND_HANDLER(), and rshim_connect().
|
static |
Definition at line 89 of file rshim.c.
Referenced by rshim_connect(), rshim_dev_read(), rshim_dev_write(), and rshim_disconnect().
|
static |
Definition at line 83 of file rshim.c.
Referenced by coresight_read(), coresight_write(), and rshim_connect().
|
static |
Definition at line 84 of file rshim.c.
Referenced by coresight_read(), coresight_write(), and rshim_connect().