cortex_m3_dwt_comparator_t -> struct cortex_m3_dwt_comparator
Remove misleading typedef and redundant suffix from struct cortex_m3_dwt_comparator.
This commit is contained in:
parent
cdd2d9c2d0
commit
2ec440588f
|
@ -178,7 +178,7 @@ static int cortex_m3_endreset_event(target_t *target)
|
||||||
struct cortex_m3_common *cortex_m3 = target_to_cm3(target);
|
struct cortex_m3_common *cortex_m3 = target_to_cm3(target);
|
||||||
struct swjdp_common *swjdp = &cortex_m3->armv7m.swjdp_info;
|
struct swjdp_common *swjdp = &cortex_m3->armv7m.swjdp_info;
|
||||||
struct cortex_m3_fp_comparator *fp_list = cortex_m3->fp_comparator_list;
|
struct cortex_m3_fp_comparator *fp_list = cortex_m3->fp_comparator_list;
|
||||||
cortex_m3_dwt_comparator_t *dwt_list = cortex_m3->dwt_comparator_list;
|
struct cortex_m3_dwt_comparator *dwt_list = cortex_m3->dwt_comparator_list;
|
||||||
|
|
||||||
mem_ap_read_atomic_u32(swjdp, DCB_DEMCR, &dcb_demcr);
|
mem_ap_read_atomic_u32(swjdp, DCB_DEMCR, &dcb_demcr);
|
||||||
LOG_DEBUG("DCB_DEMCR = 0x%8.8" PRIx32 "",dcb_demcr);
|
LOG_DEBUG("DCB_DEMCR = 0x%8.8" PRIx32 "",dcb_demcr);
|
||||||
|
@ -1052,7 +1052,7 @@ cortex_m3_set_watchpoint(struct target_s *target, struct watchpoint *watchpoint)
|
||||||
* watchpoint using comparator #1; comparator #0 matching cycle
|
* watchpoint using comparator #1; comparator #0 matching cycle
|
||||||
* count; send data trace info through ITM and TPIU; etc
|
* count; send data trace info through ITM and TPIU; etc
|
||||||
*/
|
*/
|
||||||
cortex_m3_dwt_comparator_t *comparator;
|
struct cortex_m3_dwt_comparator *comparator;
|
||||||
|
|
||||||
for (comparator = cortex_m3->dwt_comparator_list;
|
for (comparator = cortex_m3->dwt_comparator_list;
|
||||||
comparator->used && dwt_num < cortex_m3->dwt_num_comp;
|
comparator->used && dwt_num < cortex_m3->dwt_num_comp;
|
||||||
|
@ -1100,7 +1100,7 @@ static int
|
||||||
cortex_m3_unset_watchpoint(struct target_s *target, struct watchpoint *watchpoint)
|
cortex_m3_unset_watchpoint(struct target_s *target, struct watchpoint *watchpoint)
|
||||||
{
|
{
|
||||||
struct cortex_m3_common *cortex_m3 = target_to_cm3(target);
|
struct cortex_m3_common *cortex_m3 = target_to_cm3(target);
|
||||||
cortex_m3_dwt_comparator_t *comparator;
|
struct cortex_m3_dwt_comparator *comparator;
|
||||||
int dwt_num;
|
int dwt_num;
|
||||||
|
|
||||||
if (!watchpoint->set)
|
if (!watchpoint->set)
|
||||||
|
@ -1517,7 +1517,7 @@ cortex_m3_dwt_setup(struct cortex_m3_common *cm3, struct target_s *target)
|
||||||
{
|
{
|
||||||
uint32_t dwtcr;
|
uint32_t dwtcr;
|
||||||
struct reg_cache *cache;
|
struct reg_cache *cache;
|
||||||
cortex_m3_dwt_comparator_t *comparator;
|
struct cortex_m3_dwt_comparator *comparator;
|
||||||
int reg, i;
|
int reg, i;
|
||||||
|
|
||||||
target_read_u32(target, DWT_CTRL, &dwtcr);
|
target_read_u32(target, DWT_CTRL, &dwtcr);
|
||||||
|
@ -1533,7 +1533,7 @@ cortex_m3_dwt_setup(struct cortex_m3_common *cm3, struct target_s *target)
|
||||||
cm3->dwt_num_comp = (dwtcr >> 28) & 0xF;
|
cm3->dwt_num_comp = (dwtcr >> 28) & 0xF;
|
||||||
cm3->dwt_comp_available = cm3->dwt_num_comp;
|
cm3->dwt_comp_available = cm3->dwt_num_comp;
|
||||||
cm3->dwt_comparator_list = calloc(cm3->dwt_num_comp,
|
cm3->dwt_comparator_list = calloc(cm3->dwt_num_comp,
|
||||||
sizeof(cortex_m3_dwt_comparator_t));
|
sizeof(struct cortex_m3_dwt_comparator));
|
||||||
if (!cm3->dwt_comparator_list) {
|
if (!cm3->dwt_comparator_list) {
|
||||||
fail0:
|
fail0:
|
||||||
cm3->dwt_num_comp = 0;
|
cm3->dwt_num_comp = 0;
|
||||||
|
|
|
@ -127,14 +127,14 @@ struct cortex_m3_fp_comparator
|
||||||
uint32_t fpcr_address;
|
uint32_t fpcr_address;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct cortex_m3_dwt_comparator_s
|
struct cortex_m3_dwt_comparator
|
||||||
{
|
{
|
||||||
int used;
|
int used;
|
||||||
uint32_t comp;
|
uint32_t comp;
|
||||||
uint32_t mask;
|
uint32_t mask;
|
||||||
uint32_t function;
|
uint32_t function;
|
||||||
uint32_t dwt_comparator_address;
|
uint32_t dwt_comparator_address;
|
||||||
} cortex_m3_dwt_comparator_t;
|
};
|
||||||
|
|
||||||
struct cortex_m3_common
|
struct cortex_m3_common
|
||||||
{
|
{
|
||||||
|
@ -157,7 +157,7 @@ struct cortex_m3_common
|
||||||
/* Data Watchpoint and Trace (DWT) */
|
/* Data Watchpoint and Trace (DWT) */
|
||||||
int dwt_num_comp;
|
int dwt_num_comp;
|
||||||
int dwt_comp_available;
|
int dwt_comp_available;
|
||||||
cortex_m3_dwt_comparator_t *dwt_comparator_list;
|
struct cortex_m3_dwt_comparator *dwt_comparator_list;
|
||||||
struct reg_cache *dwt_cache;
|
struct reg_cache *dwt_cache;
|
||||||
|
|
||||||
struct armv7m_common armv7m;
|
struct armv7m_common armv7m;
|
||||||
|
|
Loading…
Reference in New Issue