28 uint32_t
addr,
int count,
const uint8_t *buf);
30 uint32_t
addr,
int count,
const uint16_t *buf);
32 uint32_t
addr,
int count,
const uint32_t *buf);
91 LOG_ERROR(
"DMA Read Addr = %08" PRIx32
" Data = ERROR ON READ (retrying)",
addr);
92 goto begin_ejtag_dma_read;
94 LOG_ERROR(
"DMA Read Addr = %08" PRIx32
" Data = ERROR ON READ",
addr);
107 begin_ejtag_dma_read_h:
133 LOG_ERROR(
"DMA Read Addr = %08" PRIx32
" Data = ERROR ON READ (retrying)",
addr);
134 goto begin_ejtag_dma_read_h;
136 LOG_ERROR(
"DMA Read Addr = %08" PRIx32
" Data = ERROR ON READ",
addr);
142 *data = (v >> 16) & 0xffff;
144 *data = (v & 0x0000ffff);
155 begin_ejtag_dma_read_b:
180 LOG_ERROR(
"DMA Read Addr = %08" PRIx32
" Data = ERROR ON READ (retrying)",
addr);
181 goto begin_ejtag_dma_read_b;
183 LOG_ERROR(
"DMA Read Addr = %08" PRIx32
" Data = ERROR ON READ",
addr);
188 switch (
addr & 0x3) {
193 *data = (v >> 8) & 0xff;
196 *data = (v >> 16) & 0xff;
199 *data = (v >> 24) & 0xff;
212 begin_ejtag_dma_write:
238 LOG_ERROR(
"DMA Write Addr = %08" PRIx32
" Data = ERROR ON WRITE (retrying)",
addr);
239 goto begin_ejtag_dma_write;
241 LOG_ERROR(
"DMA Write Addr = %08" PRIx32
" Data = ERROR ON WRITE",
addr);
258 begin_ejtag_dma_write_h:
284 LOG_ERROR(
"DMA Write Addr = %08" PRIx32
" Data = ERROR ON WRITE (retrying)",
addr);
285 goto begin_ejtag_dma_write_h;
287 LOG_ERROR(
"DMA Write Addr = %08" PRIx32
" Data = ERROR ON WRITE",
addr);
305 begin_ejtag_dma_write_b:
331 LOG_ERROR(
"DMA Write Addr = %08" PRIx32
" Data = ERROR ON WRITE (retrying)",
addr);
332 goto begin_ejtag_dma_write_b;
334 LOG_ERROR(
"DMA Write Addr = %08" PRIx32
" Data = ERROR ON WRITE",
addr);
360 for (i = 0; i <
count; i++) {
374 for (i = 0; i <
count; i++) {
388 for (i = 0; i <
count; i++) {
416 for (i = 0; i <
count; i++) {
430 for (i = 0; i <
count; i++) {
444 for (i = 0; i <
count; i++) {
#define ERROR_JTAG_DEVICE_ERROR
#define LOG_ERROR(expr ...)
int mips32_dmaacc_read_mem(struct mips_ejtag *ejtag_info, uint32_t addr, int size, int count, void *buf)
static int mips32_dmaacc_write_mem8(struct mips_ejtag *ejtag_info, uint32_t addr, int count, const uint8_t *buf)
static int ejtag_dma_dstrt_poll(struct mips_ejtag *ejtag_info)
static int mips32_dmaacc_write_mem16(struct mips_ejtag *ejtag_info, uint32_t addr, int count, const uint16_t *buf)
static int mips32_dmaacc_read_mem8(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint8_t *buf)
static int ejtag_dma_read_b(struct mips_ejtag *ejtag_info, uint32_t addr, uint8_t *data)
static int mips32_dmaacc_read_mem32(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint32_t *buf)
static int ejtag_dma_write(struct mips_ejtag *ejtag_info, uint32_t addr, uint32_t data)
int mips32_dmaacc_write_mem(struct mips_ejtag *ejtag_info, uint32_t addr, int size, int count, const void *buf)
static int ejtag_dma_read(struct mips_ejtag *ejtag_info, uint32_t addr, uint32_t *data)
static int ejtag_dma_write_h(struct mips_ejtag *ejtag_info, uint32_t addr, uint32_t data)
static int ejtag_dma_read_h(struct mips_ejtag *ejtag_info, uint32_t addr, uint16_t *data)
static int mips32_dmaacc_write_mem32(struct mips_ejtag *ejtag_info, uint32_t addr, int count, const uint32_t *buf)
static int mips32_dmaacc_read_mem16(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint16_t *buf)
static int ejtag_dma_write_b(struct mips_ejtag *ejtag_info, uint32_t addr, uint32_t data)
#define EJTAG_CTRL_DMA_WORD
#define EJTAG_CTRL_DMA_HALFWORD
#define EJTAG_CTRL_DMA_BYTE
void mips_ejtag_set_instr(struct mips_ejtag *ejtag_info, uint32_t new_instr)
int mips_ejtag_drscan_32(struct mips_ejtag *ejtag_info, uint32_t *data)
#define EJTAG_CTRL_DMAACC
#define EJTAG_INST_CONTROL
#define EJTAG_INST_ADDRESS
target_addr_t addr
Start address to search for the control block.
size_t size
Size of the control block search area.