Commit 73988aea authored by Stefan Mahr's avatar Stefan Mahr Committed by Øyvind Harboe
Browse files

mips: fix swapping if openocd is running on big endian host

parent 212db44f
...@@ -123,6 +123,7 @@ int mips_ejtag_drscan_32(struct mips_ejtag *ejtag_info, uint32_t *data) ...@@ -123,6 +123,7 @@ int mips_ejtag_drscan_32(struct mips_ejtag *ejtag_info, uint32_t *data)
void mips_ejtag_drscan_32_out(struct mips_ejtag *ejtag_info, uint32_t data) void mips_ejtag_drscan_32_out(struct mips_ejtag *ejtag_info, uint32_t data)
{ {
uint8_t t[4];
struct jtag_tap *tap; struct jtag_tap *tap;
tap = ejtag_info->tap; tap = ejtag_info->tap;
assert(tap != NULL); assert(tap != NULL);
...@@ -130,7 +131,9 @@ void mips_ejtag_drscan_32_out(struct mips_ejtag *ejtag_info, uint32_t data) ...@@ -130,7 +131,9 @@ void mips_ejtag_drscan_32_out(struct mips_ejtag *ejtag_info, uint32_t data)
struct scan_field field; struct scan_field field;
field.num_bits = 32; field.num_bits = 32;
field.out_value = (uint8_t *)&data; field.out_value = t;
buf_set_u32(t, 0, field.num_bits, data);
field.in_value = NULL; field.in_value = NULL;
jtag_add_dr_scan(tap, 1, &field, TAP_IDLE); jtag_add_dr_scan(tap, 1, &field, TAP_IDLE);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment