]> git.sur5r.net Git - openocd/commitdiff
Move interface_jtag_add_scan_check_alloc implementations to their
authorzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Tue, 2 Jun 2009 08:04:21 +0000 (08:04 +0000)
committerzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Tue, 2 Jun 2009 08:04:21 +0000 (08:04 +0000)
respective implementation files.

git-svn-id: svn://svn.berlios.de/openocd/trunk@1999 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/jtag/jtag.c
src/jtag/jtag.h
src/jtag/jtag_driver.c
src/jtag/zy1000.c

index af07e78a2b177884fe8f356bcf904e37da9fd792..593200ee8b0b805ce359142622f8a31da69575c5 100644 (file)
@@ -594,27 +594,6 @@ static int jtag_check_value_mask_callback(u8 *in, jtag_callback_data_t data1, jt
        return jtag_check_value_inner(in, (u8 *)data1, (u8 *)data2, (int)data3);
 }
 
-#ifdef HAVE_JTAG_MINIDRIVER_H
-void interface_jtag_add_scan_check_alloc(scan_field_t *field)
-{
-       /* We're executing this synchronously, so try to use local storage. */
-       if (field->num_bits > 32)
-       {
-               unsigned num_bytes = TAP_SCAN_BYTES(field->num_bits);
-               field->in_value = (u8 *)malloc(num_bytes);
-               field->allocated = 1;
-       }
-       else
-               field->in_value = field->intmp;
-}
-#else
-void interface_jtag_add_scan_check_alloc(scan_field_t *field)
-{
-       unsigned num_bytes = TAP_SCAN_BYTES(field->num_bits);
-       field->in_value = (u8 *)cmd_queue_alloc(num_bytes);
-}
-#endif
-
 static void jtag_add_scan_check(void (*jtag_add_scan)(int in_num_fields, const scan_field_t *in_fields, tap_state_t state),
                int in_num_fields, scan_field_t *in_fields, tap_state_t state)
 {
index 9298e896d7b258121b7ae7fac885bdacfc5d1764..bc7ce93dbae57bec48ed6ace21025eff26dd023f 100644 (file)
@@ -843,6 +843,8 @@ void jtag_tap_handle_event(jtag_tap_t* tap, enum jtag_tap_event e);
 
 #ifdef INCLUDE_JTAG_MINIDRIVER_H
 
+extern void interface_jtag_add_scan_check_alloc(scan_field_t *field);
+
 extern int interface_jtag_add_ir_scan(
                int num_fields, const scan_field_t* fields,
                tap_state_t endstate);
index d53235967256e1cde02c2a9dd67a0ee4ed3f9895..f22b1a8d11d09f6340da3b47e3b4c00e60626355 100644 (file)
@@ -499,6 +499,12 @@ void jtag_add_callback(jtag_callback1_t callback, u8 *in)
        jtag_add_callback4(jtag_convert_to_callback4, in, (jtag_callback_data_t)callback, 0, 0);
 }
 
+void interface_jtag_add_scan_check_alloc(scan_field_t *field)
+{
+       unsigned num_bytes = TAP_SCAN_BYTES(field->num_bits);
+       field->in_value = (u8 *)cmd_queue_alloc(num_bytes);
+}
+
 int interface_jtag_execute_queue(void)
 {
        int retval = default_interface_jtag_execute_queue();
index cfe40f4c2166939bce89c14d8115283776fc0958..788f379d5dbab5e68ea4592220b1087fc930c087 100644 (file)
@@ -380,6 +380,18 @@ int zy1000_quit(void)
 }
 
 
+void interface_jtag_add_scan_check_alloc(scan_field_t *field)
+{
+       /* We're executing this synchronously, so try to use local storage. */
+       if (field->num_bits > 32)
+       {
+               unsigned num_bytes = TAP_SCAN_BYTES(field->num_bits);
+               field->in_value = (u8 *)malloc(num_bytes);
+               field->allocated = 1;
+       }
+       else
+               field->in_value = field->intmp;
+}
 
 
 int interface_jtag_execute_queue(void)