From edfb677d3466a0d88fe9bd5ec1d8785a41b6bc4e Mon Sep 17 00:00:00 2001 From: Spencer Oliver Date: Thu, 24 Oct 2013 23:26:51 +0100 Subject: target: use target_buffer_set_u32_array Attempt to use target_buffer_set_u32_array to convert to target endian arrays rather reimplementing code. This also removed cfi_fix_code_endian as its functionality is also repeated. Change-Id: I7c359dbe46ea791cd5f6fb18d8b0fb6895c599d3 Signed-off-by: Spencer Oliver Reviewed-on: http://openocd.zylin.com/1783 Reviewed-by: Andreas Fritiofson --- src/target/feroceon.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/target/feroceon.c') diff --git a/src/target/feroceon.c b/src/target/feroceon.c index acaa1b3b..ee0bafd2 100644 --- a/src/target/feroceon.c +++ b/src/target/feroceon.c @@ -510,8 +510,7 @@ static int feroceon_bulk_write_memory(struct target *target, } /* copy target instructions to target endianness */ - for (i = 0; i < dcc_size/4; i++) - target_buffer_set_u32(target, dcc_code_buf + i*4, dcc_code[i]); + target_buffer_set_u32_array(target, dcc_code_buf, ARRAY_SIZE(dcc_code), dcc_code); /* write DCC code to working area, using the non-optimized * memory write to avoid ending up here again */ -- cgit v1.2.3-18-g5258