Duane Ellis: fix warnings
[openocd.git] / src / target / xscale.c
index a83ab70de61dbc924e9927bf20c268ba9d3d5d1b..39378c01a02baba1ab175ceda4fffe28793e4b60 100644 (file)
@@ -2,6 +2,9 @@
  *   Copyright (C) 2006, 2007 by Dominic Rath                              *
  *   Dominic.Rath@gmx.de                                                   *
  *                                                                         *
+ *   Copyright (C) 2007,2008 Ã˜yvind Harboe                                      *
+ *   oyvind.harboe@zylin.com                                               *
+ *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
  *   the Free Software Foundation; either version 2 of the License, or     *
@@ -25,6 +28,7 @@
 
 #include "xscale.h"
 
+#include "arm7_9_common.h"
 #include "register.h"
 #include "target.h"
 #include "armv4_5.h"
@@ -51,7 +55,7 @@ int xscale_register_commands(struct command_context_s *cmd_ctx);
 /* forward declarations */
 int xscale_target_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct target_s *target);
 int xscale_init_target(struct command_context_s *cmd_ctx, struct target_s *target);
-int xscale_quit();
+int xscale_quit(void);
 
 int xscale_arch_state(struct target_s *target);
 int xscale_poll(target_t *target);
@@ -73,7 +77,6 @@ int xscale_write_core_reg(struct target_s *target, int num, enum armv4_5_mode mo
 int xscale_read_memory(struct target_s *target, u32 address, u32 size, u32 count, u8 *buffer);
 int xscale_write_memory(struct target_s *target, u32 address, u32 size, u32 count, u8 *buffer);
 int xscale_bulk_write_memory(target_t *target, u32 address, u32 count, u8 *buffer);
-int xscale_checksum_memory(struct target_s *target, u32 address, u32 count, u32* checksum);
 
 int xscale_add_breakpoint(struct target_s *target, breakpoint_t *breakpoint);
 int xscale_remove_breakpoint(struct target_s *target, breakpoint_t *breakpoint);
@@ -110,8 +113,8 @@ target_type_t xscale_target =
        .read_memory = xscale_read_memory,
        .write_memory = xscale_write_memory,
        .bulk_write_memory = xscale_bulk_write_memory,
-       .checksum_memory = xscale_checksum_memory,
-       .blank_check_memory = NULL,
+       .checksum_memory = arm7_9_checksum_memory,
+       .blank_check_memory = arm7_9_blank_check_memory,
        
        .run_algorithm = armv4_5_run_algorithm,
 
@@ -1577,6 +1580,13 @@ int xscale_assert_reset(target_t *target)
 
        target->state = TARGET_RESET;
 
+    if (target->reset_halt)
+    {
+       int retval;
+               if ((retval = target_halt(target))!=ERROR_OK)
+                       return retval;
+    }
+
        return ERROR_OK;
 }
 
@@ -1699,7 +1709,7 @@ int xscale_deassert_reset(target_t *target)
                xscale_write_dcsr(target, 0, 1);
                target->state = TARGET_RUNNING;
 
-               if ((target->reset_mode != RESET_HALT) && (target->reset_mode != RESET_INIT))
+               if (!target->reset_halt)
                {
                        jtag_add_sleep(10000);
 
@@ -2047,11 +2057,6 @@ int xscale_bulk_write_memory(target_t *target, u32 address, u32 count, u8 *buffe
        return xscale_write_memory(target, address, 4, count, buffer);
 }
 
-int xscale_checksum_memory(struct target_s *target, u32 address, u32 count, u32* checksum)
-{
-       return ERROR_TARGET_RESOURCE_NOT_AVAILABLE;
-}
-
 u32 xscale_get_ttb(target_t *target)
 {
        armv4_5_common_t *armv4_5 = target->arch_info;
@@ -2984,7 +2989,7 @@ int xscale_init_target(struct command_context_s *cmd_ctx, struct target_s *targe
        return ERROR_OK;
 }
 
-int xscale_quit()
+int xscale_quit(void)
 {
 
        return ERROR_OK;

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)