]> git.sur5r.net Git - openocd/commitdiff
cortex_a8_common_t -> struct cortex_a8_common
authorZachary T Welch <zw@superlucidity.net>
Fri, 13 Nov 2009 16:42:11 +0000 (08:42 -0800)
committerZachary T Welch <zw@superlucidity.net>
Fri, 13 Nov 2009 19:58:11 +0000 (11:58 -0800)
Remove misleading typedef and redundant suffix from struct cortex_a8_common.

src/target/cortex_a8.c
src/target/cortex_a8.h

index fec883797110dbfedee3cde3f54015465e501205..a60564c60acf5a5f50eb965332438c4a5ddd3205 100644 (file)
@@ -339,7 +339,7 @@ static int cortex_a8_poll(target_t *target)
 {
        int retval = ERROR_OK;
        uint32_t dscr;
-       struct cortex_a8_common_s *cortex_a8 = target_to_cortex_a8(target);
+       struct cortex_a8_common *cortex_a8 = target_to_cortex_a8(target);
        struct armv7a_common *armv7a = &cortex_a8->armv7a_common;
        struct swjdp_common *swjdp = &armv7a->swjdp_info;
        enum target_state prev_target_state = target->state;
@@ -565,7 +565,7 @@ static int cortex_a8_debug_entry(target_t *target)
        uint32_t regfile[16], pc, cpsr, dscr;
        int retval = ERROR_OK;
        working_area_t *regfile_working_area = NULL;
-       struct cortex_a8_common_s *cortex_a8 = target_to_cortex_a8(target);
+       struct cortex_a8_common *cortex_a8 = target_to_cortex_a8(target);
        struct armv7a_common *armv7a = target_to_armv7a(target);
        struct armv4_5_common_s *armv4_5 = &armv7a->armv4_5_common;
        struct swjdp_common *swjdp = &armv7a->swjdp_info;
@@ -690,7 +690,7 @@ static int cortex_a8_debug_entry(target_t *target)
 
 static void cortex_a8_post_debug_entry(target_t *target)
 {
-       struct cortex_a8_common_s *cortex_a8 = target_to_cortex_a8(target);
+       struct cortex_a8_common *cortex_a8 = target_to_cortex_a8(target);
        struct armv7a_common *armv7a = &cortex_a8->armv7a_common;
 
 //     cortex_a8_read_cp(target, &cp15_control_register, 15, 0, 1, 0, 0);
@@ -967,7 +967,7 @@ static int cortex_a8_set_breakpoint(struct target_s *target,
        int brp_i=0;
        uint32_t control;
        uint8_t byte_addr_select = 0x0F;
-       struct cortex_a8_common_s *cortex_a8 = target_to_cortex_a8(target);
+       struct cortex_a8_common *cortex_a8 = target_to_cortex_a8(target);
        struct armv7a_common *armv7a = &cortex_a8->armv7a_common;
        cortex_a8_brp_t * brp_list = cortex_a8->brp_list;
 
@@ -1038,7 +1038,7 @@ static int cortex_a8_set_breakpoint(struct target_s *target,
 static int cortex_a8_unset_breakpoint(struct target_s *target, breakpoint_t *breakpoint)
 {
        int retval;
-       struct cortex_a8_common_s *cortex_a8 = target_to_cortex_a8(target);
+       struct cortex_a8_common *cortex_a8 = target_to_cortex_a8(target);
        struct armv7a_common *armv7a = &cortex_a8->armv7a_common;
        cortex_a8_brp_t * brp_list = cortex_a8->brp_list;
 
@@ -1095,7 +1095,7 @@ static int cortex_a8_unset_breakpoint(struct target_s *target, breakpoint_t *bre
 
 int cortex_a8_add_breakpoint(struct target_s *target, breakpoint_t *breakpoint)
 {
-       struct cortex_a8_common_s *cortex_a8 = target_to_cortex_a8(target);
+       struct cortex_a8_common *cortex_a8 = target_to_cortex_a8(target);
 
        if ((breakpoint->type == BKPT_HARD) && (cortex_a8->brp_num_available < 1))
        {
@@ -1112,7 +1112,7 @@ int cortex_a8_add_breakpoint(struct target_s *target, breakpoint_t *breakpoint)
 
 static int cortex_a8_remove_breakpoint(struct target_s *target, breakpoint_t *breakpoint)
 {
-       struct cortex_a8_common_s *cortex_a8 = target_to_cortex_a8(target);
+       struct cortex_a8_common *cortex_a8 = target_to_cortex_a8(target);
 
 #if 0
 /* It is perfectly possible to remove brakpoints while the taget is running */
@@ -1338,7 +1338,7 @@ static int cortex_a8_handle_target_request(void *priv)
 
 static int cortex_a8_examine(struct target_s *target)
 {
-       struct cortex_a8_common_s *cortex_a8 = target_to_cortex_a8(target);
+       struct cortex_a8_common *cortex_a8 = target_to_cortex_a8(target);
        struct armv7a_common *armv7a = &cortex_a8->armv7a_common;
        struct swjdp_common *swjdp = &armv7a->swjdp_info;
        int i;
@@ -1451,7 +1451,7 @@ static int cortex_a8_init_target(struct command_context_s *cmd_ctx,
 }
 
 int cortex_a8_init_arch_info(target_t *target,
-               cortex_a8_common_t *cortex_a8, struct jtag_tap *tap)
+               struct cortex_a8_common *cortex_a8, struct jtag_tap *tap)
 {
        armv4_5_common_t *armv4_5;
        struct armv7a_common *armv7a;
@@ -1460,7 +1460,7 @@ int cortex_a8_init_arch_info(target_t *target,
        armv4_5 = &armv7a->armv4_5_common;
        struct swjdp_common *swjdp = &armv7a->swjdp_info;
 
-       /* Setup cortex_a8_common_t */
+       /* Setup struct cortex_a8_common */
        cortex_a8->common_magic = CORTEX_A8_COMMON_MAGIC;
        armv4_5->arch_info = armv7a;
 
@@ -1519,7 +1519,7 @@ LOG_DEBUG(" ");
 
 static int cortex_a8_target_create(struct target_s *target, Jim_Interp *interp)
 {
-       cortex_a8_common_t *cortex_a8 = calloc(1, sizeof(cortex_a8_common_t));
+       struct cortex_a8_common *cortex_a8 = calloc(1, sizeof(struct cortex_a8_common));
 
        cortex_a8_init_arch_info(target, cortex_a8, target->tap);
 
index 8216ffbb52386b240016871a25bde426f4e5e0f9..131cddbf9138839c8f086d3a8137eb7eb184a016 100644 (file)
@@ -100,7 +100,7 @@ typedef struct  cortex_a8_wrp_s
        uint8_t         WRPn;
 } cortex_a8_wrp_t;
 
-typedef struct cortex_a8_common_s
+struct cortex_a8_common
 {
        int common_magic;
        struct arm_jtag jtag_info;
@@ -134,16 +134,16 @@ typedef struct cortex_a8_common_s
        int fast_reg_read;
 
        struct armv7a_common armv7a_common;
-} cortex_a8_common_t;
+};
 
-static inline struct cortex_a8_common_s *
+static inline struct cortex_a8_common *
 target_to_cortex_a8(struct target_s *target)
 {
-       return container_of(target->arch_info, struct cortex_a8_common_s,
+       return container_of(target->arch_info, struct cortex_a8_common,
                        armv7a_common.armv4_5_common);
 }
 
 int cortex_a8_init_arch_info(target_t *target,
-               cortex_a8_common_t *cortex_a8, struct jtag_tap *tap);
+               struct cortex_a8_common *cortex_a8, struct jtag_tap *tap);
 
 #endif /* CORTEX_A8_H */