aboutsummaryrefslogtreecommitdiff
path: root/src/target/arm926ejs.c
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2016-05-22 04:34:04 +0200
committerAndreas Fritiofson <andreas.fritiofson@gmail.com>2016-07-19 10:45:16 +0100
commitf19ac83152b54a204b8148815a538d868973e1e1 (patch)
tree381a04c00bd20dd508d6020f869ea3dd160de933 /src/target/arm926ejs.c
parentf4496b25e3040e29b9bc78dd5bf8ac8128c09a1e (diff)
downloadriscv-openocd-f19ac83152b54a204b8148815a538d868973e1e1.zip
riscv-openocd-f19ac83152b54a204b8148815a538d868973e1e1.tar.gz
riscv-openocd-f19ac83152b54a204b8148815a538d868973e1e1.tar.bz2
Fix usage of timeval_ms()
First, fix the timeval_ms() implementation to not have K&R but ANSI argument semantics by adding a missing void. timeval_ms() returns an int64_t, not uint64_t or long long. Consistently use int64_t for variables and PRI*64 as format string. While at it, change a few related variables to bool for clarity. Note that timeval_ms() may return a negative error code, but not a single caller checks for that. Change-Id: I27cf83e75b3e9a8913f6c43e98a281bea77aac13 Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-on: http://openocd.zylin.com/3499 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Diffstat (limited to 'src/target/arm926ejs.c')
-rw-r--r--src/target/arm926ejs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/target/arm926ejs.c b/src/target/arm926ejs.c
index 397859b..d7c043e 100644
--- a/src/target/arm926ejs.c
+++ b/src/target/arm926ejs.c
@@ -87,7 +87,7 @@ static int arm926ejs_cp15_read(struct target *target, uint32_t op1, uint32_t op2
jtag_add_dr_scan(jtag_info->tap, 4, fields, TAP_IDLE);
- long long then = timeval_ms();
+ int64_t then = timeval_ms();
for (;;) {
/* rescan with NOP, to wait for the access to complete */
@@ -173,7 +173,7 @@ static int arm926ejs_cp15_write(struct target *target, uint32_t op1, uint32_t op
jtag_add_dr_scan(jtag_info->tap, 4, fields, TAP_IDLE);
- long long then = timeval_ms();
+ int64_t then = timeval_ms();
for (;;) {
/* rescan with NOP, to wait for the access to complete */
@@ -546,7 +546,7 @@ int arm926ejs_soft_reset_halt(struct target *target)
if (retval != ERROR_OK)
return retval;
- long long then = timeval_ms();
+ int64_t then = timeval_ms();
int timeout;
while (!(timeout = ((timeval_ms()-then) > 1000))) {
if (buf_get_u32(dbg_stat->value, EICE_DBG_STATUS_DBGACK, 1) == 0) {