target: Remove soft_reset_halt_imp 17/1217/2
authorAndreas Fritiofson <andreas.fritiofson@gmail.com>
Sun, 10 Mar 2013 11:50:29 +0000 (12:50 +0100)
committerSpencer Oliver <spen@spen-soft.co.uk>
Wed, 13 Mar 2013 12:36:01 +0000 (12:36 +0000)
Change-Id: I12c907584ef73de570eba2dcfeb8477cabc6098f
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/1217
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
src/target/target.c
src/target/target_type.h

index e964f522488c6bc41f807088bb554660b6b301b8..7e3975695404dfc5cb5e3b7587fb29010abe5639 100644 (file)
@@ -677,18 +677,18 @@ static int target_read_memory_imp(struct target *target, uint32_t address,
        return target->type->read_memory_imp(target, address, size, count, buffer);
 }
 
-static int target_soft_reset_halt_imp(struct target *target)
+static int target_soft_reset_halt(struct target *target)
 {
        if (!target_was_examined(target)) {
                LOG_ERROR("Target not examined yet");
                return ERROR_FAIL;
        }
-       if (!target->type->soft_reset_halt_imp) {
+       if (!target->type->soft_reset_halt) {
                LOG_ERROR("Target %s does not support soft_reset_halt",
                                target_name(target));
                return ERROR_FAIL;
        }
-       return target->type->soft_reset_halt_imp(target);
+       return target->type->soft_reset_halt(target);
 }
 
 /**
@@ -1099,9 +1099,6 @@ static int target_init_one(struct command_context *cmd_ctx,
        type->read_memory_imp = target->type->read_memory;
        type->read_memory = target_read_memory_imp;
 
-       type->soft_reset_halt_imp = target->type->soft_reset_halt;
-       type->soft_reset_halt = target_soft_reset_halt_imp;
-
        /* Sanity-check MMU support ... stub in what we must, to help
         * implement it in stages, but warn if we need to do so.
         */
@@ -2498,7 +2495,7 @@ COMMAND_HANDLER(handle_soft_reset_halt_command)
 
        LOG_USER("requesting target halt and executing a soft reset");
 
-       target->type->soft_reset_halt(target);
+       target_soft_reset_halt(target);
 
        return ERROR_OK;
 }
index 277607e29e6823427078f104a5f98f4beb6672fd..99c8f513d430424ad80f198a8393ef8fbc805694 100644 (file)
@@ -88,7 +88,6 @@ struct target_type {
         * reset run; halt
      */
        int (*deassert_reset)(struct target *target);
-       int (*soft_reset_halt_imp)(struct target *target);
        int (*soft_reset_halt)(struct target *target);
 
        /**

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)