summaryrefslogtreecommitdiff
path: root/src/jtag/core.c
diff options
context:
space:
mode:
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-10-06 08:10:57 +0000
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-10-06 08:10:57 +0000
commit39b57471bfd92ef0d9a3aceb69f40c1335f5b62f (patch)
tree4d7b675f1ec817d3d5e6b2596b5c4a9a053e2de9 /src/jtag/core.c
parenta2886fe3c66e7cdb05148234054e89730662103d (diff)
downloadopenocd+libswd-39b57471bfd92ef0d9a3aceb69f40c1335f5b62f.tar.gz
openocd+libswd-39b57471bfd92ef0d9a3aceb69f40c1335f5b62f.tar.bz2
openocd+libswd-39b57471bfd92ef0d9a3aceb69f40c1335f5b62f.tar.xz
openocd+libswd-39b57471bfd92ef0d9a3aceb69f40c1335f5b62f.zip
Introduced jtag_init and "jtag arp_init" to allow target scripts more control over how OpenOCD starts up and initializes the target.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2805 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/jtag/core.c')
-rw-r--r--src/jtag/core.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/jtag/core.c b/src/jtag/core.c
index 07eec64f..854236f3 100644
--- a/src/jtag/core.c
+++ b/src/jtag/core.c
@@ -1,16 +1,16 @@
/***************************************************************************
- * Copyright (C) 2005 by Dominic Rath *
- * Dominic.Rath@gmx.de *
+ * Copyright (C) 2009 Zachary T Welch *
+ * zw@superlucidity.net *
* *
- * Copyright (C) 2007,2008 Øyvind Harboe *
+ * Copyright (C) 2007,2008,2009 Øyvind Harboe *
* oyvind.harboe@zylin.com *
* *
* Copyright (C) 2009 SoftPLC Corporation *
* http://softplc.com *
* dick@softplc.com *
* *
- * Copyright (C) 2009 Zachary T Welch *
- * zw@superlucidity.net *
+ * Copyright (C) 2005 by Dominic Rath *
+ * Dominic.Rath@gmx.de *
* *
* 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 *
@@ -1230,7 +1230,7 @@ int jtag_interface_init(struct command_context_s *cmd_ctx)
return ERROR_OK;
}
-static int jtag_init_inner(struct command_context_s *cmd_ctx)
+int jtag_init_inner(struct command_context_s *cmd_ctx)
{
jtag_tap_t *tap;
int retval;
@@ -1334,11 +1334,11 @@ int jtag_init(struct command_context_s *cmd_ctx)
int retval;
if ((retval = jtag_interface_init(cmd_ctx)) != ERROR_OK)
return retval;
- if (jtag_init_inner(cmd_ctx) == ERROR_OK)
- {
- return ERROR_OK;
- }
- return jtag_init_reset(cmd_ctx);
+
+ if (Jim_Eval_Named(interp, "jtag_init", __FILE__, __LINE__) != JIM_OK)
+ return ERROR_FAIL;
+
+ return ERROR_OK;
}
unsigned jtag_get_speed_khz(void)