This is an automated email from Gerrit. Oleksij Rempel ([email protected]) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/1344
-- gerrit commit c772b30d74c27a036d8d1eb695217cfcd8190b29 Author: Oleksij Rempel <[email protected]> Date: Thu Apr 18 12:00:14 2013 +0200 do not wait forever on ejtag_dma_dstrt_poll Change-Id: I26adab09839795ecf363b7db912392bd5314cec5 Signed-off-by: Oleksij Rempel <[email protected]> diff --git a/src/target/mips32_dmaacc.c b/src/target/mips32_dmaacc.c index e57d7a9..a398fb0 100644 --- a/src/target/mips32_dmaacc.c +++ b/src/target/mips32_dmaacc.c @@ -28,6 +28,7 @@ #endif #include "mips32_dmaacc.h" +#include <helper/time_support.h> static int mips32_dmaacc_read_mem8(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint8_t *buf); @@ -56,7 +57,13 @@ static int mips32_dmaacc_write_mem32(struct mips_ejtag *ejtag_info, static void ejtag_dma_dstrt_poll(struct mips_ejtag *ejtag_info) { uint32_t ejtag_ctrl; + int64_t start = timeval_ms(); + do { + if (timeval_ms() - start > 1000) { + LOG_ERROR("DMA time out"); + return; + } ejtag_ctrl = EJTAG_CTRL_DMAACC | ejtag_info->ejtag_ctrl; mips_ejtag_drscan_32(ejtag_info, &ejtag_ctrl); } while (ejtag_ctrl & EJTAG_CTRL_DSTRT); -- ------------------------------------------------------------------------------ Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis & visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter _______________________________________________ OpenOCD-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openocd-devel
