37 LOG_ERROR(
"%s: setting address failed", __func__);
55 memset(fields, 0,
sizeof(fields));
58 memset(addr_buf, 0,
sizeof(addr_buf));
59 memset(busy_buf, 0,
sizeof(busy_buf));
74 LOG_ERROR(
"%s: setting address failed", __func__);
94 memset(data_buf, 0,
sizeof(data_buf));
95 memset(busy_buf, 0,
sizeof(busy_buf));
109 LOG_ERROR(
"%s: reading data failed", __func__);
128 uint8_t dummy_buf[4];
132 memset(data_buf, 0,
sizeof(data_buf));
133 memset(busy_buf, 0,
sizeof(busy_buf));
134 memset(dummy_buf, 0,
sizeof(dummy_buf));
149 LOG_ERROR(
"%s: reading data failed", __func__);
161 uint32_t
addr, uint32_t *value)
169 uint32_t
addr, uint32_t value)
181 uint8_t slave_buf[4];
185 memset(fields, 0,
sizeof(fields));
188 memset(addr_buf, 0,
sizeof(addr_buf));
189 memset(busy_buf, 0,
sizeof(busy_buf));
190 memset(slave_buf, 0,
sizeof(slave_buf));
206 LOG_ERROR(
"%s: setting address failed", __func__);
225 memset(data_buf, 0,
sizeof(data_buf));
226 memset(busy_buf, 0,
sizeof(busy_buf));
240 LOG_ERROR(
"%s: reading data failed", __func__);
263 memset(data_buf, 0,
sizeof(data_buf));
264 memset(busy_buf, 0,
sizeof(busy_buf));
265 memset(zero_buf, 0,
sizeof(zero_buf));
280 LOG_ERROR(
"%s: reading data failed", __func__);
291 uint32_t
addr, uint32_t *value)
301 uint32_t
addr, uint32_t value)
int avr32_jtag_exec(struct avr32_jtag *jtag_info, uint32_t inst)
static int avr32_jtag_set_instr(struct avr32_jtag *jtag_info, int new_instr)
static int avr32_jtag_nexus_write_data(struct avr32_jtag *jtag_info, uint32_t data)
int avr32_jtag_nexus_write(struct avr32_jtag *jtag_info, uint32_t addr, uint32_t value)
static int avr32_jtag_nexus_set_address(struct avr32_jtag *jtag_info, uint32_t addr, int mode)
static int avr32_jtag_mwa_read_data(struct avr32_jtag *jtag_info, uint32_t *pdata)
static int avr32_jtag_nexus_read_data(struct avr32_jtag *jtag_info, uint32_t *pdata)
int avr32_ocd_setbits(struct avr32_jtag *jtag, int reg, uint32_t bits)
int avr32_ocd_clearbits(struct avr32_jtag *jtag, int reg, uint32_t bits)
int avr32_jtag_nexus_read(struct avr32_jtag *jtag_info, uint32_t addr, uint32_t *value)
static int avr32_jtag_mwa_write_data(struct avr32_jtag *jtag_info, uint32_t data)
int avr32_jtag_mwa_write(struct avr32_jtag *jtag_info, int slave, uint32_t addr, uint32_t value)
static int avr32_jtag_mwa_set_address(struct avr32_jtag *jtag_info, int slave, uint32_t addr, int mode)
int avr32_jtag_mwa_read(struct avr32_jtag *jtag_info, int slave, uint32_t addr, uint32_t *value)
#define AVR32_OCDREG_DINST
#define AVR32_INST_NEXUS_ACCESS
#define AVR32_INST_MW_ACCESS
static uint32_t buf_get_u32(const uint8_t *_buffer, unsigned int first, unsigned int num)
Retrieves num bits from _buffer, starting at the first bit, returning the bits in a 32-bit word.
static void buf_set_u32(uint8_t *_buffer, unsigned int first, unsigned int num, uint32_t value)
Sets num bits in _buffer, starting at the first bit, using the bits in value.
int jtag_execute_queue(void)
For software FIFO implementations, the queued commands can be executed during this call or earlier.
void jtag_add_ir_scan(struct jtag_tap *active, struct scan_field *in_fields, tap_state_t state)
Generate an IR SCAN with a list of scan fields with one entry for each enabled TAP.
void jtag_add_dr_scan(struct jtag_tap *active, int in_num_fields, const struct scan_field *in_fields, tap_state_t state)
Generate a DR SCAN using the fields passed to the function.
The JTAG interface can be implemented with a software or hardware fifo.
#define LOG_ERROR(expr ...)
uint8_t bits[QN908X_FLASH_MAX_BLOCKS *QN908X_FLASH_PAGES_PER_BLOCK/8]
target_addr_t addr
Start address to search for the control block.
uint8_t * cur_instr
current instruction
unsigned int ir_length
size of instruction register
This structure defines a single scan field in the scan.
uint8_t * in_value
A pointer to a 32-bit memory location for data scanned out.
const uint8_t * out_value
A pointer to value to be scanned into the device.
unsigned int num_bits
The number of bits this field specifies.