summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
45f0553)
Change-Id: I26adab09839795ecf363b7db912392bd5314cec5
Signed-off-by: Oleksij Rempel <bug-track@fisher-privat.net>
Reviewed-on: http://openocd.zylin.com/1344
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
#endif
#include "mips32_dmaacc.h"
#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);
static int mips32_dmaacc_read_mem8(struct mips_ejtag *ejtag_info,
uint32_t addr, int count, uint8_t *buf);
* displaying/modifying memory and memory mapped registers.
*/
* displaying/modifying memory and memory mapped registers.
*/
-static void ejtag_dma_dstrt_poll(struct mips_ejtag *ejtag_info)
+static int ejtag_dma_dstrt_poll(struct mips_ejtag *ejtag_info)
+ int64_t start = timeval_ms();
+
+ if (timeval_ms() - start > 1000) {
+ LOG_ERROR("DMA time out");
+ return -ETIMEDOUT;
+ }
ejtag_ctrl = EJTAG_CTRL_DMAACC | ejtag_info->ejtag_ctrl;
mips_ejtag_drscan_32(ejtag_info, &ejtag_ctrl);
} while (ejtag_ctrl & EJTAG_CTRL_DSTRT);
ejtag_ctrl = EJTAG_CTRL_DMAACC | ejtag_info->ejtag_ctrl;
mips_ejtag_drscan_32(ejtag_info, &ejtag_ctrl);
} while (ejtag_ctrl & EJTAG_CTRL_DSTRT);
}
static int ejtag_dma_read(struct mips_ejtag *ejtag_info, uint32_t addr, uint32_t *data)
}
static int ejtag_dma_read(struct mips_ejtag *ejtag_info, uint32_t addr, uint32_t *data)