From 95e13054cafeeb13163d85822e4202e12007e1a7 Mon Sep 17 00:00:00 2001 From: zwelch Date: Sun, 31 May 2009 09:37:57 +0000 Subject: Add target_write_memory wrapper: - replaces all calls to target->type->write_memory. - add documentation in target_s to warn not to invoke callback directly. git-svn-id: svn://svn.berlios.de/openocd/trunk@1960 b42882b7-edfa-0310-969c-e2dbd0fdcd60 --- src/flash/orion_nand.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/flash/orion_nand.c') diff --git a/src/flash/orion_nand.c b/src/flash/orion_nand.c index f6f41f35..cf26568d 100644 --- a/src/flash/orion_nand.c +++ b/src/flash/orion_nand.c @@ -131,7 +131,7 @@ static int orion_nand_fast_block_write(struct nand_device_s *device, u8 *data, i target_buffer_set_u32(target, code_buf + i*4, code[i]); /* write code to working area */ - retval = target->type->write_memory(target, + retval = target_write_memory(target, hw->copy_area->address, 4, code_size/4, code_buf); if (retval != ERROR_OK) @@ -143,7 +143,7 @@ static int orion_nand_fast_block_write(struct nand_device_s *device, u8 *data, i retval = target->type->bulk_write_memory(target, target_buf, size/4, data); if (retval == ERROR_OK && size & 3) { - retval = target->type->write_memory(target, + retval = target_write_memory(target, target_buf + (size & ~3), 1, size & 3, data + (size & ~3)); } -- cgit v1.2.3-18-g5258