X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Ftarget%2Farm11_dbgtap.c;h=a5dc37687c95ccbd139a74f85a5b9b89ecc1f5a9;hb=3528457ba8f8b41e2bb96ee925dec21eaab1644a;hp=4e90933d7c966407762572b32f38a218f8fb0cd1;hpb=1143bbc0c88c20300106ce9d63b2b77c9c2f66c9;p=fw%2Fopenocd diff --git a/src/target/arm11_dbgtap.c b/src/target/arm11_dbgtap.c index 4e90933d7..a5dc37687 100644 --- a/src/target/arm11_dbgtap.c +++ b/src/target/arm11_dbgtap.c @@ -199,11 +199,17 @@ int arm11_add_debug_SCAN_N(struct arm11_common *arm11, * NOTE: the ITRSEL instruction fakes SCREG changing; * but leaves its actual value unchanged. */ +#if 0 + // FIX!!! the optimization below is broken because we do not + // invalidate the cur_scan_chain upon a TRST/TMS. See arm_jtag.c + // for example on how to invalidate cur_scan_chain. Tested patches gladly + // accepted! if (arm11->jtag_info.cur_scan_chain == chain) { JTAG_DEBUG("SCREG <= %d SKIPPED", chain); return jtag_add_statemove((state == ARM11_TAP_DEFAULT) ? TAP_DRPAUSE : state); } +#endif JTAG_DEBUG("SCREG <= %d", chain); arm11_add_IR(arm11, ARM11_SCAN_N, ARM11_TAP_DEFAULT); @@ -1045,10 +1051,6 @@ static inline struct arm11_common *dpm_to_arm11(struct arm_dpm *dpm) static int arm11_dpm_prepare(struct arm_dpm *dpm) { - struct arm11_common *arm11 = dpm_to_arm11(dpm); - - arm11 = container_of(dpm->arm, struct arm11_common, arm); - return arm11_run_instr_data_prepare(dpm_to_arm11(dpm)); }