summaryrefslogtreecommitdiff
path: root/src/target
diff options
context:
space:
mode:
authorntfreak <ntfreak@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-11-12 15:16:15 +0000
committerntfreak <ntfreak@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-11-12 15:16:15 +0000
commit4b7e7eef3eafbdb1dcc4d842c68e98876e580f8f (patch)
treed7102073e172261e96eea97f5d72ef63dfe3e6e2 /src/target
parent8f2c1659cf3d5a72ade3504caac248a0975aff2e (diff)
downloadopenocd+libswd-4b7e7eef3eafbdb1dcc4d842c68e98876e580f8f.tar.gz
openocd+libswd-4b7e7eef3eafbdb1dcc4d842c68e98876e580f8f.tar.bz2
openocd+libswd-4b7e7eef3eafbdb1dcc4d842c68e98876e580f8f.tar.xz
openocd+libswd-4b7e7eef3eafbdb1dcc4d842c68e98876e580f8f.zip
- fix crash when variant for mips32 target not given
git-svn-id: svn://svn.berlios.de/openocd/trunk@1160 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/target')
-rw-r--r--src/target/mips_m4k.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/target/mips_m4k.c b/src/target/mips_m4k.c
index c99ca92f..2a96833d 100644
--- a/src/target/mips_m4k.c
+++ b/src/target/mips_m4k.c
@@ -234,6 +234,7 @@ int mips_m4k_assert_reset(target_t *target)
{
mips32_common_t *mips32 = target->arch_info;
mips_ejtag_t *ejtag_info = &mips32->ejtag_info;
+ mips_m4k_common_t *mips_m4k = mips32->arch_info;
LOG_DEBUG("target->state: %s",
Jim_Nvp_value2name_simple( nvp_target_state, target->state )->name);
@@ -256,7 +257,7 @@ int mips_m4k_assert_reset(target_t *target)
mips_ejtag_set_instr(ejtag_info, EJTAG_INST_NORMALBOOT, NULL);
}
- if (strcmp(target->variant, "ejtag_srst") == 0)
+ if (strcmp(mips_m4k->variant, "ejtag_srst") == 0)
{
u32 ejtag_ctrl = ejtag_info->ejtag_ctrl | EJTAG_CTRL_PRRST | EJTAG_CTRL_PERRST;
LOG_DEBUG("Using EJTAG reset (PRRST) to reset processor...");