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>
This commit is contained in:
Andreas Fritiofson
2014-09-08 22:11:02 +02:00
committed by Spencer Oliver
parent b2973be9cc
commit 1c021ed0af
42 changed files with 46 additions and 122 deletions
-28
View File
@@ -4115,7 +4115,6 @@ enum target_cfg_param {
TCFG_WORK_AREA_SIZE,
TCFG_WORK_AREA_BACKUP,
TCFG_ENDIAN,
TCFG_VARIANT,
TCFG_COREID,
TCFG_CHAIN_POSITION,
TCFG_DBGBASE,
@@ -4130,7 +4129,6 @@ static Jim_Nvp nvp_config_opts[] = {
{ .name = "-work-area-size", .value = TCFG_WORK_AREA_SIZE },
{ .name = "-work-area-backup", .value = TCFG_WORK_AREA_BACKUP },
{ .name = "-endian" , .value = TCFG_ENDIAN },
{ .name = "-variant", .value = TCFG_VARIANT },
{ .name = "-coreid", .value = TCFG_COREID },
{ .name = "-chain-position", .value = TCFG_CHAIN_POSITION },
{ .name = "-dbgbase", .value = TCFG_DBGBASE },
@@ -4143,7 +4141,6 @@ static int target_configure(Jim_GetOptInfo *goi, struct target *target)
Jim_Nvp *n;
Jim_Obj *o;
jim_wide w;
char *cp;
int e;
/* parse config or cget options ... */
@@ -4352,27 +4349,6 @@ no_params:
/* loop for more */
break;
case TCFG_VARIANT:
if (goi->isconfigure) {
if (goi->argc < 1) {
Jim_SetResultFormatted(goi->interp,
"%s ?STRING?",
n->name);
return JIM_ERR;
}
e = Jim_GetOpt_String(goi, &cp, NULL);
if (e != JIM_OK)
return e;
free(target->variant);
target->variant = strdup(cp);
} else {
if (goi->argc != 0)
goto no_params;
}
Jim_SetResultString(goi->interp, target->variant, -1);
/* loop for more */
break;
case TCFG_COREID:
if (goi->isconfigure) {
e = Jim_GetOpt_Wide(goi, &w);
@@ -5185,10 +5161,6 @@ static int target_create(Jim_GetOptInfo *goi)
target->endianness = TARGET_LITTLE_ENDIAN;
}
/* incase variant is not set */
if (!target->variant)
target->variant = strdup("");
cp = Jim_GetString(new_cmd, NULL);
target->cmd_name = strdup(cp);