aboutsummaryrefslogtreecommitdiff
path: root/src/target/xscale.c
diff options
context:
space:
mode:
authorAndreas Fritiofson <andreas.fritiofson@gmail.com>2014-09-08 22:11:02 +0200
committerSpencer Oliver <spen@spen-soft.co.uk>2014-09-22 19:39:24 +0000
commit1c021ed0afb5f9f7d9e8cbce53a4fe985a4c2235 (patch)
tree114d2eccadbc351e0df68199e21678f080c7368c /src/target/xscale.c
parentb2973be9cc3538026c837d1122ab344cebb40aa0 (diff)
downloadriscv-openocd-1c021ed0afb5f9f7d9e8cbce53a4fe985a4c2235.zip
riscv-openocd-1c021ed0afb5f9f7d9e8cbce53a4fe985a4c2235.tar.gz
riscv-openocd-1c021ed0afb5f9f7d9e8cbce53a4fe985a4c2235.tar.bz2
target: Remove "-variant" argument
Remove this underutilized feature. Despite the fact that a lot of configs specifies a arbitrary "variant", only the xscale target actually defines any. In the case of xscale, the use of -variant is dubious since 1) it's used as a redundant irlen specifier, 2) it carries a comment that it doesn't really need it and 3) only two xscale configs even specify it. If there's a future target that needs a variant set, a target specific option could be added when needed. Change-Id: I1ba25a946f0d80872cbd96ddcc48f92695c4ae20 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/2283 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Diffstat (limited to 'src/target/xscale.c')
-rw-r--r--src/target/xscale.c33
1 files changed, 3 insertions, 30 deletions
diff --git a/src/target/xscale.c b/src/target/xscale.c
index 04189a1..b64a1bf 100644
--- a/src/target/xscale.c
+++ b/src/target/xscale.c
@@ -2905,7 +2905,7 @@ static int xscale_init_target(struct command_context *cmd_ctx,
}
static int xscale_init_arch_info(struct target *target,
- struct xscale_common *xscale, struct jtag_tap *tap, const char *variant)
+ struct xscale_common *xscale, struct jtag_tap *tap)
{
struct arm *arm;
uint32_t high_reset_branch, low_reset_branch;
@@ -2916,33 +2916,7 @@ static int xscale_init_arch_info(struct target *target,
/* store architecture specfic data */
xscale->common_magic = XSCALE_COMMON_MAGIC;
- /* we don't really *need* a variant param ... */
- if (variant) {
- int ir_length = 0;
-
- if (strcmp(variant, "pxa250") == 0
- || strcmp(variant, "pxa255") == 0
- || strcmp(variant, "pxa26x") == 0)
- ir_length = 5;
- else if (strcmp(variant, "pxa27x") == 0
- || strcmp(variant, "ixp42x") == 0
- || strcmp(variant, "ixp45x") == 0
- || strcmp(variant, "ixp46x") == 0)
- ir_length = 7;
- else if (strcmp(variant, "pxa3xx") == 0)
- ir_length = 11;
- else
- LOG_WARNING("%s: unrecognized variant %s",
- tap->dotted_name, variant);
-
- if (ir_length && ir_length != tap->ir_length) {
- LOG_WARNING("%s: IR length for %s is %d; fixing",
- tap->dotted_name, variant, ir_length);
- tap->ir_length = ir_length;
- }
- }
-
- /* PXA3xx shifts the JTAG instructions */
+ /* PXA3xx with 11 bit IR shifts the JTAG instructions */
if (tap->ir_length == 11)
xscale->xscale_variant = XSCALE_PXA3XX;
else
@@ -3033,8 +3007,7 @@ static int xscale_target_create(struct target *target, Jim_Interp *interp)
if (!xscale)
return ERROR_FAIL;
- return xscale_init_arch_info(target, xscale, target->tap,
- target->variant);
+ return xscale_init_arch_info(target, xscale, target->tap);
}
COMMAND_HANDLER(xscale_handle_debug_handler_command)