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

src/flash/tms470.c
src/flash/tms470.h

index 4149d9ca1e021fe852bc9f8ce8acd6d5086b5ed1..9f45b4710a803a0f6c990678011e0da7aac7afee 100644 (file)
@@ -108,7 +108,7 @@ const struct flash_sector TMS470R1A384_BANK2_SECTORS[] = {
 
 static int tms470_read_part_info(struct flash_bank_s *bank)
 {
-       tms470_flash_bank_t *tms470_info = bank->driver_priv;
+       struct tms470_flash_bank *tms470_info = bank->driver_priv;
        target_t *target = bank->target;
        uint32_t device_ident_reg;
        uint32_t silicon_version;
@@ -534,7 +534,7 @@ static int tms470_flash_initialize_internal_state_machine(struct flash_bank_s *b
 {
        uint32_t fmmac2, fmmac1, fmmaxep, k, delay, glbctrl, sysclk;
        target_t *target = bank->target;
-       tms470_flash_bank_t *tms470_info = bank->driver_priv;
+       struct tms470_flash_bank *tms470_info = bank->driver_priv;
        int result = ERROR_OK;
 
        /*
@@ -832,7 +832,7 @@ static int tms470_register_commands(struct command_context_s *cmd_ctx)
 
 static int tms470_erase(struct flash_bank_s *bank, int first, int last)
 {
-       tms470_flash_bank_t *tms470_info = bank->driver_priv;
+       struct tms470_flash_bank *tms470_info = bank->driver_priv;
        int sector, result = ERROR_OK;
 
        if (bank->target->state != TARGET_HALTED)
@@ -879,7 +879,7 @@ static int tms470_erase(struct flash_bank_s *bank, int first, int last)
 
 static int tms470_protect(struct flash_bank_s *bank, int set, int first, int last)
 {
-       tms470_flash_bank_t *tms470_info = bank->driver_priv;
+       struct tms470_flash_bank *tms470_info = bank->driver_priv;
        target_t *target = bank->target;
        uint32_t fmmac2, fmbsea, fmbseb;
        int sector;
@@ -1040,7 +1040,7 @@ static int tms470_probe(struct flash_bank_s *bank)
 
 static int tms470_auto_probe(struct flash_bank_s *bank)
 {
-       tms470_flash_bank_t *tms470_info = bank->driver_priv;
+       struct tms470_flash_bank *tms470_info = bank->driver_priv;
 
        if (tms470_info->device_ident_reg)
                return ERROR_OK;
@@ -1052,7 +1052,7 @@ static int tms470_auto_probe(struct flash_bank_s *bank)
 static int tms470_erase_check(struct flash_bank_s *bank)
 {
        target_t *target = bank->target;
-       tms470_flash_bank_t *tms470_info = bank->driver_priv;
+       struct tms470_flash_bank *tms470_info = bank->driver_priv;
        int sector, result = ERROR_OK;
        uint32_t fmmac2, fmbac2, glbctrl, orig_fmregopt;
        static uint8_t buffer[64 * 1024];
@@ -1143,7 +1143,7 @@ static int tms470_erase_check(struct flash_bank_s *bank)
 static int tms470_protect_check(struct flash_bank_s *bank)
 {
        target_t *target = bank->target;
-       tms470_flash_bank_t *tms470_info = bank->driver_priv;
+       struct tms470_flash_bank *tms470_info = bank->driver_priv;
        int sector, result = ERROR_OK;
        uint32_t fmmac2, fmbsea, fmbseb;
 
@@ -1191,7 +1191,7 @@ static int tms470_protect_check(struct flash_bank_s *bank)
 static int tms470_info(struct flash_bank_s *bank, char *buf, int buf_size)
 {
        int used = 0;
-       tms470_flash_bank_t *tms470_info = bank->driver_priv;
+       struct tms470_flash_bank *tms470_info = bank->driver_priv;
 
        if (!tms470_info->device_ident_reg)
        {
@@ -1224,14 +1224,14 @@ static int tms470_info(struct flash_bank_s *bank, char *buf, int buf_size)
 
 FLASH_BANK_COMMAND_HANDLER(tms470_flash_bank_command)
 {
-       bank->driver_priv = malloc(sizeof(tms470_flash_bank_t));
+       bank->driver_priv = malloc(sizeof(struct tms470_flash_bank));
 
        if (!bank->driver_priv)
        {
                return ERROR_FLASH_OPERATION_FAILED;
        }
 
-       (void)memset(bank->driver_priv, 0, sizeof(tms470_flash_bank_t));
+       (void)memset(bank->driver_priv, 0, sizeof(struct tms470_flash_bank));
 
        return ERROR_OK;
 }
index ca0f93aaddd567ae6187c8252f71f472d9e0eb52..f275e510673f26c047f307cc9b68c318f0167242 100644 (file)
@@ -22,7 +22,7 @@
 
 #include "flash.h"
 
-typedef struct tms470_flash_bank_s
+struct tms470_flash_bank
 {
        unsigned ordinal;
 
@@ -34,6 +34,6 @@ typedef struct tms470_flash_bank_s
        uint32_t part_number;
        char * part_name;
 
-} tms470_flash_bank_t;
+};
 
 #endif /* TMS470_DOT_H */