return ERROR_OK;
}
-void arm_endianness(u8 *tmp, void *in, int size, int be)
+void arm_endianness(u8 *tmp, void *in, int size, int be, int flip)
{
- u32 readback=flip_u32(le_to_h_u32(tmp), 32);
+ u32 readback=le_to_h_u32(tmp);
+ if (flip)
+ readback=flip_u32(readback, 32);
switch (size)
{
case 4:
jtag_add_dr_scan_now(2, fields, TAP_INVALID);
- arm_endianness(tmp, in, size, be);
+ arm_endianness(tmp, in, size, be, 1);
jtag_add_runtest(0, TAP_INVALID);
fields[0].in_value=tmp;
jtag_add_dr_scan_now(3, fields, TAP_INVALID);
- *in=flip_u32(le_to_h_u32(tmp), 32);
+ *in=le_to_h_u32(tmp);
}
else
{
jtag_add_dr_scan_now(3, fields, TAP_INVALID);
- *in=flip_u32(le_to_h_u32(tmp), 32);
+ *in=le_to_h_u32(tmp);
jtag_add_runtest(0, TAP_INVALID);
return ERROR_OK;
}
-extern void arm_endianness(u8 *tmp, void *in, int size, int be);
+extern void arm_endianness(u8 *tmp, void *in, int size, int be, int flip);
/* clock the target, and read the databus
* the *in pointer points to a buffer where elements of 'size' bytes
jtag_add_dr_scan_now(3, fields, TAP_INVALID);
- arm_endianness(tmp, in, size, be);
+ arm_endianness(tmp, in, size, be, 0);
jtag_add_runtest(0, TAP_INVALID);