parent
524d79ebe7
commit
796086cd49
|
@ -342,7 +342,6 @@ int mips_ejtag_init(struct mips_ejtag *ejtag_info)
|
||||||
int mips_ejtag_fastdata_scan(struct mips_ejtag *ejtag_info, int write_t, uint32_t *data)
|
int mips_ejtag_fastdata_scan(struct mips_ejtag *ejtag_info, int write_t, uint32_t *data)
|
||||||
{
|
{
|
||||||
struct jtag_tap *tap;
|
struct jtag_tap *tap;
|
||||||
uint8_t r[4];
|
|
||||||
|
|
||||||
tap = ejtag_info->tap;
|
tap = ejtag_info->tap;
|
||||||
assert(tap != NULL);
|
assert(tap != NULL);
|
||||||
|
@ -367,15 +366,14 @@ int mips_ejtag_fastdata_scan(struct mips_ejtag *ejtag_info, int write_t, uint32_
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fields[1].in_value = r;
|
fields[1].in_value = (void *) data;
|
||||||
}
|
}
|
||||||
|
|
||||||
jtag_add_dr_scan(tap, 2, fields, TAP_IDLE);
|
jtag_add_dr_scan(tap, 2, fields, TAP_IDLE);
|
||||||
|
|
||||||
if (!write_t)
|
if ( (!write_t) && (data) )
|
||||||
{
|
jtag_add_callback(mips_le_to_h_u32,
|
||||||
*data = buf_get_u32(fields[1].in_value, 0, 32);
|
(jtag_callback_data_t) data);
|
||||||
}
|
|
||||||
|
|
||||||
keep_alive();
|
keep_alive();
|
||||||
|
|
||||||
|
|
|
@ -146,4 +146,10 @@ int mips_ejtag_init(struct mips_ejtag *ejtag_info);
|
||||||
int mips_ejtag_config_step(struct mips_ejtag *ejtag_info, int enable_step);
|
int mips_ejtag_config_step(struct mips_ejtag *ejtag_info, int enable_step);
|
||||||
int mips_ejtag_read_debug(struct mips_ejtag *ejtag_info, uint32_t* debug_reg);
|
int mips_ejtag_read_debug(struct mips_ejtag *ejtag_info, uint32_t* debug_reg);
|
||||||
|
|
||||||
|
static __inline__ void mips_le_to_h_u32(jtag_callback_data_t arg)
|
||||||
|
{
|
||||||
|
uint8_t *in = (uint8_t *)arg;
|
||||||
|
*((uint32_t *)arg) = le_to_h_u32(in);
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* MIPS_EJTAG */
|
#endif /* MIPS_EJTAG */
|
||||||
|
|
Loading…
Reference in New Issue