summaryrefslogtreecommitdiff
path: root/src/target
diff options
context:
space:
mode:
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-06-19 08:18:36 +0000
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-06-19 08:18:36 +0000
commit333642fcff9901a8f20c02457756ca9715641139 (patch)
tree6b2b4d22eaaec6104316093471c9ad40c53787cd /src/target
parenta1c14646cbfde337441bb76f09a333c8c40127eb (diff)
downloadopenocd+libswd-333642fcff9901a8f20c02457756ca9715641139.tar.gz
openocd+libswd-333642fcff9901a8f20c02457756ca9715641139.tar.bz2
openocd+libswd-333642fcff9901a8f20c02457756ca9715641139.tar.xz
openocd+libswd-333642fcff9901a8f20c02457756ca9715641139.zip
fix jtag_add_callback() args. The first argument is nothing special, it's just another generic argument.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2290 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/target')
-rw-r--r--src/target/arm720t.c2
-rw-r--r--src/target/arm7tdmi.c7
-rw-r--r--src/target/arm920t.c2
-rw-r--r--src/target/arm926ejs.c2
-rw-r--r--src/target/arm966e.c2
-rw-r--r--src/target/arm9tdmi.c9
-rw-r--r--src/target/arm_adi_v5.c2
-rw-r--r--src/target/arm_jtag.h10
-rw-r--r--src/target/embeddedice.c2
-rw-r--r--src/target/etb.c5
-rw-r--r--src/target/xscale.c5
11 files changed, 27 insertions, 21 deletions
diff --git a/src/target/arm720t.c b/src/target/arm720t.c
index 72a20dfc..f160c9d5 100644
--- a/src/target/arm720t.c
+++ b/src/target/arm720t.c
@@ -120,7 +120,7 @@ int arm720t_scan_cp15(target_t *target, uint32_t out, uint32_t *in, int instruct
{
fields[1].in_value = (uint8_t *)in;
jtag_add_dr_scan(2, fields, jtag_get_end_state());
- jtag_add_callback(arm7flip32, (uint8_t *)in);
+ jtag_add_callback(arm7flip32, (jtag_callback_data_t)in);
} else
{
jtag_add_dr_scan(2, fields, jtag_get_end_state());
diff --git a/src/target/arm7tdmi.c b/src/target/arm7tdmi.c
index dead4bc4..febe0e37 100644
--- a/src/target/arm7tdmi.c
+++ b/src/target/arm7tdmi.c
@@ -189,7 +189,7 @@ int arm7tdmi_clock_data_in(arm_jtag_t *jtag_info, uint32_t *in)
jtag_add_dr_scan(2, fields, jtag_get_end_state());
- jtag_add_callback(arm7flip32, (uint8_t *)in);
+ jtag_add_callback(arm7flip32, (jtag_callback_data_t)in);
jtag_add_runtest(0, jtag_get_end_state());
@@ -245,8 +245,9 @@ void arm_endianness(uint8_t *tmp, void *in, int size, int be, int flip)
}
}
-static int arm7endianness(uint8_t *in, jtag_callback_data_t size, jtag_callback_data_t be, jtag_callback_data_t captured)
+static int arm7endianness(jtag_callback_data_t arg, jtag_callback_data_t size, jtag_callback_data_t be, jtag_callback_data_t captured)
{
+ uint8_t *in=(uint8_t *)arg;
arm_endianness((uint8_t *)captured, in, (int)size, (int)be, 1);
return ERROR_OK;
}
@@ -279,7 +280,7 @@ int arm7tdmi_clock_data_in_endianness(arm_jtag_t *jtag_info, void *in, int size,
jtag_add_dr_scan(2, fields, jtag_get_end_state());
- jtag_add_callback4(arm7endianness, in, (jtag_callback_data_t)size, (jtag_callback_data_t)be, (jtag_callback_data_t)fields[1].in_value);
+ jtag_add_callback4(arm7endianness, (jtag_callback_data_t)in, (jtag_callback_data_t)size, (jtag_callback_data_t)be, (jtag_callback_data_t)fields[1].in_value);
jtag_add_runtest(0, jtag_get_end_state());
diff --git a/src/target/arm920t.c b/src/target/arm920t.c
index 6e4e076f..80e0d99b 100644
--- a/src/target/arm920t.c
+++ b/src/target/arm920t.c
@@ -133,7 +133,7 @@ int arm920t_read_cp15_physical(target_t *target, int reg_addr, uint32_t *value)
jtag_add_dr_scan(4, fields, jtag_get_end_state());
- jtag_add_callback(arm_le_to_h_u32, (uint8_t *)value);
+ jtag_add_callback(arm_le_to_h_u32, (jtag_callback_data_t)value);
#ifdef _DEBUG_INSTRUCTION_EXECUTION_
jtag_execute_queue();
diff --git a/src/target/arm926ejs.c b/src/target/arm926ejs.c
index 26e7f19f..e48b1bdf 100644
--- a/src/target/arm926ejs.c
+++ b/src/target/arm926ejs.c
@@ -167,7 +167,7 @@ int arm926ejs_cp15_read(target_t *target, uint32_t op1, uint32_t op2, uint32_t C
nr_w_buf = 0;
jtag_add_dr_scan(4, fields, jtag_get_end_state());
- jtag_add_callback(arm_le_to_h_u32, (uint8_t *)value);
+ jtag_add_callback(arm_le_to_h_u32, (jtag_callback_data_t)value);
if ((retval = jtag_execute_queue()) != ERROR_OK)
{
diff --git a/src/target/arm966e.c b/src/target/arm966e.c
index f6489683..2ad0ab17 100644
--- a/src/target/arm966e.c
+++ b/src/target/arm966e.c
@@ -195,7 +195,7 @@ int arm966e_read_cp15(target_t *target, int reg_addr, uint32_t *value)
jtag_add_dr_scan(3, fields, jtag_get_end_state());
- jtag_add_callback(arm_le_to_h_u32, (uint8_t *)value);
+ jtag_add_callback(arm_le_to_h_u32, (jtag_callback_data_t)value);
#ifdef _DEBUG_INSTRUCTION_EXECUTION_
diff --git a/src/target/arm9tdmi.c b/src/target/arm9tdmi.c
index 8edcdcb2..922fb085 100644
--- a/src/target/arm9tdmi.c
+++ b/src/target/arm9tdmi.c
@@ -206,7 +206,7 @@ int arm9tdmi_clock_out(arm_jtag_t *jtag_info, uint32_t instr, uint32_t out, uint
fields[0].in_value=(uint8_t *)in;
jtag_add_dr_scan(3, fields, jtag_get_end_state());
- jtag_add_callback(arm_le_to_h_u32, (uint8_t *)in);
+ jtag_add_callback(arm_le_to_h_u32, (jtag_callback_data_t)in);
}
else
{
@@ -265,7 +265,7 @@ int arm9tdmi_clock_data_in(arm_jtag_t *jtag_info, uint32_t *in)
jtag_add_dr_scan(3, fields, jtag_get_end_state());
- jtag_add_callback(arm_le_to_h_u32, (uint8_t *)in);
+ jtag_add_callback(arm_le_to_h_u32, (jtag_callback_data_t)in);
jtag_add_runtest(0, jtag_get_end_state());
@@ -292,8 +292,9 @@ int arm9tdmi_clock_data_in(arm_jtag_t *jtag_info, uint32_t *in)
extern void arm_endianness(uint8_t *tmp, void *in, int size, int be, int flip);
-static int arm9endianness(uint8_t *in, jtag_callback_data_t size, jtag_callback_data_t be, jtag_callback_data_t captured)
+static int arm9endianness(jtag_callback_data_t arg, jtag_callback_data_t size, jtag_callback_data_t be, jtag_callback_data_t captured)
{
+ uint8_t *in=(uint8_t *)arg;
arm_endianness((uint8_t *)captured, in, (int)size, (int)be, 0);
return ERROR_OK;
}
@@ -332,7 +333,7 @@ int arm9tdmi_clock_data_in_endianness(arm_jtag_t *jtag_info, void *in, int size,
jtag_add_dr_scan(3, fields, jtag_get_end_state());
- jtag_add_callback4(arm9endianness, in, (jtag_callback_data_t)size, (jtag_callback_data_t)be, (jtag_callback_data_t)fields[0].in_value);
+ jtag_add_callback4(arm9endianness, (jtag_callback_data_t)in, (jtag_callback_data_t)size, (jtag_callback_data_t)be, (jtag_callback_data_t)fields[0].in_value);
jtag_add_runtest(0, jtag_get_end_state());
diff --git a/src/target/arm_adi_v5.c b/src/target/arm_adi_v5.c
index 7d6ae81d..9ac66699 100644
--- a/src/target/arm_adi_v5.c
+++ b/src/target/arm_adi_v5.c
@@ -132,7 +132,7 @@ int adi_jtag_dp_scan_u32(swjdp_common_t *swjdp, uint8_t instr, uint8_t reg_addr,
fields[1].in_value = (uint8_t *)invalue;
jtag_add_dr_scan(2, fields, jtag_get_end_state());
- jtag_add_callback(arm_le_to_h_u32, (uint8_t *)invalue);
+ jtag_add_callback(arm_le_to_h_u32, (jtag_callback_data_t) invalue);
} else
{
diff --git a/src/target/arm_jtag.h b/src/target/arm_jtag.h
index 2d3d073b..e562ac17 100644
--- a/src/target/arm_jtag.h
+++ b/src/target/arm_jtag.h
@@ -58,14 +58,16 @@ int arm_jtag_buf_to_8(uint8_t *in_buf, void *priv, struct scan_field_s *field);
/* use this as a static so we can inline it in -O3 and refer to it via a pointer */
-static __inline__ void arm7flip32(uint8_t *in)
+static __inline__ void arm7flip32(jtag_callback_data_t arg)
{
- *((uint32_t *)in)=flip_u32(le_to_h_u32(in), 32);
+ uint8_t *in=(uint8_t *)arg;
+ *((uint32_t *)in)=flip_u32(le_to_h_u32(in), 32);
}
-static __inline__ void arm_le_to_h_u32(uint8_t *in)
+static __inline__ void arm_le_to_h_u32(jtag_callback_data_t arg)
{
- *((uint32_t *)in)=le_to_h_u32(in);
+ uint8_t *in=(uint8_t *)arg;
+ *((uint32_t *)in)=le_to_h_u32(in);
}
diff --git a/src/target/embeddedice.c b/src/target/embeddedice.c
index 3c4dacb6..28fe40ec 100644
--- a/src/target/embeddedice.c
+++ b/src/target/embeddedice.c
@@ -326,7 +326,7 @@ int embeddedice_receive(arm_jtag_t *jtag_info, uint32_t *data, uint32_t size)
fields[0].in_value = (uint8_t *)data;
jtag_add_dr_scan(3, fields, jtag_get_end_state());
- jtag_add_callback(arm_le_to_h_u32, (uint8_t *)data);
+ jtag_add_callback(arm_le_to_h_u32, (jtag_callback_data_t)data);
data++;
size--;
diff --git a/src/target/etb.c b/src/target/etb.c
index 633c5aa6..fe3afe43 100644
--- a/src/target/etb.c
+++ b/src/target/etb.c
@@ -158,8 +158,9 @@ static int etb_get_reg(reg_t *reg)
}
-static void etb_getbuf(uint8_t *in)
+static void etb_getbuf(jtag_callback_data_t arg)
{
+ uint8_t *in=(uint8_t *)arg;
*((uint32_t *)in)=buf_get_u32(in, 0, 32);
}
@@ -206,7 +207,7 @@ static int etb_read_ram(etb_t *etb, uint32_t *data, int num_frames)
fields[0].in_value = (uint8_t *)(data+i);
jtag_add_dr_scan(3, fields, jtag_get_end_state());
- jtag_add_callback(etb_getbuf, (uint8_t *)(data+i));
+ jtag_add_callback(etb_getbuf, (jtag_callback_data_t)(data+i));
}
jtag_execute_queue();
diff --git a/src/target/xscale.c b/src/target/xscale.c
index d92dde1c..58679bb4 100644
--- a/src/target/xscale.c
+++ b/src/target/xscale.c
@@ -293,8 +293,9 @@ int xscale_read_dcsr(target_t *target)
}
-static void xscale_getbuf(uint8_t *in)
+static void xscale_getbuf(jtag_callback_data_t arg)
{
+ uint8_t *in=(uint8_t *)arg;
*((uint32_t *)in)=buf_get_u32(in, 0, 32);
}
@@ -365,7 +366,7 @@ int xscale_receive(target_t *target, uint32_t *buffer, int num_words)
jtag_add_dr_scan_check(3, fields, jtag_set_end_state(TAP_IDLE));
- jtag_add_callback(xscale_getbuf, (uint8_t *)(field1+i));
+ jtag_add_callback(xscale_getbuf, (jtag_callback_data_t)(field1+i));
words_scheduled++;
}