X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2Ftarget%2Fferoceon.c;h=38cd0b06433339d94d2f969a68e2a15a1216012e;hb=818aa27a9d44e62f19cfdf757ac03ec9da2f730b;hp=abc44f5e560bfef51c8e40b484aee478734f2d25;hpb=e86dee32004d750e8654fe449bfcdffaed7339fa;p=openocd.git diff --git a/src/target/feroceon.c b/src/target/feroceon.c index abc44f5e56..38cd0b0643 100644 --- a/src/target/feroceon.c +++ b/src/target/feroceon.c @@ -49,12 +49,9 @@ #include "config.h" #endif +#define DEFINE_TARGET_TYPE_S #include "arm926ejs.h" -#include "jtag.h" -#include "log.h" -#include -#include int feroceon_examine(struct target_s *target); int feroceon_target_create(struct target_s *target, Jim_Interp *interp); @@ -137,7 +134,7 @@ int feroceon_dummy_clock_out(arm_jtag_t *jtag_info, u32 instr) fields[0].out_value = out_buf; fields[0].in_value = NULL; - fields[0].in_handler = NULL; + @@ -149,7 +146,7 @@ int feroceon_dummy_clock_out(arm_jtag_t *jtag_info, u32 instr) fields[1].in_value = NULL; - fields[1].in_handler = NULL; + fields[2].tap = jtag_info->tap; @@ -159,7 +156,7 @@ int feroceon_dummy_clock_out(arm_jtag_t *jtag_info, u32 instr) fields[2].in_value = NULL; - fields[2].in_handler = NULL; + jtag_add_dr_scan(3, fields, TAP_INVALID); @@ -550,7 +547,7 @@ int feroceon_bulk_write_memory(target_t *target, u32 address, u32 count, u8 *buf u32 dcc_size = sizeof(dcc_code); if (!arm7_9->dcc_downloads) - return target->type->write_memory(target, address, 4, count, buffer); + return target_write_memory(target, address, 4, count, buffer); /* regrab previously allocated working_area, or allocate a new one */ if (!arm7_9->dcc_working_area) @@ -561,7 +558,7 @@ int feroceon_bulk_write_memory(target_t *target, u32 address, u32 count, u8 *buf if (target_alloc_working_area(target, dcc_size, &arm7_9->dcc_working_area) != ERROR_OK) { LOG_INFO("no working area available, falling back to memory writes"); - return target->type->write_memory(target, address, 4, count, buffer); + return target_write_memory(target, address, 4, count, buffer); } /* copy target instructions to target endianness */ @@ -569,7 +566,7 @@ int feroceon_bulk_write_memory(target_t *target, u32 address, u32 count, u8 *buf target_buffer_set_u32(target, dcc_code_buf + i*4, dcc_code[i]); /* write DCC code to working area */ - if((retval = target->type->write_memory(target, arm7_9->dcc_working_area->address, 4, dcc_size/4, dcc_code_buf)) != ERROR_OK) + if((retval = target_write_memory(target, arm7_9->dcc_working_area->address, 4, dcc_size/4, dcc_code_buf)) != ERROR_OK) { return retval; }