working_area_t -> struct working_area
authorZachary T Welch <zw@superlucidity.net>
Fri, 13 Nov 2009 16:44:30 +0000 (08:44 -0800)
committerZachary T Welch <zw@superlucidity.net>
Fri, 13 Nov 2009 19:58:12 +0000 (11:58 -0800)
Remove misleading typedef and redundant suffix from struct working_area.

23 files changed:
src/flash/aduc702x.c
src/flash/arm_nandio.h
src/flash/cfi.c
src/flash/cfi.h
src/flash/ecos.c
src/flash/lpc2000.c
src/flash/lpc2000.h
src/flash/lpc2900.c
src/flash/pic32mx.c
src/flash/pic32mx.h
src/flash/stellaris.c
src/flash/stm32x.c
src/flash/stm32x.h
src/flash/str7x.c
src/flash/str7x.h
src/flash/str9x.c
src/flash/str9x.h
src/target/arm7_9_common.c
src/target/arm7_9_common.h
src/target/armv7m.c
src/target/cortex_a8.c
src/target/target.c
src/target/target.h

index ebda702af9ff15ea2943d9b658d78b3c77b9d9ed..8011e9334c93ce2485fd4e04c24293071ee01b21 100644 (file)
@@ -44,7 +44,7 @@ static int aduc702x_set_write_enable(target_t *target, int enable);
 #define ADUC702x_FLASH_FEEHIDE         (7*4)
 
 struct aduc702x_flash_bank {
-       working_area_t *write_algorithm;
+       struct working_area *write_algorithm;
 };
 
 /* flash bank aduc702x 0 0 0 0 <target#>
@@ -161,7 +161,7 @@ static int aduc702x_write_block(struct flash_bank_s *bank, uint8_t *buffer, uint
        struct aduc702x_flash_bank *aduc702x_info = bank->driver_priv;
        target_t *target = bank->target;
        uint32_t buffer_size = 7000;
-       working_area_t *source;
+       struct working_area *source;
        uint32_t address = bank->base + offset;
        struct reg_param reg_params[6];
        struct armv4_5_algorithm armv4_5_info;
index eedf5dcac1d899710a6481a1a9f925be82d87012..cb8df4283e4a82e4ff911a58be6867845ea23f7a 100644 (file)
@@ -9,7 +9,7 @@ struct arm_nand_data {
        struct target_s         *target;
 
        /* copy_area holds write-to-NAND loop and data to write */
-       struct working_area_s   *copy_area;
+       struct working_area     *copy_area;
 
        /* chunk_size == page or ECC unit */
        unsigned                chunk_size;
