Preliminary support for Freescale i.MX53
[openocd/ellerodev.git] / src / target / arm11_dbgtap.h
blobe45bdc2d91b273d71b965c048ff674aa1e652561
1 #ifndef ARM11_DBGTAP_H
2 #define ARM11_DBGTAP_H
4 #include "arm11.h"
6 /* ARM11 internals */
8 void arm11_setup_field(struct arm11_common *arm11, int num_bits,
9 void *in_data, void *out_data, struct scan_field *field);
10 void arm11_add_IR(struct arm11_common *arm11,
11 uint8_t instr, tap_state_t state);
12 int arm11_add_debug_SCAN_N(struct arm11_common *arm11,
13 uint8_t chain, tap_state_t state);
14 int arm11_read_DSCR(struct arm11_common *arm11);
15 int arm11_write_DSCR(struct arm11_common *arm11, uint32_t dscr);
17 int arm11_run_instr_data_prepare(struct arm11_common *arm11);
18 int arm11_run_instr_data_finish(struct arm11_common *arm11);
19 int arm11_run_instr_no_data1(struct arm11_common *arm11, uint32_t opcode);
20 int arm11_run_instr_data_to_core(struct arm11_common *arm11,
21 uint32_t opcode, uint32_t *data, size_t count);
22 int arm11_run_instr_data_to_core_noack(struct arm11_common *arm11,
23 uint32_t opcode, uint32_t *data, size_t count);
24 int arm11_run_instr_data_to_core1(struct arm11_common *arm11,
25 uint32_t opcode, uint32_t data);
26 int arm11_run_instr_data_from_core(struct arm11_common *arm11,
27 uint32_t opcode, uint32_t *data, size_t count);
28 int arm11_run_instr_data_from_core_via_r0(struct arm11_common *arm11,
29 uint32_t opcode, uint32_t *data);
30 int arm11_run_instr_data_to_core_via_r0(struct arm11_common *arm11,
31 uint32_t opcode, uint32_t data);
33 void arm11_add_dr_scan_vc(struct jtag_tap *tap, int num_fields, struct scan_field *fields,
34 tap_state_t state);
36 /**
37 * Used with arm11_sc7_run to make a list of read/write commands for
38 * scan chain 7
40 struct arm11_sc7_action
42 bool write; /**< Access mode: true for write, false for read. */
43 uint8_t address; /**< Register address mode. Use enum #arm11_sc7 */
44 /**
45 * If write then set this to value to be written. In read mode
46 * this receives the read value when the function returns.
48 uint32_t value;
51 int arm11_sc7_run(struct arm11_common *arm11,
52 struct arm11_sc7_action *actions, size_t count);
54 /* Mid-level helper functions */
55 int arm11_sc7_clear_vbw(struct arm11_common *arm11);
56 int arm11_sc7_set_vcr(struct arm11_common *arm11, uint32_t value);
58 int arm11_read_memory_word(struct arm11_common *arm11,
59 uint32_t address, uint32_t *result);
61 int arm11_dpm_init(struct arm11_common *arm11, uint32_t didr);
62 int arm11_bpwp_flush(struct arm11_common *arm11);
64 #endif // ARM11_DBGTAP_H