aboutsummaryrefslogtreecommitdiff
path: root/src/flash/nand
diff options
context:
space:
mode:
Diffstat (limited to 'src/flash/nand')
-rw-r--r--src/flash/nand/arm_io.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/flash/nand/arm_io.c b/src/flash/nand/arm_io.c
index 67b15088..d54958ad 100644
--- a/src/flash/nand/arm_io.c
+++ b/src/flash/nand/arm_io.c
@@ -48,7 +48,6 @@ static int arm_code_to_working_area(struct target *target,
unsigned additional, struct working_area **area)
{
uint8_t code_buf[code_size];
- unsigned i;
int retval;
unsigned size = code_size + additional;
@@ -67,8 +66,7 @@ static int arm_code_to_working_area(struct target *target,
}
/* buffer code in target endianness */
- for (i = 0; i < code_size / 4; i++)
- target_buffer_set_u32(target, code_buf + i * 4, code[i]);
+ target_buffer_set_u32_array(target, code_buf, code_size / 4, code);
/* copy code to work area */
retval = target_write_memory(target, (*area)->address,