Remove misleading typedef and redundant suffix from struct swjdp_common.
***************************************************************************/
/* Scan out and in from target ordered uint8_t buffers */
-int adi_jtag_dp_scan(swjdp_common_t *swjdp, uint8_t instr, uint8_t reg_addr, uint8_t RnW, uint8_t *outvalue, uint8_t *invalue, uint8_t *ack)
+int adi_jtag_dp_scan(struct swjdp_common *swjdp, uint8_t instr, uint8_t reg_addr, uint8_t RnW, uint8_t *outvalue, uint8_t *invalue, uint8_t *ack)
{
arm_jtag_t *jtag_info = swjdp->jtag_info;
struct scan_field fields[2];
}
/* Scan out and in from host ordered uint32_t variables */
-int adi_jtag_dp_scan_u32(swjdp_common_t *swjdp, uint8_t instr, uint8_t reg_addr, uint8_t RnW, uint32_t outvalue, uint32_t *invalue, uint8_t *ack)
+int adi_jtag_dp_scan_u32(struct swjdp_common *swjdp, uint8_t instr, uint8_t reg_addr, uint8_t RnW, uint32_t outvalue, uint32_t *invalue, uint8_t *ack)
{
arm_jtag_t *jtag_info = swjdp->jtag_info;
struct scan_field fields[2];
}
/* scan_inout_check adds one extra inscan for DPAP_READ commands to read variables */
-int scan_inout_check(swjdp_common_t *swjdp, uint8_t instr, uint8_t reg_addr, uint8_t RnW, uint8_t *outvalue, uint8_t *invalue)
+int scan_inout_check(struct swjdp_common *swjdp, uint8_t instr, uint8_t reg_addr, uint8_t RnW, uint8_t *outvalue, uint8_t *invalue)
{
adi_jtag_dp_scan(swjdp, instr, reg_addr, RnW, outvalue, NULL, NULL);
return ERROR_OK;
}
-int scan_inout_check_u32(swjdp_common_t *swjdp, uint8_t instr, uint8_t reg_addr, uint8_t RnW, uint32_t outvalue, uint32_t *invalue)
+int scan_inout_check_u32(struct swjdp_common *swjdp, uint8_t instr, uint8_t reg_addr, uint8_t RnW, uint32_t outvalue, uint32_t *invalue)
{
adi_jtag_dp_scan_u32(swjdp, instr, reg_addr, RnW, outvalue, NULL, NULL);
return ERROR_OK;
}
-int swjdp_transaction_endcheck(swjdp_common_t *swjdp)
+int swjdp_transaction_endcheck(struct swjdp_common *swjdp)
{
int retval;
uint32_t ctrlstat;
* *
***************************************************************************/
-int dap_dp_write_reg(swjdp_common_t *swjdp, uint32_t value, uint8_t reg_addr)
+int dap_dp_write_reg(struct swjdp_common *swjdp, uint32_t value, uint8_t reg_addr)
{
return scan_inout_check_u32(swjdp, DAP_IR_DPACC, reg_addr, DPAP_WRITE, value, NULL);
}
-int dap_dp_read_reg(swjdp_common_t *swjdp, uint32_t *value, uint8_t reg_addr)
+int dap_dp_read_reg(struct swjdp_common *swjdp, uint32_t *value, uint8_t reg_addr)
{
return scan_inout_check_u32(swjdp, DAP_IR_DPACC, reg_addr, DPAP_READ, 0, value);
}
-int dap_ap_select(swjdp_common_t *swjdp,uint8_t apsel)
+int dap_ap_select(struct swjdp_common *swjdp,uint8_t apsel)
{
uint32_t select;
select = (apsel << 24) & 0xFF000000;
return ERROR_OK;
}
-int dap_dp_bankselect(swjdp_common_t *swjdp,uint32_t ap_reg)
+int dap_dp_bankselect(struct swjdp_common *swjdp,uint32_t ap_reg)
{
uint32_t select;
select = (ap_reg & 0x000000F0);
return ERROR_OK;
}
-int dap_ap_write_reg(swjdp_common_t *swjdp, uint32_t reg_addr, uint8_t* out_value_buf)
+int dap_ap_write_reg(struct swjdp_common *swjdp, uint32_t reg_addr, uint8_t* out_value_buf)
{
dap_dp_bankselect(swjdp, reg_addr);
scan_inout_check(swjdp, DAP_IR_APACC, reg_addr, DPAP_WRITE, out_value_buf, NULL);
return ERROR_OK;
}
-int dap_ap_read_reg(swjdp_common_t *swjdp, uint32_t reg_addr, uint8_t *in_value_buf)
+int dap_ap_read_reg(struct swjdp_common *swjdp, uint32_t reg_addr, uint8_t *in_value_buf)
{
dap_dp_bankselect(swjdp, reg_addr);
scan_inout_check(swjdp, DAP_IR_APACC, reg_addr, DPAP_READ, 0, in_value_buf);
return ERROR_OK;
}
-int dap_ap_write_reg_u32(swjdp_common_t *swjdp, uint32_t reg_addr, uint32_t value)
+int dap_ap_write_reg_u32(struct swjdp_common *swjdp, uint32_t reg_addr, uint32_t value)
{
uint8_t out_value_buf[4];
return ERROR_OK;
}
-int dap_ap_read_reg_u32(swjdp_common_t *swjdp, uint32_t reg_addr, uint32_t *value)
+int dap_ap_read_reg_u32(struct swjdp_common *swjdp, uint32_t reg_addr, uint32_t *value)
{
dap_dp_bankselect(swjdp, reg_addr);
scan_inout_check_u32(swjdp, DAP_IR_APACC, reg_addr, DPAP_READ, 0, value);
* *
***************************************************************************/
-int dap_setup_accessport(swjdp_common_t *swjdp, uint32_t csw, uint32_t tar)
+int dap_setup_accessport(struct swjdp_common *swjdp, uint32_t csw, uint32_t tar)
{
csw = csw | CSW_DBGSWENABLE | CSW_MASTER_DEBUG | CSW_HPROT;
if (csw != swjdp->ap_csw_value)
/*****************************************************************************
* *
-* mem_ap_read_u32(swjdp_common_t *swjdp, uint32_t address, uint32_t *value) *
+* mem_ap_read_u32(struct swjdp_common *swjdp, uint32_t address, uint32_t *value) *
* *
* Read a uint32_t value from memory or system register *
* Functionally equivalent to target_read_u32(target, address, uint32_t *value), *
* but with less overhead *
*****************************************************************************/
-int mem_ap_read_u32(swjdp_common_t *swjdp, uint32_t address, uint32_t *value)
+int mem_ap_read_u32(struct swjdp_common *swjdp, uint32_t address, uint32_t *value)
{
swjdp->trans_mode = TRANS_MODE_COMPOSITE;
return ERROR_OK;
}
-int mem_ap_read_atomic_u32(swjdp_common_t *swjdp, uint32_t address, uint32_t *value)
+int mem_ap_read_atomic_u32(struct swjdp_common *swjdp, uint32_t address, uint32_t *value)
{
mem_ap_read_u32(swjdp, address, value);
/*****************************************************************************
* *
-* mem_ap_write_u32(swjdp_common_t *swjdp, uint32_t address, uint32_t value) *
+* mem_ap_write_u32(struct swjdp_common *swjdp, uint32_t address, uint32_t value) *
* *
* Write a uint32_t value to memory or memory mapped register *
* *
*****************************************************************************/
-int mem_ap_write_u32(swjdp_common_t *swjdp, uint32_t address, uint32_t value)
+int mem_ap_write_u32(struct swjdp_common *swjdp, uint32_t address, uint32_t value)
{
swjdp->trans_mode = TRANS_MODE_COMPOSITE;
return ERROR_OK;
}
-int mem_ap_write_atomic_u32(swjdp_common_t *swjdp, uint32_t address, uint32_t value)
+int mem_ap_write_atomic_u32(struct swjdp_common *swjdp, uint32_t address, uint32_t value)
{
mem_ap_write_u32(swjdp, address, value);
/*****************************************************************************
* *
-* mem_ap_write_buf(swjdp_common_t *swjdp, uint8_t *buffer, int count, uint32_t address) *
+* mem_ap_write_buf(struct swjdp_common *swjdp, uint8_t *buffer, int count, uint32_t address) *
* *
* Write a buffer in target order (little endian) *
* *
*****************************************************************************/
-int mem_ap_write_buf_u32(swjdp_common_t *swjdp, uint8_t *buffer, int count, uint32_t address)
+int mem_ap_write_buf_u32(struct swjdp_common *swjdp, uint8_t *buffer, int count, uint32_t address)
{
int wcount, blocksize, writecount, errorcount = 0, retval = ERROR_OK;
uint32_t adr = address;
return retval;
}
-int mem_ap_write_buf_packed_u16(swjdp_common_t *swjdp, uint8_t *buffer, int count, uint32_t address)
+int mem_ap_write_buf_packed_u16(struct swjdp_common *swjdp, uint8_t *buffer, int count, uint32_t address)
{
int retval = ERROR_OK;
int wcount, blocksize, writecount, i;
return retval;
}
-int mem_ap_write_buf_u16(swjdp_common_t *swjdp, uint8_t *buffer, int count, uint32_t address)
+int mem_ap_write_buf_u16(struct swjdp_common *swjdp, uint8_t *buffer, int count, uint32_t address)
{
int retval = ERROR_OK;
return retval;
}
-int mem_ap_write_buf_packed_u8(swjdp_common_t *swjdp, uint8_t *buffer, int count, uint32_t address)
+int mem_ap_write_buf_packed_u8(struct swjdp_common *swjdp, uint8_t *buffer, int count, uint32_t address)
{
int retval = ERROR_OK;
int wcount, blocksize, writecount, i;
return retval;
}
-int mem_ap_write_buf_u8(swjdp_common_t *swjdp, uint8_t *buffer, int count, uint32_t address)
+int mem_ap_write_buf_u8(struct swjdp_common *swjdp, uint8_t *buffer, int count, uint32_t address)
{
int retval = ERROR_OK;
/*********************************************************************************
* *
-* mem_ap_read_buf_u32(swjdp_common_t *swjdp, uint8_t *buffer, int count, uint32_t address) *
+* mem_ap_read_buf_u32(struct swjdp_common *swjdp, uint8_t *buffer, int count, uint32_t address) *
* *
* Read block fast in target order (little endian) into a buffer *
* *
**********************************************************************************/
-int mem_ap_read_buf_u32(swjdp_common_t *swjdp, uint8_t *buffer, int count, uint32_t address)
+int mem_ap_read_buf_u32(struct swjdp_common *swjdp, uint8_t *buffer, int count, uint32_t address)
{
int wcount, blocksize, readcount, errorcount = 0, retval = ERROR_OK;
uint32_t adr = address;
return retval;
}
-int mem_ap_read_buf_packed_u16(swjdp_common_t *swjdp, uint8_t *buffer, int count, uint32_t address)
+int mem_ap_read_buf_packed_u16(struct swjdp_common *swjdp, uint8_t *buffer, int count, uint32_t address)
{
uint32_t invalue;
int retval = ERROR_OK;
return retval;
}
-int mem_ap_read_buf_u16(swjdp_common_t *swjdp, uint8_t *buffer, int count, uint32_t address)
+int mem_ap_read_buf_u16(struct swjdp_common *swjdp, uint8_t *buffer, int count, uint32_t address)
{
uint32_t invalue, i;
int retval = ERROR_OK;
* The solution is to arrange for a large out/in scan in this loop and
* and convert data afterwards.
*/
-int mem_ap_read_buf_packed_u8(swjdp_common_t *swjdp, uint8_t *buffer, int count, uint32_t address)
+int mem_ap_read_buf_packed_u8(struct swjdp_common *swjdp, uint8_t *buffer, int count, uint32_t address)
{
uint32_t invalue;
int retval = ERROR_OK;
return retval;
}
-int mem_ap_read_buf_u8(swjdp_common_t *swjdp, uint8_t *buffer, int count, uint32_t address)
+int mem_ap_read_buf_u8(struct swjdp_common *swjdp, uint8_t *buffer, int count, uint32_t address)
{
uint32_t invalue;
int retval = ERROR_OK;
return retval;
}
-int ahbap_debugport_init(swjdp_common_t *swjdp)
+int ahbap_debugport_init(struct swjdp_common *swjdp)
{
uint32_t idreg, romaddr, dummy;
uint32_t ctrlstat;
&& ((cid1 & 0x0f) == 0) && cid0 == 0x0d;
}
-int dap_info_command(struct command_context_s *cmd_ctx, swjdp_common_t *swjdp, int apsel)
+int dap_info_command(struct command_context_s *cmd_ctx, struct swjdp_common *swjdp, int apsel)
{
uint32_t dbgbase,apid;
arm_jtag_t *jtag_info;
};
-typedef struct swjdp_common_s
+struct swjdp_common
{
arm_jtag_t *jtag_info;
/* Control config */
/* Size of TAR autoincrement block, ARM ADI Specification requires at least 10 bits */
uint32_t tar_autoincr_block;
-} swjdp_common_t;
+};
/* Accessor function for currently selected DAP-AP number */
-static inline uint8_t dap_ap_get_select(swjdp_common_t *swjdp)
+static inline uint8_t dap_ap_get_select(struct swjdp_common *swjdp)
{
return (uint8_t)(swjdp ->apsel >> 24);
}
/* Internal functions used in the module, partial transactions, use with caution */
-int dap_dp_write_reg(swjdp_common_t *swjdp, uint32_t value, uint8_t reg_addr);
-/* int swjdp_write_apacc(swjdp_common_t *swjdp, uint32_t value, uint8_t reg_addr); */
-int dap_dp_read_reg(swjdp_common_t *swjdp, uint32_t *value, uint8_t reg_addr);
-/* int swjdp_read_apacc(swjdp_common_t *swjdp, uint32_t *value, uint8_t reg_addr); */
-int dap_setup_accessport(swjdp_common_t *swjdp, uint32_t csw, uint32_t tar);
-int dap_ap_select(swjdp_common_t *swjdp,uint8_t apsel);
-
-int dap_ap_write_reg(swjdp_common_t *swjdp, uint32_t addr, uint8_t* out_buf);
-int dap_ap_write_reg_u32(swjdp_common_t *swjdp, uint32_t addr, uint32_t value);
-int dap_ap_read_reg(swjdp_common_t *swjdp, uint32_t addr, uint8_t *in_buf);
-int dap_ap_read_reg_u32(swjdp_common_t *swjdp, uint32_t addr, uint32_t *value);
+int dap_dp_write_reg(struct swjdp_common *swjdp, uint32_t value, uint8_t reg_addr);
+/* int swjdp_write_apacc(struct swjdp_common *swjdp, uint32_t value, uint8_t reg_addr); */
+int dap_dp_read_reg(struct swjdp_common *swjdp, uint32_t *value, uint8_t reg_addr);
+/* int swjdp_read_apacc(struct swjdp_common *swjdp, uint32_t *value, uint8_t reg_addr); */
+int dap_setup_accessport(struct swjdp_common *swjdp, uint32_t csw, uint32_t tar);
+int dap_ap_select(struct swjdp_common *swjdp,uint8_t apsel);
+
+int dap_ap_write_reg(struct swjdp_common *swjdp, uint32_t addr, uint8_t* out_buf);
+int dap_ap_write_reg_u32(struct swjdp_common *swjdp, uint32_t addr, uint32_t value);
+int dap_ap_read_reg(struct swjdp_common *swjdp, uint32_t addr, uint8_t *in_buf);
+int dap_ap_read_reg_u32(struct swjdp_common *swjdp, uint32_t addr, uint32_t *value);
/* External interface, partial operations must be completed with swjdp_transaction_endcheck() */
-int swjdp_transaction_endcheck(swjdp_common_t *swjdp);
+int swjdp_transaction_endcheck(struct swjdp_common *swjdp);
/* MEM-AP memory mapped bus single uint32_t register transfers, without endcheck */
-int mem_ap_read_u32(swjdp_common_t *swjdp, uint32_t address, uint32_t *value);
-int mem_ap_write_u32(swjdp_common_t *swjdp, uint32_t address, uint32_t value);
+int mem_ap_read_u32(struct swjdp_common *swjdp, uint32_t address, uint32_t *value);
+int mem_ap_write_u32(struct swjdp_common *swjdp, uint32_t address, uint32_t value);
/* MEM-AP memory mapped bus transfers, single registers, complete transactions */
-int mem_ap_read_atomic_u32(swjdp_common_t *swjdp,
+int mem_ap_read_atomic_u32(struct swjdp_common *swjdp,
uint32_t address, uint32_t *value);
-int mem_ap_write_atomic_u32(swjdp_common_t *swjdp,
+int mem_ap_write_atomic_u32(struct swjdp_common *swjdp,
uint32_t address, uint32_t value);
/* MEM-AP memory mapped bus block transfers */
-int mem_ap_read_buf_u8(swjdp_common_t *swjdp,
+int mem_ap_read_buf_u8(struct swjdp_common *swjdp,
uint8_t *buffer, int count, uint32_t address);
-int mem_ap_read_buf_u16(swjdp_common_t *swjdp,
+int mem_ap_read_buf_u16(struct swjdp_common *swjdp,
uint8_t *buffer, int count, uint32_t address);
-int mem_ap_read_buf_u32(swjdp_common_t *swjdp,
+int mem_ap_read_buf_u32(struct swjdp_common *swjdp,
uint8_t *buffer, int count, uint32_t address);
-int mem_ap_write_buf_u8(swjdp_common_t *swjdp,
+int mem_ap_write_buf_u8(struct swjdp_common *swjdp,
uint8_t *buffer, int count, uint32_t address);
-int mem_ap_write_buf_u16(swjdp_common_t *swjdp,
+int mem_ap_write_buf_u16(struct swjdp_common *swjdp,
uint8_t *buffer, int count, uint32_t address);
-int mem_ap_write_buf_u32(swjdp_common_t *swjdp,
+int mem_ap_write_buf_u32(struct swjdp_common *swjdp,
uint8_t *buffer, int count, uint32_t address);
/* Initialisation of the debug system, power domains and registers */
-int ahbap_debugport_init(swjdp_common_t *swjdp);
+int ahbap_debugport_init(struct swjdp_common *swjdp);
/* Commands for user dap access */
int dap_info_command(struct command_context_s *cmd_ctx,
- swjdp_common_t *swjdp, int apsel);
+ struct swjdp_common *swjdp, int apsel);
#define DAP_COMMAND_HANDLER(name) \
- COMMAND_HELPER(name, swjdp_common_t *swjdp)
+ COMMAND_HELPER(name, struct swjdp_common *swjdp)
DAP_COMMAND_HANDLER(dap_baseaddr_command);
DAP_COMMAND_HANDLER(dap_memaccess_command);
DAP_COMMAND_HANDLER(dap_apsel_command);
{
target_t *target = get_current_target(cmd_ctx);
struct armv7a_common_s *armv7a = target_to_armv7a(target);
- swjdp_common_t *swjdp = &armv7a->swjdp_info;
+ struct swjdp_common *swjdp = &armv7a->swjdp_info;
return CALL_COMMAND_HANDLER(dap_baseaddr_command, swjdp);
}
{
target_t *target = get_current_target(cmd_ctx);
struct armv7a_common_s *armv7a = target_to_armv7a(target);
- swjdp_common_t *swjdp = &armv7a->swjdp_info;
+ struct swjdp_common *swjdp = &armv7a->swjdp_info;
return CALL_COMMAND_HANDLER(dap_memaccess_command, swjdp);
}
{
target_t *target = get_current_target(cmd_ctx);
struct armv7a_common_s *armv7a = target_to_armv7a(target);
- swjdp_common_t *swjdp = &armv7a->swjdp_info;
+ struct swjdp_common *swjdp = &armv7a->swjdp_info;
return CALL_COMMAND_HANDLER(dap_apsel_command, swjdp);
}
{
target_t *target = get_current_target(cmd_ctx);
struct armv7a_common_s *armv7a = target_to_armv7a(target);
- swjdp_common_t *swjdp = &armv7a->swjdp_info;
+ struct swjdp_common *swjdp = &armv7a->swjdp_info;
return CALL_COMMAND_HANDLER(dap_apid_command, swjdp);
}
{
target_t *target = get_current_target(cmd_ctx);
struct armv7a_common_s *armv7a = target_to_armv7a(target);
- swjdp_common_t *swjdp = &armv7a->swjdp_info;
+ struct swjdp_common *swjdp = &armv7a->swjdp_info;
uint32_t apsel;
switch (argc) {
enum armv7a_state core_state;
/* arm adp debug port */
- swjdp_common_t swjdp_info;
+ struct swjdp_common swjdp_info;
/* Core Debug Unit */
uint32_t debug_base;
{
target_t *target = get_current_target(cmd_ctx);
struct armv7m_common_s *armv7m = target_to_armv7m(target);
- swjdp_common_t *swjdp = &armv7m->swjdp_info;
+ struct swjdp_common *swjdp = &armv7m->swjdp_info;
uint32_t apsel, apselsave, baseaddr;
int retval;
{
target_t *target = get_current_target(cmd_ctx);
struct armv7m_common_s *armv7m = target_to_armv7m(target);
- swjdp_common_t *swjdp = &armv7m->swjdp_info;
+ struct swjdp_common *swjdp = &armv7m->swjdp_info;
return CALL_COMMAND_HANDLER(dap_apid_command, swjdp);
}
{
target_t *target = get_current_target(cmd_ctx);
struct armv7m_common_s *armv7m = target_to_armv7m(target);
- swjdp_common_t *swjdp = &armv7m->swjdp_info;
+ struct swjdp_common *swjdp = &armv7m->swjdp_info;
return CALL_COMMAND_HANDLER(dap_apsel_command, swjdp);
}
{
target_t *target = get_current_target(cmd_ctx);
struct armv7m_common_s *armv7m = target_to_armv7m(target);
- swjdp_common_t *swjdp = &armv7m->swjdp_info;
+ struct swjdp_common *swjdp = &armv7m->swjdp_info;
return CALL_COMMAND_HANDLER(dap_memaccess_command, swjdp);
}
{
target_t *target = get_current_target(cmd_ctx);
struct armv7m_common_s *armv7m = target_to_armv7m(target);
- swjdp_common_t *swjdp = &armv7m->swjdp_info;
+ struct swjdp_common *swjdp = &armv7m->swjdp_info;
uint32_t apsel;
switch (argc) {
reg_cache_t *core_cache;
enum armv7m_mode core_mode;
int exception_number;
- swjdp_common_t swjdp_info;
+ struct swjdp_common swjdp_info;
/* Direct processor core register read and writes */
int (*load_core_reg_u32)(struct target_s *target, enum armv7m_regtype type, uint32_t num, uint32_t *value);
static int cortex_a8_init_debug_access(target_t *target)
{
struct armv7a_common_s *armv7a = target_to_armv7a(target);
- swjdp_common_t *swjdp = &armv7a->swjdp_info;
+ struct swjdp_common *swjdp = &armv7a->swjdp_info;
int retval;
uint32_t dummy;
uint32_t dscr;
int retval;
struct armv7a_common_s *armv7a = target_to_armv7a(target);
- swjdp_common_t *swjdp = &armv7a->swjdp_info;
+ struct swjdp_common *swjdp = &armv7a->swjdp_info;
LOG_DEBUG("exec opcode 0x%08" PRIx32, opcode);
do
{
int retval = ERROR_OK;
struct armv7a_common_s *armv7a = target_to_armv7a(target);
- swjdp_common_t *swjdp = &armv7a->swjdp_info;
+ struct swjdp_common *swjdp = &armv7a->swjdp_info;
cortex_a8_dap_read_coreregister_u32(target, regfile, 0);
cortex_a8_dap_write_coreregister_u32(target, address, 0);
{
int retval;
struct armv7a_common_s *armv7a = target_to_armv7a(target);
- swjdp_common_t *swjdp = &armv7a->swjdp_info;
+ struct swjdp_common *swjdp = &armv7a->swjdp_info;
cortex_a8_exec_opcode(target, ARMV4_5_MRC(CP, op1, 0, CRn, CRm, op2));
/* Move R0 to DTRTX */
int retval;
uint32_t dscr;
struct armv7a_common_s *armv7a = target_to_armv7a(target);
- swjdp_common_t *swjdp = &armv7a->swjdp_info;
+ struct swjdp_common *swjdp = &armv7a->swjdp_info;
LOG_DEBUG("CP%i, CRn %i, value 0x%08" PRIx32, CP, CRn, value);
uint8_t reg = regnum&0xFF;
uint32_t dscr;
struct armv7a_common_s *armv7a = target_to_armv7a(target);
- swjdp_common_t *swjdp = &armv7a->swjdp_info;
+ struct swjdp_common *swjdp = &armv7a->swjdp_info;
if (reg > 16)
return retval;
uint8_t Rd = regnum&0xFF;
uint32_t dscr;
struct armv7a_common_s *armv7a = target_to_armv7a(target);
- swjdp_common_t *swjdp = &armv7a->swjdp_info;
+ struct swjdp_common *swjdp = &armv7a->swjdp_info;
LOG_DEBUG("register %i, value 0x%08" PRIx32, regnum, value);
{
int retval;
struct armv7a_common_s *armv7a = target_to_armv7a(target);
- swjdp_common_t *swjdp = &armv7a->swjdp_info;
+ struct swjdp_common *swjdp = &armv7a->swjdp_info;
retval = mem_ap_write_atomic_u32(swjdp, address, value);
uint32_t dscr;
struct cortex_a8_common_s *cortex_a8 = target_to_cortex_a8(target);
struct armv7a_common_s *armv7a = &cortex_a8->armv7a_common;
- swjdp_common_t *swjdp = &armv7a->swjdp_info;
+ struct swjdp_common *swjdp = &armv7a->swjdp_info;
enum target_state prev_target_state = target->state;
uint8_t saved_apsel = dap_ap_get_select(swjdp);
int retval = ERROR_OK;
uint32_t dscr;
struct armv7a_common_s *armv7a = target_to_armv7a(target);
- swjdp_common_t *swjdp = &armv7a->swjdp_info;
+ struct swjdp_common *swjdp = &armv7a->swjdp_info;
uint8_t saved_apsel = dap_ap_get_select(swjdp);
dap_ap_select(swjdp, swjdp_debugap);
{
struct armv7a_common_s *armv7a = target_to_armv7a(target);
struct armv4_5_common_s *armv4_5 = &armv7a->armv4_5_common;
- swjdp_common_t *swjdp = &armv7a->swjdp_info;
+ struct swjdp_common *swjdp = &armv7a->swjdp_info;
// breakpoint_t *breakpoint = NULL;
uint32_t resume_pc, dscr;
struct cortex_a8_common_s *cortex_a8 = target_to_cortex_a8(target);
struct armv7a_common_s *armv7a = target_to_armv7a(target);
struct armv4_5_common_s *armv4_5 = &armv7a->armv4_5_common;
- swjdp_common_t *swjdp = &armv7a->swjdp_info;
+ struct swjdp_common *swjdp = &armv7a->swjdp_info;
LOG_DEBUG("dscr = 0x%08" PRIx32, cortex_a8->cpudbg_dscr);
uint32_t size, uint32_t count, uint8_t *buffer)
{
struct armv7a_common_s *armv7a = target_to_armv7a(target);
- swjdp_common_t *swjdp = &armv7a->swjdp_info;
+ struct swjdp_common *swjdp = &armv7a->swjdp_info;
int retval = ERROR_OK;
uint32_t size, uint32_t count, uint8_t *buffer)
{
struct armv7a_common_s *armv7a = target_to_armv7a(target);
- swjdp_common_t *swjdp = &armv7a->swjdp_info;
+ struct swjdp_common *swjdp = &armv7a->swjdp_info;
int retval;
}
-static int cortex_a8_dcc_read(swjdp_common_t *swjdp, uint8_t *value, uint8_t *ctrl)
+static int cortex_a8_dcc_read(struct swjdp_common *swjdp, uint8_t *value, uint8_t *ctrl)
{
#if 0
u16 dcrdr;
if (!target->type->examined)
return ERROR_OK;
struct armv7a_common_s *armv7a = target_to_armv7a(target);
- swjdp_common_t *swjdp = &armv7a->swjdp_info;
+ struct swjdp_common *swjdp = &armv7a->swjdp_info;
if (!target->dbg_msg_enabled)
return ERROR_OK;
{
struct cortex_a8_common_s *cortex_a8 = target_to_cortex_a8(target);
struct armv7a_common_s *armv7a = &cortex_a8->armv7a_common;
- swjdp_common_t *swjdp = &armv7a->swjdp_info;
+ struct swjdp_common *swjdp = &armv7a->swjdp_info;
int i;
int retval = ERROR_OK;
uint32_t didr, ctypr, ttypr, cpuid;
armv7a = &cortex_a8->armv7a_common;
armv4_5 = &armv7a->armv4_5_common;
- swjdp_common_t *swjdp = &armv7a->swjdp_info;
+ struct swjdp_common *swjdp = &armv7a->swjdp_info;
/* Setup cortex_a8_common_t */
cortex_a8->common_magic = CORTEX_A8_COMMON_MAGIC;
extern reg_t armv7m_gdb_dummy_cpsr_reg;
#endif
-static int cortexm3_dap_read_coreregister_u32(swjdp_common_t *swjdp,
+static int cortexm3_dap_read_coreregister_u32(struct swjdp_common *swjdp,
uint32_t *value, int regnum)
{
int retval;
return retval;
}
-static int cortexm3_dap_write_coreregister_u32(swjdp_common_t *swjdp,
+static int cortexm3_dap_write_coreregister_u32(struct swjdp_common *swjdp,
uint32_t value, int regnum)
{
int retval;
uint32_t mask_on, uint32_t mask_off)
{
struct cortex_m3_common_s *cortex_m3 = target_to_cm3(target);
- struct swjdp_common_s *swjdp = &cortex_m3->armv7m.swjdp_info;
+ struct swjdp_common *swjdp = &cortex_m3->armv7m.swjdp_info;
/* mask off status bits */
cortex_m3->dcb_dhcsr &= ~((0xFFFF << 16) | mask_off);
static int cortex_m3_clear_halt(target_t *target)
{
struct cortex_m3_common_s *cortex_m3 = target_to_cm3(target);
- struct swjdp_common_s *swjdp = &cortex_m3->armv7m.swjdp_info;
+ struct swjdp_common *swjdp = &cortex_m3->armv7m.swjdp_info;
/* clear step if any */
cortex_m3_write_debug_halt_mask(target, C_HALT, C_STEP);
static int cortex_m3_single_step_core(target_t *target)
{
struct cortex_m3_common_s *cortex_m3 = target_to_cm3(target);
- struct swjdp_common_s *swjdp = &cortex_m3->armv7m.swjdp_info;
+ struct swjdp_common *swjdp = &cortex_m3->armv7m.swjdp_info;
uint32_t dhcsr_save;
/* backup dhcsr reg */
int i;
uint32_t dcb_demcr;
struct cortex_m3_common_s *cortex_m3 = target_to_cm3(target);
- struct swjdp_common_s *swjdp = &cortex_m3->armv7m.swjdp_info;
+ struct swjdp_common *swjdp = &cortex_m3->armv7m.swjdp_info;
cortex_m3_fp_comparator_t *fp_list = cortex_m3->fp_comparator_list;
cortex_m3_dwt_comparator_t *dwt_list = cortex_m3->dwt_comparator_list;
{
uint32_t shcsr, except_sr, cfsr = -1, except_ar = -1;
struct armv7m_common_s *armv7m = target_to_armv7m(target);
- swjdp_common_t *swjdp = &armv7m->swjdp_info;
+ struct swjdp_common *swjdp = &armv7m->swjdp_info;
mem_ap_read_u32(swjdp, NVIC_SHCSR, &shcsr);
switch (armv7m->exception_number)
int retval;
struct cortex_m3_common_s *cortex_m3 = target_to_cm3(target);
struct armv7m_common_s *armv7m = &cortex_m3->armv7m;
- swjdp_common_t *swjdp = &armv7m->swjdp_info;
+ struct swjdp_common *swjdp = &armv7m->swjdp_info;
LOG_DEBUG(" ");
int retval;
enum target_state prev_target_state = target->state;
struct cortex_m3_common_s *cortex_m3 = target_to_cm3(target);
- struct swjdp_common_s *swjdp = &cortex_m3->armv7m.swjdp_info;
+ struct swjdp_common *swjdp = &cortex_m3->armv7m.swjdp_info;
/* Read from Debug Halting Control and Status Register */
retval = mem_ap_read_atomic_u32(swjdp, DCB_DHCSR, &cortex_m3->dcb_dhcsr);
static int cortex_m3_soft_reset_halt(struct target_s *target)
{
struct cortex_m3_common_s *cortex_m3 = target_to_cm3(target);
- struct swjdp_common_s *swjdp = &cortex_m3->armv7m.swjdp_info;
+ struct swjdp_common *swjdp = &cortex_m3->armv7m.swjdp_info;
uint32_t dcb_dhcsr = 0;
int retval, timeout = 0;
{
struct cortex_m3_common_s *cortex_m3 = target_to_cm3(target);
struct armv7m_common_s *armv7m = &cortex_m3->armv7m;
- swjdp_common_t *swjdp = &armv7m->swjdp_info;
+ struct swjdp_common *swjdp = &armv7m->swjdp_info;
breakpoint_t *breakpoint = NULL;
if (target->state != TARGET_HALTED)
static int cortex_m3_assert_reset(target_t *target)
{
struct cortex_m3_common_s *cortex_m3 = target_to_cm3(target);
- struct swjdp_common_s *swjdp = &cortex_m3->armv7m.swjdp_info;
+ struct swjdp_common *swjdp = &cortex_m3->armv7m.swjdp_info;
int assert_srst = 1;
LOG_DEBUG("target->state: %s",
{
int retval;
struct armv7m_common_s *armv7m = target_to_armv7m(target);
- swjdp_common_t *swjdp = &armv7m->swjdp_info;
+ struct swjdp_common *swjdp = &armv7m->swjdp_info;
/* NOTE: we "know" here that the register identifiers used
* in the v7m header match the Cortex-M3 Debug Core Register
int retval;
uint32_t reg;
struct armv7m_common_s *armv7m = target_to_armv7m(target);
- swjdp_common_t *swjdp = &armv7m->swjdp_info;
+ struct swjdp_common *swjdp = &armv7m->swjdp_info;
#ifdef ARMV7_GDB_HACKS
/* If the LR register is being modified, make sure it will put us
uint32_t size, uint32_t count, uint8_t *buffer)
{
struct armv7m_common_s *armv7m = target_to_armv7m(target);
- swjdp_common_t *swjdp = &armv7m->swjdp_info;
+ struct swjdp_common *swjdp = &armv7m->swjdp_info;
int retval;
/* sanitize arguments */
uint32_t size, uint32_t count, uint8_t *buffer)
{
struct armv7m_common_s *armv7m = target_to_armv7m(target);
- swjdp_common_t *swjdp = &armv7m->swjdp_info;
+ struct swjdp_common *swjdp = &armv7m->swjdp_info;
int retval;
/* sanitize arguments */
uint32_t cpuid, fpcr;
int i;
struct cortex_m3_common_s *cortex_m3 = target_to_cm3(target);
- struct swjdp_common_s *swjdp = &cortex_m3->armv7m.swjdp_info;
+ struct swjdp_common *swjdp = &cortex_m3->armv7m.swjdp_info;
if ((retval = ahbap_debugport_init(swjdp)) != ERROR_OK)
return retval;
return ERROR_OK;
}
-static int cortex_m3_dcc_read(swjdp_common_t *swjdp, uint8_t *value, uint8_t *ctrl)
+static int cortex_m3_dcc_read(struct swjdp_common *swjdp, uint8_t *value, uint8_t *ctrl)
{
uint16_t dcrdr;
uint32_t size, uint8_t *buffer)
{
struct armv7m_common_s *armv7m = target_to_armv7m(target);
- swjdp_common_t *swjdp = &armv7m->swjdp_info;
+ struct swjdp_common *swjdp = &armv7m->swjdp_info;
uint8_t data;
uint8_t ctrl;
uint32_t i;
if (!target_was_examined(target))
return ERROR_OK;
struct armv7m_common_s *armv7m = target_to_armv7m(target);
- swjdp_common_t *swjdp = &armv7m->swjdp_info;
+ struct swjdp_common *swjdp = &armv7m->swjdp_info;
if (!target->dbg_msg_enabled)
return ERROR_OK;
target_t *target = get_current_target(cmd_ctx);
struct cortex_m3_common_s *cortex_m3 = target_to_cm3(target);
struct armv7m_common_s *armv7m = &cortex_m3->armv7m;
- swjdp_common_t *swjdp = &armv7m->swjdp_info;
+ struct swjdp_common *swjdp = &armv7m->swjdp_info;
uint32_t demcr = 0;
int retval;
int i;