diff options
author | zwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-05-31 09:37:57 +0000 |
---|---|---|
committer | zwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-05-31 09:37:57 +0000 |
commit | 95e13054cafeeb13163d85822e4202e12007e1a7 (patch) | |
tree | e35b5658762512024c7ec750acd75bfae9874905 /src/flash/orion_nand.c | |
parent | b6db182c0020051e0dc642ca0b1040ea7453dcd0 (diff) | |
download | riscv-openocd-95e13054cafeeb13163d85822e4202e12007e1a7.zip riscv-openocd-95e13054cafeeb13163d85822e4202e12007e1a7.tar.gz riscv-openocd-95e13054cafeeb13163d85822e4202e12007e1a7.tar.bz2 |
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
Diffstat (limited to 'src/flash/orion_nand.c')
-rw-r--r-- | src/flash/orion_nand.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/flash/orion_nand.c b/src/flash/orion_nand.c index f6f41f3..cf26568 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)); } |