index c0c2cb79ddbd4dde5484ce4b845c488fd2694a0a..6a193e2d808607b6adc5792f1edd493d8fc4a594 100644 (file)
@@ -1022,7 +1022,7 @@ static int cfi_intel_write_block(struct flash_bank_s *bank, uint8_t *buffer, uin
        target_t *target = bank->target;
        struct reg_param reg_params[7];
        struct armv4_5_algorithm armv4_5_info;
-       working_area_t *source;
+       struct working_area *source;
        uint32_t buffer_size = 32768;
        uint32_t write_command_val, busy_pattern_val, error_pattern_val;
 
@@ -1267,7 +1267,7 @@ static int cfi_spansion_write_block(struct flash_bank_s *bank, uint8_t *buffer,
        target_t *target = bank->target;
        struct reg_param reg_params[10];
        struct armv4_5_algorithm armv4_5_info;
-       working_area_t *source;
+       struct working_area *source;
        uint32_t buffer_size = 32768;
        uint32_t status;
        int retval, retvaltemp;
index 7763aff671f5e226d4fa1d655ff9ea5e33f619a7..deca9163d922494f9ded0e0f43eb6f15dafde170 100644 (file)
@@ -27,7 +27,7 @@
 
 struct cfi_flash_bank
 {
-       working_area_t *write_algorithm;
+       struct working_area *write_algorithm;
 
        int x16_as_x8;
        int jedec_probe;
index 0a97bda1c80b7e060436d7b9b92d75e7a749bd90..450bd5b70a79c5183e9c37b09bcf6aca0504d8bf 100644 (file)
@@ -36,8 +36,8 @@ static int ecosflash_handle_gpnvm_command(struct command_context_s *cmd_ctx, cha
 struct ecosflash_flash_bank
 {
        struct target_s *target;
-       working_area_t *write_algorithm;
-       working_area_t *erase_check_algorithm;
+       struct working_area *write_algorithm;
+       struct working_area *erase_check_algorithm;
        char *driverPath;
        uint32_t start_address;
 };
index 31e81b3bb651c5adec0419a2d7e0b00b493e18bb..4ad3e0e54615bc45f403fa0d672f646d16c42469 100644 (file)
@@ -548,7 +548,7 @@ static int lpc2000_write(struct flash_bank_s *bank, uint8_t *buffer, uint32_t of
        uint32_t result_table[4];
        int status_code;
        int i;
-       working_area_t *download_area;
+       struct working_area *download_area;
        int retval = ERROR_OK;
 
        if (bank->target->state != TARGET_HALTED)
index b93deb69a4eefc8bd870e5e4a820f9c56849c1c9..08e278a355681981c449baea48a3cfd5e64fc00e 100644 (file)
@@ -35,7 +35,7 @@ typedef enum
 struct lpc2000_flash_bank
 {
        lpc2000_variant variant;
-       struct working_area_s *iap_working_area;
+       struct working_area *iap_working_area;
        uint32_t cclk;
        int cmd51_dst_boundary;
        int cmd51_can_256b;
index f6b3bf6f106fafbe62df7372ace6d4752f03fb7b..08879077b7f52de36de29676144ac71728e655a2 100644 (file)
@@ -1294,7 +1294,7 @@ static int lpc2900_write(struct flash_bank_s *bank, uint8_t *buffer,
 
        /* Try working area allocation. Start with a large buffer, and try with
           reduced size if that fails. */
-       working_area_t *warea;
+       struct working_area *warea;
        uint32_t buffer_size = lpc2900_info->max_ram_block - 1 * KiB;
        while( (retval = target_alloc_working_area(target,
                                                   buffer_size + target_code_size,
index 262200c019492f3b0dbebd5b2f1f5357ba50b60f..d29950ce1576958d20b1e6969fac7fb05f5ebe6c 100644 (file)
@@ -302,7 +302,7 @@ static int pic32mx_write_block(struct flash_bank_s *bank, uint8_t *buffer, uint3
 {
        target_t *target = bank->target;
        uint32_t buffer_size = 512;
-       working_area_t *source;
+       struct working_area *source;
        uint32_t address = bank->base + offset;
        int retval = ERROR_OK;
 #if 0
index 3a3c9794f4daa041e2612de4463b2bbe6e9af5f4..92f40c2e5f3b96086c4955374a12a597ec957506 100644 (file)
@@ -30,7 +30,7 @@
 
 struct pic32mx_flash_bank
 {
-       working_area_t *write_algorithm;
+       struct working_area *write_algorithm;
        int devid;
        int ppage_size;
        int probed;
index cdeccbe102bf7d70afd02ddaeda467752c2d7b8d..6ec036cc9396b9327ee7da0e29d8e632f2ba8d27 100644 (file)
@@ -832,8 +832,8 @@ static int stellaris_write_block(struct flash_bank_s *bank, uint8_t *buffer, uin
 {
        target_t *target = bank->target;
        uint32_t buffer_size = 8192;
-       working_area_t *source;
-       working_area_t *write_algorithm;
+       struct working_area *source;
+       struct working_area *write_algorithm;
        uint32_t address = bank->base + offset;
        struct reg_param reg_params[3];
        struct armv7m_algorithm armv7m_info;
index a63ff60b4ad426ca074bc0e3faf82599c92e1a05..35da209c5c663f956a1c46058df3d283baa1b788 100644 (file)
@@ -435,7 +435,7 @@ static int stm32x_write_block(struct flash_bank_s *bank, uint8_t *buffer, uint32
        struct stm32x_flash_bank *stm32x_info = bank->driver_priv;
        target_t *target = bank->target;
        uint32_t buffer_size = 16384;
-       working_area_t *source;
+       struct working_area *source;
        uint32_t address = bank->base + offset;
        struct reg_param reg_params[4];
        struct armv7m_algorithm armv7m_info;
index 9e1e5b1cce2985c51bcaeb631f4ab3bad5921262..6cd047e101df2582a6353ccca3d753bdece63eec 100644 (file)
@@ -35,7 +35,7 @@ struct stm32x_options
 struct stm32x_flash_bank
 {
        struct stm32x_options option_bytes;
-       working_area_t *write_algorithm;
+       struct working_area *write_algorithm;
        int ppage_size;
        int probed;
 };
index 68ba26ebefb3ca963c24f18550dc61845ab59099..d5defe5f8bd11c934baee81292ac3881d74d5ef5 100644 (file)
@@ -313,7 +313,7 @@ static int str7x_write_block(struct flash_bank_s *bank, uint8_t *buffer, uint32_
        struct str7x_flash_bank *str7x_info = bank->driver_priv;
        target_t *target = bank->target;
        uint32_t buffer_size = 8192;
-       working_area_t *source;
+       struct working_area *source;
        uint32_t address = bank->base + offset;
        struct reg_param reg_params[6];
        struct armv4_5_algorithm armv4_5_info;
index ef2d2e339f406c9bf8152e5acccc38647b09a085..81af0f1e7b0aadfb6f7ae9183553ef3a243fc30b 100644 (file)
@@ -31,7 +31,7 @@ struct str7x_flash_bank
        uint32_t disable_bit;
        uint32_t busy_bits;
        uint32_t register_base;
-       working_area_t *write_algorithm;
+       struct working_area *write_algorithm;
 };
 
 enum str7x_status_codes
index bae895d2240d635fdb3daa45a82acc10fb318074..09e5a08fe345ea4f595ef6d389b03c7ae1df9611 100644 (file)
@@ -351,7 +351,7 @@ static int str9x_write_block(struct flash_bank_s *bank,
        struct str9x_flash_bank *str9x_info = bank->driver_priv;
        target_t *target = bank->target;
        uint32_t buffer_size = 8192;
-       working_area_t *source;
+       struct working_area *source;
        uint32_t address = bank->base + offset;
        struct reg_param reg_params[4];
        struct armv4_5_algorithm armv4_5_info;
index 693851487db646985075731fe8a315b1575c56ad..c9d5152f2b436040af3665ac6dee42f059e5d7a7 100644 (file)
@@ -30,7 +30,7 @@ struct str9x_flash_bank
        uint32_t *sector_bits;
        int variant;
        int bank1;
-       working_area_t *write_algorithm;
+       struct working_area *write_algorithm;
 };
 
 enum str9x_status_codes
index eb27bba0a973749cd51bfcf2b307a01cc6dd4dab..19244de32dc70df3edc4847aba1843b4410e5910 100644 (file)
@@ -2723,7 +2723,7 @@ int arm7_9_bulk_write_memory(target_t *target, uint32_t address, uint32_t count,
 
 int arm7_9_checksum_memory(struct target_s *target, uint32_t address, uint32_t count, uint32_t* checksum)
 {
-       working_area_t *crc_algorithm;
+       struct working_area *crc_algorithm;
        struct armv4_5_algorithm armv4_5_info;
        struct reg_param reg_params[2];
        int retval;
@@ -2807,7 +2807,7 @@ int arm7_9_checksum_memory(struct target_s *target, uint32_t address, uint32_t c
 
 int arm7_9_blank_check_memory(struct target_s *target, uint32_t address, uint32_t count, uint32_t* blank)
 {
-       working_area_t *erase_check_algorithm;
+       struct working_area *erase_check_algorithm;
        struct reg_param reg_params[3];
        struct armv4_5_algorithm armv4_5_info;
        int retval;
index cebf6e3c9eae28604d438c7cc2697e77018eb2f3..0ef5eb646cacc6b8524fbabc7c7b06f5d453dacb 100644 (file)
@@ -69,7 +69,7 @@ struct arm7_9_common
        bool fast_memory_access;
        bool dcc_downloads;
 
-       struct working_area_s *dcc_working_area;
+       struct working_area *dcc_working_area;
 
        int (*examine_debug_reason)(target_t *target); /**< Function for determining why debug state was entered */
 
index 05668880e5b4004b3d71e522f7b8e2c6a8a76887..4a6869fae6b3dc3eb18a49e5507a36471f5bbf3a 100644 (file)
@@ -588,7 +588,7 @@ int armv7m_init_arch_info(target_t *target, struct armv7m_common *armv7m)
 int armv7m_checksum_memory(struct target_s *target,
                uint32_t address, uint32_t count, uint32_t* checksum)
 {
-       working_area_t *crc_algorithm;
+       struct working_area *crc_algorithm;
        struct armv7m_algorithm armv7m_info;
        struct reg_param reg_params[2];
        int retval;
@@ -671,7 +671,7 @@ int armv7m_checksum_memory(struct target_s *target,
 int armv7m_blank_check_memory(struct target_s *target,
                uint32_t address, uint32_t count, uint32_t* blank)
 {
-       working_area_t *erase_check_algorithm;
+       struct working_area *erase_check_algorithm;
        struct reg_param reg_params[3];
        struct armv7m_algorithm armv7m_info;
        int retval;
index edf7f141ed0c43738806fe29c01421b087bb2f24..983bef85b1a2d85eccdebdd5ffc9938cb2832338 100644 (file)
@@ -564,7 +564,7 @@ static int cortex_a8_debug_entry(target_t *target)
        int i;
        uint32_t regfile[16], pc, cpsr, dscr;
        int retval = ERROR_OK;
-       working_area_t *regfile_working_area = NULL;
+       struct working_area *regfile_working_area = NULL;
        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;
index 8932266abb486df3cfb08a700588a37f0cd47c4e..3b3179c3e88770f540fa25c4275b4cb1547a5022 100644 (file)
@@ -1082,10 +1082,10 @@ int target_call_timer_callbacks_now(void)
        return target_call_timer_callbacks_check_time(0);
 }
 
-int target_alloc_working_area(struct target_s *target, uint32_t size, working_area_t **area)
+int target_alloc_working_area(struct target_s *target, uint32_t size, struct working_area **area)
 {
-       working_area_t *c = target->working_areas;
-       working_area_t *new_wa = NULL;
+       struct working_area *c = target->working_areas;
+       struct working_area *new_wa = NULL;
 
        /* Reevaluate working area address based on MMU state*/
        if (target->working_areas == NULL)
@@ -1145,7 +1145,7 @@ int target_alloc_working_area(struct target_s *target, uint32_t size, working_ar
        /* if not, allocate a new one */
        if (!new_wa)
        {
-               working_area_t **p = &target->working_areas;
+               struct working_area **p = &target->working_areas;
                uint32_t first_free = target->working_area;
                uint32_t free_size = target->working_area_size;
 
@@ -1167,7 +1167,7 @@ int target_alloc_working_area(struct target_s *target, uint32_t size, working_ar
 
                LOG_DEBUG("allocated new working area at address 0x%08x", (unsigned)first_free);
 
-               new_wa = malloc(sizeof(working_area_t));
+               new_wa = malloc(sizeof(struct working_area));
                new_wa->next = NULL;
                new_wa->size = size;
                new_wa->address = first_free;
@@ -1202,7 +1202,7 @@ int target_alloc_working_area(struct target_s *target, uint32_t size, working_ar
        return ERROR_OK;
 }
 
-int target_free_working_area_restore(struct target_s *target, working_area_t *area, int restore)
+int target_free_working_area_restore(struct target_s *target, struct working_area *area, int restore)
 {
        if (area->free)
                return ERROR_OK;
@@ -1223,7 +1223,7 @@ int target_free_working_area_restore(struct target_s *target, working_area_t *ar
        return ERROR_OK;
 }
 
-int target_free_working_area(struct target_s *target, working_area_t *area)
+int target_free_working_area(struct target_s *target, struct working_area *area)
 {
        return target_free_working_area_restore(target, area, 1);
 }
@@ -1233,11 +1233,11 @@ int target_free_working_area(struct target_s *target, working_area_t *area)
  */
 void target_free_all_working_areas_restore(struct target_s *target, int restore)
 {
-       working_area_t *c = target->working_areas;
+       struct working_area *c = target->working_areas;
 
        while (c)
        {
-               working_area_t *next = c->next;
+               struct working_area *next = c->next;
                target_free_working_area_restore(target, c, restore);
 
                if (c->backup)
index b7fa3eb9182f5bb194978e581d25d494fc7030db..14973550cbbf253c17a51549f23328f5b53dc81a 100644 (file)
@@ -114,15 +114,15 @@ extern const Jim_Nvp nvp_target_endian[];
 
 struct target_s;
 
-typedef struct working_area_s
+struct working_area
 {
        uint32_t address;
        uint32_t size;
        int free;
        uint8_t *backup;
-       struct working_area_s **user;
-       struct working_area_s *next;
-} working_area_t;
+       struct working_area **user;
+       struct working_area *next;
+};
 
 // target_type.h contains the full definitionof struct target_type_s
 struct target_type_s;
@@ -149,7 +149,7 @@ typedef struct target_s
        uint32_t working_area_phys;                     /* physical address */
        uint32_t working_area_size;                     /* size in bytes */
        uint32_t backup_working_area;                   /* whether the content of the working area has to be preserved */
-       struct working_area_s *working_areas;/* list of allocated working areas */
+       struct working_area *working_areas;/* list of allocated working areas */
        enum target_debug_reason debug_reason;/* reason why the target entered debug state */
        enum target_endianess endianness;       /* target endianess */
        // also see: target_state_name()
@@ -441,10 +441,10 @@ const char *target_state_name( target_t *target );
  *
  */
 int target_alloc_working_area(struct target_s *target,
-               uint32_t size, working_area_t **area);
-int target_free_working_area(struct target_s *target, working_area_t *area);
+               uint32_t size, struct working_area **area);
+int target_free_working_area(struct target_s *target, struct working_area *area);
 int target_free_working_area_restore(struct target_s *target,
-               working_area_t *area, int restore);
+               struct working_area *area, int restore);
 void target_free_all_working_areas(struct target_s *target);
 void target_free_all_working_areas_restore(struct target_s *target, int restore);
 

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)