/* copy data to work area */
target_buf = nand->copy_area->address + sizeof(code);
- retval = target_bulk_write_memory(target, target_buf, size / 4, data);
- if (retval == ERROR_OK && (size & 3) != 0)
- retval = target_write_memory(target,
- target_buf + (size & ~3),
- 1, size & 3, data + (size & ~3));
+ retval = target_write_buffer(target, target_buf, size, data);
if (retval != ERROR_OK)
return retval;
return target->type->write_phys_memory(target, address, size, count, buffer);
}
-int target_bulk_write_memory(struct target *target,
- uint32_t address, uint32_t count, const uint8_t *buffer)
-{
- return target->type->bulk_write_memory(target, address, count, buffer);
-}
-
static int target_bulk_write_memory_default(struct target *target,
uint32_t address, uint32_t count, const uint8_t *buffer)
{
int target_write_phys_memory(struct target *target,
uint32_t address, uint32_t size, uint32_t count, const uint8_t *buffer);
-/**
- * Write @a count items of 4 bytes to the memory of @a target at
- * the @a address given. Because it operates only on whole words,
- * this should be faster than target_write_memory().
- *
- * This routine is wrapper for target->type->bulk_write_memory.
- */
-int target_bulk_write_memory(struct target *target,
- uint32_t address, uint32_t count, const uint8_t *buffer);
-
/*
* Write to target memory using the virtual address.
*