target_t -> struct target
[fw/openocd] / src / flash / ecos.c
index 5a0d7ec923514dbcf6247e60c03c58766cb36073..ad27a45d360a18d7bbe1e430cf4abf99df631078 100644 (file)
@@ -35,9 +35,9 @@ 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 target *target;
+       struct working_area *write_algorithm;
+       struct working_area *erase_check_algorithm;
        char *driverPath;
        uint32_t start_address;
 };
@@ -153,11 +153,11 @@ static int loadDriver(struct ecosflash_flash_bank *info)
 {
        uint32_t buf_cnt;
        uint32_t image_size;
-       image_t image;
+       struct image image;
 
        image.base_address_set = 0;
        image.start_address_set = 0;
-       target_t *target = info->target;
+       struct target *target = info->target;
        int retval;
 
        if ((retval = image_open(&image, info->driverPath, NULL)) != ERROR_OK)
@@ -204,10 +204,10 @@ static int runCode(struct ecosflash_flash_bank *info,
                /* timeout in ms */
                int timeout)
 {
-       target_t *target = info->target;
+       struct target *target = info->target;
 
-       reg_param_t reg_params[3];
-       armv4_5_algorithm_t armv4_5_info;
+       struct reg_param reg_params[3];
+       struct armv4_5_algorithm armv4_5_info;
        armv4_5_info.common_magic = ARMV4_5_COMMON_MAGIC;
        armv4_5_info.core_mode = ARMV4_5_MODE_SVC;
        armv4_5_info.core_state = ARMV4_5_STATE_ARM;
@@ -272,7 +272,7 @@ static int eCosBoard_erase(struct ecosflash_flash_bank *info, uint32_t address,
 
 static int eCosBoard_flash(struct ecosflash_flash_bank *info, void *data, uint32_t address, uint32_t len)
 {
-       target_t *target = info->target;
+       struct target *target = info->target;
        const int chunk = 8192;
        int retval = ERROR_OK;
        int timeout = (chunk / 20480 + 1) * 1000; /*asume 20 KB/s + 1 second*/