X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=src%2Ftarget%2Farm11_dbgtap.h;h=7f48ec4fe32d216e2b58006c208bf0a7229b7b49;hp=fb37faa9fa840f4a5b074a84fff7072da9327190;hb=refs%2Fchanges%2F26%2F1426%2F4;hpb=d0809ac060b35a04e7f0bceb96e1868663bd18df diff --git a/src/target/arm11_dbgtap.h b/src/target/arm11_dbgtap.h index fb37faa9fa..7f48ec4fe3 100644 --- a/src/target/arm11_dbgtap.h +++ b/src/target/arm11_dbgtap.h @@ -1,3 +1,25 @@ +/*************************************************************************** + * Copyright (C) 2008 digenius technology GmbH. * + * Michael Bruck * + * * + * Copyright (C) 2008,2009 Oyvind Harboe oyvind.harboe@zylin.com * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * + ***************************************************************************/ + #ifndef ARM11_DBGTAP_H #define ARM11_DBGTAP_H @@ -5,65 +27,59 @@ /* ARM11 internals */ -void arm11_setup_field(arm11_common_t *arm11, int num_bits, +void arm11_setup_field(struct arm11_common *arm11, int num_bits, void *in_data, void *out_data, struct scan_field *field); -void arm11_add_IR(arm11_common_t *arm11, +void arm11_add_IR(struct arm11_common *arm11, uint8_t instr, tap_state_t state); -int arm11_add_debug_SCAN_N(arm11_common_t *arm11, +int arm11_add_debug_SCAN_N(struct arm11_common *arm11, uint8_t chain, tap_state_t state); -void arm11_add_debug_INST(arm11_common_t *arm11, - uint32_t inst, uint8_t *flag, tap_state_t state); -int arm11_read_DSCR(arm11_common_t *arm11, uint32_t *dscr); -int arm11_write_DSCR(arm11_common_t *arm11, uint32_t dscr); - -enum target_debug_reason arm11_get_DSCR_debug_reason(uint32_t dscr); +int arm11_read_DSCR(struct arm11_common *arm11); +int arm11_write_DSCR(struct arm11_common *arm11, uint32_t dscr); -int arm11_run_instr_data_prepare(arm11_common_t *arm11); -int arm11_run_instr_data_finish(arm11_common_t *arm11); -int arm11_run_instr_no_data(arm11_common_t *arm11, - uint32_t *opcode, size_t count); -int arm11_run_instr_no_data1(arm11_common_t *arm11, uint32_t opcode); -int arm11_run_instr_data_to_core(arm11_common_t *arm11, +int arm11_run_instr_data_prepare(struct arm11_common *arm11); +int arm11_run_instr_data_finish(struct arm11_common *arm11); +int arm11_run_instr_no_data1(struct arm11_common *arm11, uint32_t opcode); +int arm11_run_instr_data_to_core(struct arm11_common *arm11, uint32_t opcode, uint32_t *data, size_t count); -int arm11_run_instr_data_to_core_noack(arm11_common_t *arm11, +int arm11_run_instr_data_to_core_noack(struct arm11_common *arm11, uint32_t opcode, uint32_t *data, size_t count); -int arm11_run_instr_data_to_core1(arm11_common_t *arm11, +int arm11_run_instr_data_to_core1(struct arm11_common *arm11, uint32_t opcode, uint32_t data); -int arm11_run_instr_data_from_core(arm11_common_t *arm11, +int arm11_run_instr_data_from_core(struct arm11_common *arm11, uint32_t opcode, uint32_t *data, size_t count); -int arm11_run_instr_data_from_core_via_r0(arm11_common_t *arm11, +int arm11_run_instr_data_from_core_via_r0(struct arm11_common *arm11, uint32_t opcode, uint32_t *data); -int arm11_run_instr_data_to_core_via_r0(arm11_common_t *arm11, +int arm11_run_instr_data_to_core_via_r0(struct arm11_common *arm11, uint32_t opcode, uint32_t data); -int arm11_add_dr_scan_vc(int num_fields, struct scan_field *fields, - tap_state_t state); -int arm11_add_ir_scan_vc(int num_fields, struct scan_field *fields, +void arm11_add_dr_scan_vc(struct jtag_tap *tap, int num_fields, struct scan_field *fields, tap_state_t state); /** * Used with arm11_sc7_run to make a list of read/write commands for * scan chain 7 */ -typedef struct arm11_sc7_action_s -{ - bool write; /**< Access mode: true for write, false for read. */ - uint8_t address; /**< Register address mode. Use enum #arm11_sc7 */ +struct arm11_sc7_action { + bool write; /**< Access mode: true for write, false for read. */ + uint8_t address;/**< Register address mode. Use enum #arm11_sc7 */ /** * If write then set this to value to be written. In read mode * this receives the read value when the function returns. */ uint32_t value; -} arm11_sc7_action_t; +}; -int arm11_sc7_run(arm11_common_t *arm11, - arm11_sc7_action_t *actions, size_t count); +int arm11_sc7_run(struct arm11_common *arm11, + struct arm11_sc7_action *actions, size_t count); /* Mid-level helper functions */ -void arm11_sc7_clear_vbw(arm11_common_t *arm11); -void arm11_sc7_set_vcr(arm11_common_t *arm11, uint32_t value); +int arm11_sc7_clear_vbw(struct arm11_common *arm11); +int arm11_sc7_set_vcr(struct arm11_common *arm11, uint32_t value); -int arm11_read_memory_word(arm11_common_t *arm11, +int arm11_read_memory_word(struct arm11_common *arm11, uint32_t address, uint32_t *result); -#endif // ARM11_DBGTAP_H +int arm11_dpm_init(struct arm11_common *arm11, uint32_t didr); +int arm11_bpwp_flush(struct arm11_common *arm11); + +#endif /* ARM11_DBGTAP_H */