From 807a8c62ed82f64c2b4fe1bc1fe24896e287ce5a Mon Sep 17 00:00:00 2001 From: Jochen Friedrich Date: Mon, 18 Jul 2011 16:39:03 +0200 Subject: [PATCH] Print an error message if a DMA timeout occurs. This still needs to be improved to stop the DMA and report the error to the caller. But at least it's no longer failing silently. --- urjtag/src/bus/ejtag_dma.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/urjtag/src/bus/ejtag_dma.c b/urjtag/src/bus/ejtag_dma.c index 586e6a31..f72471ba 100644 --- a/urjtag/src/bus/ejtag_dma.c +++ b/urjtag/src/bus/ejtag_dma.c @@ -231,6 +231,9 @@ ejtag_dma_write (urj_bus_t *bus, unsigned int addr, unsigned int data, int sz) } while (ejctrl->out->data[DstRt] == 1); // This flag tell us the processor has completed the op + if (!timeout) + urj_log (URJ_LOG_LEVEL_NORMAL, "Timeout\n"); + urj_part_set_instruction (bus->part, "EJTAG_CONTROL"); urj_tap_chain_shift_instructions (bus->chain); urj_tap_register_fill (ejctrl->in, 0); @@ -311,6 +314,9 @@ ejtag_dma_read (urj_bus_t *bus, unsigned int addr, int sz) } while (ejctrl->out->data[DstRt] == 1); // This flag tell us the processor has completed the op + if (!timeout) + urj_log (URJ_LOG_LEVEL_NORMAL, "Timeout\n"); + urj_part_set_instruction (bus->part, "EJTAG_DATA"); urj_tap_chain_shift_instructions (bus->chain); urj_tap_register_fill (ejdata->in, 0);