Hi all, I am confused by this very strange loop in mips32_pracc.c : static int wait_for_pracc_rw(struct mips_ejtag *ejtag_info, uint32_t *ctrl) { uint32_t ejtag_ctrl;
while (1) { mips_ejtag_set_instr(ejtag_info, EJTAG_INST_CONTROL); ejtag_ctrl = ejtag_info->ejtag_ctrl; mips_ejtag_drscan_32(ejtag_info, &ejtag_ctrl); if (ejtag_ctrl & EJTAG_CTRL_PRACC) break; LOG_DEBUG("DEBUGMODULE: No memory access in progress!"); return ERROR_JTAG_DEVICE_ERROR; } *ctrl = ejtag_ctrl; return ERROR_OK; } What does the while(1) serves for here - we will always do just one pass. In my opinion this is wrong and confusing. To make loop useful I had to comment out return line. Otherwise I think loop does not do what it is supposed to do - wait for the PrAcc bit to become "1", i.e. to know that there is pending R/W. It would be good if someone can comment on this. Best regards, Drasko _______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development