OpenOCD
arm_cti.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define CTI_APPCLEAR   0x18
 
#define CTI_APPPULSE   0x1C
 
#define CTI_APPSET   0x14
 
#define CTI_CHIN_STATUS   0x138
 
#define CTI_CHNL(x)   (1 << x)
 
#define CTI_CHOU_STATUS   0x13C
 
#define CTI_CTR   0x0
 
#define CTI_DEVCTL   0x150
 
#define CTI_GATE   0x140
 
#define CTI_INACK   0x10
 
#define CTI_INEN(n)   (0x20 + 4 * n)
 
#define CTI_INEN0   0x20
 
#define CTI_INEN1   0x24
 
#define CTI_INEN2   0x28
 
#define CTI_INEN3   0x2C
 
#define CTI_INEN4   0x30
 
#define CTI_INEN5   0x34
 
#define CTI_INEN6   0x38
 
#define CTI_INEN7   0x3C
 
#define CTI_INEN8   0x40
 
#define CTI_OUTEN(n)   (0xA0 + 4 * n)
 
#define CTI_OUTEN0   0xA0
 
#define CTI_OUTEN1   0xA4
 
#define CTI_OUTEN2   0xA8
 
#define CTI_OUTEN3   0xAC
 
#define CTI_OUTEN4   0xB0
 
#define CTI_OUTEN5   0xB4
 
#define CTI_OUTEN6   0xB8
 
#define CTI_OUTEN7   0xBC
 
#define CTI_OUTEN8   0xC0
 
#define CTI_TRIG(n)   (1 << CTI_TRIG_##n)
 
#define CTI_TRIG_HALT   0
 
#define CTI_TRIG_RESUME   1
 
#define CTI_TRIN_STATUS   0x130
 
#define CTI_TROUT_STATUS   0x134
 
#define CTI_UNLOCK   0xFB0
 

Functions

int arm_cti_ack_events (struct arm_cti *self, uint32_t event)
 
int arm_cti_cleanup_all (void)
 
int arm_cti_clear_channel (struct arm_cti *self, uint32_t channel)
 
int arm_cti_enable (struct arm_cti *self, bool enable)
 
int arm_cti_gate_channel (struct arm_cti *self, uint32_t channel)
 
const char * arm_cti_name (struct arm_cti *self)
 
int arm_cti_pulse_channel (struct arm_cti *self, uint32_t channel)
 
int arm_cti_read_reg (struct arm_cti *self, unsigned int reg, uint32_t *value)
 
int arm_cti_set_channel (struct arm_cti *self, uint32_t channel)
 
int arm_cti_ungate_channel (struct arm_cti *self, uint32_t channel)
 
int arm_cti_write_reg (struct arm_cti *self, unsigned int reg, uint32_t value)
 
struct arm_cticti_instance_by_jim_obj (Jim_Interp *interp, Jim_Obj *o)
 
int cti_register_commands (struct command_context *cmd_ctx)
 

Macro Definition Documentation

◆ CTI_APPCLEAR

#define CTI_APPCLEAR   0x18

Definition at line 15 of file arm_cti.h.

◆ CTI_APPPULSE

#define CTI_APPPULSE   0x1C

Definition at line 16 of file arm_cti.h.

◆ CTI_APPSET

#define CTI_APPSET   0x14

Definition at line 14 of file arm_cti.h.

◆ CTI_CHIN_STATUS

#define CTI_CHIN_STATUS   0x138

Definition at line 39 of file arm_cti.h.

◆ CTI_CHNL

#define CTI_CHNL (   x)    (1 << x)

Definition at line 45 of file arm_cti.h.

◆ CTI_CHOU_STATUS

#define CTI_CHOU_STATUS   0x13C

Definition at line 40 of file arm_cti.h.

◆ CTI_CTR

#define CTI_CTR   0x0

Definition at line 12 of file arm_cti.h.

◆ CTI_DEVCTL

#define CTI_DEVCTL   0x150

Definition at line 42 of file arm_cti.h.

◆ CTI_GATE

#define CTI_GATE   0x140

Definition at line 41 of file arm_cti.h.

◆ CTI_INACK

#define CTI_INACK   0x10

Definition at line 13 of file arm_cti.h.

◆ CTI_INEN

#define CTI_INEN (   n)    (0x20 + 4 * n)

Definition at line 26 of file arm_cti.h.

◆ CTI_INEN0

#define CTI_INEN0   0x20

Definition at line 17 of file arm_cti.h.

◆ CTI_INEN1

#define CTI_INEN1   0x24

Definition at line 18 of file arm_cti.h.

◆ CTI_INEN2

#define CTI_INEN2   0x28

Definition at line 19 of file arm_cti.h.

◆ CTI_INEN3

#define CTI_INEN3   0x2C

Definition at line 20 of file arm_cti.h.

◆ CTI_INEN4

#define CTI_INEN4   0x30

Definition at line 21 of file arm_cti.h.

◆ CTI_INEN5

#define CTI_INEN5   0x34

Definition at line 22 of file arm_cti.h.

◆ CTI_INEN6

#define CTI_INEN6   0x38

Definition at line 23 of file arm_cti.h.

◆ CTI_INEN7

#define CTI_INEN7   0x3C

Definition at line 24 of file arm_cti.h.

◆ CTI_INEN8

