target: Retire target_bulk_write_memory() 14/1214/2
authorAndreas Fritiofson <andreas.fritiofson@gmail.com>
Fri, 8 Mar 2013 20:13:42 +0000 (21:13 +0100)
committerSpencer Oliver <spen@spen-soft.co.uk>
Fri, 15 Mar 2013 15:56:35 +0000 (15:56 +0000)
The only caller was arm_nandwrite(). Replace that call with
target_write_buffer() instead, which in turn may end up calling the same
bulk_write_memory target API function.

Change-Id: If34c7474df5cf14af3b732fb4774816818f28e79
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/1214
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
src/flash/nand/arm_io.c
src/target/target.c
src/target/target.h

index cf494766dddb46744e7db6f92a2ac482adbe24d1..aab1d050f4bc8a75d6e93b5bca13f34ef47d3c58 100644 (file)
@@ -128,11 +128,7 @@ int arm_nandwrite(struct arm_nand_data *nand, uint8_t *data, int size)
 
        /* 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;
 
index 04e375b8493dfefeb098284b9efd48eed18874a3..ed1a2cc4c4400c48c9607ff02f58c027bbbcf250 100644 (file)
@@ -970,12 +970,6 @@ int target_write_phys_memory(struct target *target,
        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)
 {
index 3baafbe70d09278e57beb66ce3643e8412905b25..e6b931ddfb0dfa268714b1a08712f62452365c64 100644 (file)
@@ -485,16 +485,6 @@ int target_write_memory(struct target *target,
 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.
  *

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)