Go to the source code of this file.
|
| 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_quit (void) |
| |
| static int | rshim_dap_reset (int req_trst, int req_srst) |
| |
| 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) |
| |
◆ APB_AP_IDR
| #define APB_AP_IDR 0x44770002 |
◆ RSH_CORESIGHT_CTL
| #define RSH_CORESIGHT_CTL 0x0e00 |
◆ RSH_CORESIGHT_CTL_ACTION_MASK
| #define RSH_CORESIGHT_CTL_ACTION_MASK 0x2ULL |
◆ RSH_CORESIGHT_CTL_ACTION_SHIFT
| #define RSH_CORESIGHT_CTL_ACTION_SHIFT 1 |
◆ RSH_CORESIGHT_CTL_ADDR_MASK
| #define RSH_CORESIGHT_CTL_ADDR_MASK 0x7ffffffcULL |
◆ RSH_CORESIGHT_CTL_ADDR_SHIFT
| #define RSH_CORESIGHT_CTL_ADDR_SHIFT 2 |
◆ RSH_CORESIGHT_CTL_DATA_MASK
| #define RSH_CORESIGHT_CTL_DATA_MASK 0xffffffff00000000ULL |
◆ RSH_CORESIGHT_CTL_DATA_SHIFT
| #define RSH_CORESIGHT_CTL_DATA_SHIFT 32 |
◆ RSH_CORESIGHT_CTL_ERR_MASK
| #define RSH_CORESIGHT_CTL_ERR_MASK 0x80000000ULL |
◆ RSH_CORESIGHT_CTL_ERR_SHIFT
| #define RSH_CORESIGHT_CTL_ERR_SHIFT 31 |
◆ RSH_CORESIGHT_CTL_GO_MASK
| #define RSH_CORESIGHT_CTL_GO_MASK 0x1ULL |
◆ RSH_CORESIGHT_CTL_GO_SHIFT
| #define RSH_CORESIGHT_CTL_GO_SHIFT 0 |
◆ RSH_CS_GET_FIELD
| #define RSH_CS_GET_FIELD |
( |
|
reg, |
|
|
|
field |
|
) |
| |
Value: (((uint64_t)(
reg) & RSH_CORESIGHT_CTL_##field##_MASK) >> \
RSH_CORESIGHT_CTL_##field##_SHIFT)
Definition at line 52 of file rshim.c.
◆ RSH_CS_ROM_BASE
| #define RSH_CS_ROM_BASE 0x80000000 |
◆ RSH_CS_SET_FIELD
| #define RSH_CS_SET_FIELD |
( |
|
reg, |
|
|
|
field, |
|
|
|
value |
|
) |
| |
Value: (
reg) = (((
reg) & ~RSH_CORESIGHT_CTL_##field##_MASK) | \
(((uint64_t)(value) << RSH_CORESIGHT_CTL_##field##_SHIFT) & \
RSH_CORESIGHT_CTL_##field##_MASK))
Definition at line 56 of file rshim.c.
◆ RSH_CS_TILE_BASE
| #define RSH_CS_TILE_BASE 0x44000000 |
◆ RSH_CS_TILE_SIZE
| #define RSH_CS_TILE_SIZE 0x04000000 |
◆ RSH_MMIO_CHANNEL_RSHIM
| #define RSH_MMIO_CHANNEL_RSHIM 0x1 |
◆ RSHIM_DEV_PATH_DEFAULT
| #define RSHIM_DEV_PATH_DEFAULT "/dev/rshim0/rshim" |
◆ ap_addr_2_tile()
| static void ap_addr_2_tile |
( |
int * |
tile, |
|
|
uint32_t * |
addr |
|
) |
| |
|
static |
◆ COMMAND_HANDLER()
| COMMAND_HANDLER |
( |
rshim_dap_device_command |
| ) |
|
◆ coresight_read()
| static int coresight_read |
( |
uint32_t |
tile, |
|
|
uint32_t |
addr, |
|
|
uint32_t * |
value |
|
) |
| |
|
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().
◆ coresight_write()
| static int coresight_write |
( |
uint32_t |
tile, |
|
|
uint32_t |
addr, |
|
|
uint32_t |
wdata |
|
) |
| |
|
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().
◆ rshim_ap_q_abort()
| static int rshim_ap_q_abort |
( |
struct adiv5_dap * |
dap, |
|
|
uint8_t * |
ack |
|
) |
| |
|
static |
◆ rshim_ap_q_read()
| static int rshim_ap_q_read |
( |
struct adiv5_ap * |
ap, |
|
|
unsigned int |
reg, |
|
|
uint32_t * |
data |
|
) |
| |
|
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.
◆ rshim_ap_q_write()
| static int rshim_ap_q_write |
( |
struct adiv5_ap * |
ap, |
|
|
unsigned int |
reg, |
|
|
uint32_t |
data |
|
) |
| |
|
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.
◆ rshim_connect()
| static int rshim_connect |
( |
struct adiv5_dap * |
dap | ) |
|
|
static |
◆ rshim_dap_init()
| static int rshim_dap_init |
( |
void |
| ) |
|
|
static |
◆ rshim_dap_quit()
| static int rshim_dap_quit |
( |
void |
| ) |
|
|
static |
◆ rshim_dap_reset()
| static int rshim_dap_reset |
( |
int |
req_trst, |
|
|
int |
req_srst |
|
) |
| |
|
static |
◆ rshim_dev_read()
| static int rshim_dev_read |
( |
int |
chan, |
|
|
int |
addr, |
|
|
uint64_t * |
value |
|
) |
| |
|
static |
◆ rshim_dev_write()
| static int rshim_dev_write |
( |
int |
chan, |
|
|
int |
addr, |
|
|
uint64_t |
value |
|
) |
| |
|
static |
◆ rshim_disconnect()
| static void rshim_disconnect |
( |
struct adiv5_dap * |
dap | ) |
|
|
static |
◆ rshim_dp_q_read()
| static int rshim_dp_q_read |
( |
struct adiv5_dap * |
dap, |
|
|
unsigned int |
reg, |
|
|
uint32_t * |
data |
|
) |
| |
|
static |
◆ rshim_dp_q_write()
| static int rshim_dp_q_write |
( |
struct adiv5_dap * |
dap, |
|
|
unsigned int |
reg, |
|
|
uint32_t |
data |
|
) |
| |
|
static |
◆ rshim_dp_run()
| static int rshim_dp_run |
( |
struct adiv5_dap * |
dap | ) |
|
|
static |
◆ ap_bank
◆ ap_csw
◆ ap_drw
◆ ap_sel
◆ ap_tar
◆ ap_tar_inc
◆ dp_ctrl_stat
◆ dp_id_code
◆ rshim_dap_adapter_driver
Initial value:= {
.name = "rshim",
}
static int rshim_dap_reset(int req_trst, int req_srst)
static const struct dap_ops rshim_dap_ops
static const struct command_registration rshim_dap_command_handlers[]
static int rshim_dap_init(void)
static int rshim_dap_quit(void)
#define TRANSPORT_DAPDIRECT_SWD
Definition at line 477 of file rshim.c.
◆ rshim_dap_command_handlers
Initial value:= {
{
.name = "rshim",
.help = "perform rshim management",
},
}
#define COMMAND_REGISTRATION_DONE
Use this as the last entry in an array of command_registration records.
static const struct command_registration rshim_dap_subcommand_handlers[]
const char * usage
a string listing the options and arguments, required or optional
Definition at line 435 of file rshim.c.
◆ rshim_dap_ops
Initial value:= {
}
static int rshim_ap_q_write(struct adiv5_ap *ap, unsigned int reg, uint32_t data)
static int rshim_ap_q_read(struct adiv5_ap *ap, unsigned int reg, uint32_t *data)
static int rshim_connect(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_ap_q_abort(struct adiv5_dap *dap, uint8_t *ack)
static int rshim_dp_run(struct adiv5_dap *dap)
static void rshim_disconnect(struct adiv5_dap *dap)
Definition at line 477 of file rshim.c.
◆ rshim_dap_retval
◆ rshim_dap_subcommand_handlers
Initial value:= {
{
.name = "device",
.handler = rshim_dap_device_command,
.help = "set the rshim device",
.usage = "</dev/rshim<N>/rshim>",
},
}
Definition at line 435 of file rshim.c.
◆ rshim_dev_path
◆ rshim_fd
◆ rshim_read
| int(* rshim_read) (int chan, int addr, uint64_t *value) |
( |
int |
chan, |
|
|
int |
addr, |
|
|
uint64_t * |
value |
|
) |
| |
|
static |
◆ rshim_write
| int(* rshim_write) (int chan, int addr, uint64_t value) |
( |
int |
chan, |
|
|
int |
addr, |
|
|
uint64_t |
value |
|
) |
| |
|
static |