#define CTI_INEN8   0x40

Definition at line 25 of file arm_cti.h.

◆ CTI_OUTEN

#define CTI_OUTEN (   n)    (0xA0 + 4 * n)

Definition at line 36 of file arm_cti.h.

◆ CTI_OUTEN0

#define CTI_OUTEN0   0xA0

Definition at line 27 of file arm_cti.h.

◆ CTI_OUTEN1

#define CTI_OUTEN1   0xA4

Definition at line 28 of file arm_cti.h.

◆ CTI_OUTEN2

#define CTI_OUTEN2   0xA8

Definition at line 29 of file arm_cti.h.

◆ CTI_OUTEN3

#define CTI_OUTEN3   0xAC

Definition at line 30 of file arm_cti.h.

◆ CTI_OUTEN4

#define CTI_OUTEN4   0xB0

Definition at line 31 of file arm_cti.h.

◆ CTI_OUTEN5

#define CTI_OUTEN5   0xB4

Definition at line 32 of file arm_cti.h.

◆ CTI_OUTEN6

#define CTI_OUTEN6   0xB8

Definition at line 33 of file arm_cti.h.

◆ CTI_OUTEN7

#define CTI_OUTEN7   0xBC

Definition at line 34 of file arm_cti.h.

◆ CTI_OUTEN8

#define CTI_OUTEN8   0xC0

Definition at line 35 of file arm_cti.h.

◆ CTI_TRIG

#define CTI_TRIG (   n)    (1 << CTI_TRIG_##n)

Definition at line 48 of file arm_cti.h.

◆ CTI_TRIG_HALT

#define CTI_TRIG_HALT   0

Definition at line 46 of file arm_cti.h.

◆ CTI_TRIG_RESUME

#define CTI_TRIG_RESUME   1

Definition at line 47 of file arm_cti.h.

◆ CTI_TRIN_STATUS

#define CTI_TRIN_STATUS   0x130

Definition at line 37 of file arm_cti.h.

◆ CTI_TROUT_STATUS

#define CTI_TROUT_STATUS   0x134

Definition at line 38 of file arm_cti.h.

◆ CTI_UNLOCK

#define CTI_UNLOCK   0xFB0

Definition at line 43 of file arm_cti.h.

Function Documentation

◆ arm_cti_ack_events()

int arm_cti_ack_events ( struct arm_cti self,
uint32_t  event 
)

◆ arm_cti_cleanup_all()

int arm_cti_cleanup_all ( void  )

Definition at line 206 of file arm_cti.c.

References arm_cti::ap, dap_put_ap(), ERROR_OK, lh(), list_for_each_entry_safe, and arm_cti::name.

Referenced by openocd_main().

◆ arm_cti_clear_channel()

int arm_cti_clear_channel ( struct arm_cti self,
uint32_t  channel 
)

Definition at line 152 of file arm_cti.c.

References arm_cti_write_reg(), CTI_APPCLEAR, CTI_CHNL, and ERROR_COMMAND_ARGUMENT_INVALID.

Referenced by COMMAND_HANDLER().

◆ arm_cti_enable()

int arm_cti_enable ( struct arm_cti self,
bool  enable 
)

Definition at line 74 of file arm_cti.c.

References CTI_CTR, and mem_ap_write_atomic_u32().

Referenced by aarch64_init_debug_access(), and COMMAND_HANDLER().

◆ arm_cti_gate_channel()

int arm_cti_gate_channel ( struct arm_cti self,
uint32_t  channel 
)

◆ arm_cti_name()

const char* arm_cti_name ( struct arm_cti self)

Definition at line 30 of file arm_cti.c.

Referenced by aarch64_jim_configure().

◆ arm_cti_pulse_channel()

int arm_cti_pulse_channel ( struct arm_cti self,
uint32_t  channel 
)

◆ arm_cti_read_reg()

int arm_cti_read_reg ( struct arm_cti self,
unsigned int  reg,
uint32_t *  value 
)

Definition at line 128 of file arm_cti.c.

References ERROR_COMMAND_ARGUMENT_INVALID, and mem_ap_read_atomic_u32().

Referenced by COMMAND_HANDLER().

◆ arm_cti_set_channel()

int arm_cti_set_channel ( struct arm_cti self,
uint32_t  channel 
)

Definition at line 144 of file arm_cti.c.

References arm_cti_write_reg(), CTI_APPSET, CTI_CHNL, and ERROR_COMMAND_ARGUMENT_INVALID.

Referenced by COMMAND_HANDLER().

◆ arm_cti_ungate_channel()

int arm_cti_ungate_channel ( struct arm_cti self,
uint32_t  channel 
)

◆ arm_cti_write_reg()

int arm_cti_write_reg ( struct arm_cti self,
unsigned int  reg,
uint32_t  value 
)

◆ cti_instance_by_jim_obj()

struct arm_cti* cti_instance_by_jim_obj ( Jim_Interp *  interp,
Jim_Obj *  o 
)

Definition at line 35 of file arm_cti.c.

References lh(), list_for_each_entry, arm_cti::name, name, and NULL.

Referenced by aarch64_jim_configure().

◆ cti_register_commands()

int cti_register_commands ( struct command_context cmd_ctx)

Definition at line 567 of file arm_cti.c.

Referenced by setup_command_handler().