From f6ed7cb271fb8456250b13759df8697999bbe2d4 Mon Sep 17 00:00:00 2001 From: oharboe Date: Thu, 7 May 2009 23:00:28 +0000 Subject: [PATCH] more in_handler typo fixes git-svn-id: svn://svn.berlios.de/openocd/trunk@1657 b42882b7-edfa-0310-969c-e2dbd0fdcd60 --- src/target/arm7tdmi.c | 8 +++++--- src/target/arm9tdmi.c | 8 ++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/target/arm7tdmi.c b/src/target/arm7tdmi.c index aac1fef6..5f45ad99 100644 --- a/src/target/arm7tdmi.c +++ b/src/target/arm7tdmi.c @@ -234,9 +234,11 @@ int arm7tdmi_clock_data_in(arm_jtag_t *jtag_info, u32 *in) 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: @@ -295,7 +297,7 @@ int arm7tdmi_clock_data_in_endianness(arm_jtag_t *jtag_info, void *in, int size, 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); diff --git a/src/target/arm9tdmi.c b/src/target/arm9tdmi.c index 73f0879f..57dab4fa 100644 --- a/src/target/arm9tdmi.c +++ b/src/target/arm9tdmi.c @@ -238,7 +238,7 @@ int arm9tdmi_clock_out(arm_jtag_t *jtag_info, u32 instr, u32 out, u32 *in, int s 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 { @@ -301,7 +301,7 @@ int arm9tdmi_clock_data_in(arm_jtag_t *jtag_info, u32 *in) 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); @@ -326,7 +326,7 @@ int arm9tdmi_clock_data_in(arm_jtag_t *jtag_info, u32 *in) 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 @@ -366,7 +366,7 @@ int arm9tdmi_clock_data_in_endianness(arm_jtag_t *jtag_info, void *in, int size, 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); -- 2.39.5