Commit e86dee32 authored by oharboe's avatar oharboe
Browse files

remove unecessary setting of deprecated fields to NULL

git-svn-id: svn://svn.berlios.de/openocd/trunk@1611 b42882b7-edfa-0310-969c-e2dbd0fdcd60
parent 7e50a397
......@@ -127,10 +127,10 @@ int str9xpec_set_instr(jtag_tap_t *tap, u32 new_instr, tap_state_t end_state)
buf_set_u32(field.out_value, 0, field.num_bits, new_instr);
field.in_value = NULL;
field.in_check_value = NULL;
field.in_check_mask = NULL;
field.in_handler = NULL;
field.in_handler_priv = NULL;
jtag_add_ir_scan(1, &field, end_state);
......@@ -153,10 +153,10 @@ static u8 str9xpec_isc_status(jtag_tap_t *tap)
field.out_value = NULL;
field.in_value = &status;
field.in_check_value = NULL;
field.in_check_mask = NULL;
field.in_handler = NULL;
field.in_handler_priv = NULL;
jtag_add_dr_scan(1, &field, TAP_IDLE);
jtag_execute_queue();
......@@ -245,10 +245,10 @@ static int str9xpec_read_config(struct flash_bank_s *bank)
field.out_value = NULL;
field.in_value = str9xpec_info->options;
field.in_check_value = NULL;
field.in_check_mask = NULL;
field.in_handler = NULL;
field.in_handler_priv = NULL;
jtag_add_dr_scan(1, &field, TAP_IDLE);
jtag_execute_queue();
......@@ -397,10 +397,10 @@ static int str9xpec_blank_check(struct flash_bank_s *bank, int first, int last)
field.out_value = buffer;
field.in_value = NULL;
field.in_check_value = NULL;
field.in_check_mask = NULL;
field.in_handler = NULL;
field.in_handler_priv = NULL;
jtag_add_dr_scan(1, &field, TAP_IDLE);
jtag_add_sleep(40000);
......@@ -411,10 +411,10 @@ static int str9xpec_blank_check(struct flash_bank_s *bank, int first, int last)
field.out_value = NULL;
field.in_value = buffer;
field.in_check_value = NULL;
field.in_check_mask = NULL;
field.in_handler = NULL;
field.in_handler_priv = NULL;
jtag_add_dr_scan(1, &field, TAP_IRPAUSE);
jtag_execute_queue();
......@@ -513,10 +513,10 @@ static int str9xpec_erase_area(struct flash_bank_s *bank, int first, int last)
field.out_value = buffer;
field.in_value = NULL;
field.in_check_value = NULL;
field.in_check_mask = NULL;
field.in_handler = NULL;
field.in_handler_priv = NULL;
jtag_add_dr_scan(1, &field, TAP_IDLE);
jtag_execute_queue();
......@@ -579,10 +579,10 @@ static int str9xpec_lock_device(struct flash_bank_s *bank)
field.out_value = NULL;
field.in_value = &status;
field.in_check_value = NULL;
field.in_check_mask = NULL;
field.in_handler = NULL;
field.in_handler_priv = NULL;
jtag_add_dr_scan(1, &field, -1);
jtag_execute_queue();
......@@ -665,10 +665,10 @@ static int str9xpec_set_address(struct flash_bank_s *bank, u8 sector)
field.out_value = &sector;
field.in_value = NULL;
field.in_check_value = NULL;
field.in_check_mask = NULL;
field.in_handler = NULL;
field.in_handler_priv = NULL;
jtag_add_dr_scan(1, &field, -1);
......@@ -754,10 +754,10 @@ static int str9xpec_write(struct flash_bank_s *bank, u8 *buffer, u32 offset, u32
field.out_value = (buffer + bytes_written);
field.in_value = NULL;
field.in_check_value = NULL;
field.in_check_mask = NULL;
field.in_handler = NULL;
field.in_handler_priv = NULL;
jtag_add_dr_scan(1, &field, TAP_IDLE);
......@@ -772,10 +772,10 @@ static int str9xpec_write(struct flash_bank_s *bank, u8 *buffer, u32 offset, u32
field.out_value = NULL;
field.in_value = scanbuf;
field.in_check_value = NULL;
field.in_check_mask = NULL;
field.in_handler = NULL;
field.in_handler_priv = NULL;
jtag_add_dr_scan(1, &field, -1);
jtag_execute_queue();
......@@ -814,10 +814,10 @@ static int str9xpec_write(struct flash_bank_s *bank, u8 *buffer, u32 offset, u32
field.out_value = last_dword;
field.in_value = NULL;
field.in_check_value = NULL;
field.in_check_mask = NULL;
field.in_handler = NULL;
field.in_handler_priv = NULL;
jtag_add_dr_scan(1, &field, TAP_IDLE);
......@@ -832,10 +832,10 @@ static int str9xpec_write(struct flash_bank_s *bank, u8 *buffer, u32 offset, u32
field.out_value = NULL;
field.in_value = scanbuf;
field.in_check_value = NULL;
field.in_check_mask = NULL;
field.in_handler = NULL;
field.in_handler_priv = NULL;
jtag_add_dr_scan(1, &field, -1);
jtag_execute_queue();
......@@ -896,10 +896,10 @@ static int str9xpec_handle_part_id_command(struct command_context_s *cmd_ctx, ch
field.out_value = NULL;
field.in_value = buffer;
field.in_check_value = NULL;
field.in_check_mask = NULL;
field.in_handler = NULL;
field.in_handler_priv = NULL;
jtag_add_dr_scan(1, &field, TAP_IDLE);
jtag_execute_queue();
......@@ -1021,10 +1021,10 @@ static int str9xpec_write_options(struct flash_bank_s *bank)
field.out_value = str9xpec_info->options;
field.in_value = NULL;
field.in_check_value = NULL;
field.in_check_mask = NULL;
field.in_handler = NULL;
field.in_handler_priv = NULL;
jtag_add_dr_scan(1, &field, TAP_IDLE);
......@@ -1039,10 +1039,10 @@ static int str9xpec_write_options(struct flash_bank_s *bank)
field.out_value = NULL;
field.in_value = &status;
field.in_check_value = NULL;
field.in_check_mask = NULL;
field.in_handler = NULL;
field.in_handler_priv = NULL;
jtag_add_dr_scan(1, &field, -1);
jtag_execute_queue();
......
......@@ -1486,10 +1486,10 @@ int jtag_examine_chain(void)
field.out_value = idcode_buffer;
field.in_value = idcode_buffer;
field.in_check_value = NULL;
field.in_check_mask = NULL;
field.in_handler = NULL;
field.in_handler_priv = NULL;
for (i = 0; i < JTAG_MAX_CHAIN_SIZE; i++)
{
......@@ -1664,10 +1664,10 @@ int jtag_validate_chain(void)
field.out_value = ir_test;
field.in_value = ir_test;
field.in_check_value = NULL;
field.in_check_mask = NULL;
field.in_handler = NULL;
field.in_handler_priv = NULL;
jtag_add_plain_ir_scan(1, &field, TAP_RESET);
jtag_execute_queue();
......
......@@ -275,8 +275,8 @@ typedef struct scan_field_s
/* in_check_value/mask, in_handler_error_handler, in_handler_priv can be used by the in handler, otherwise they contain garbage */
u8* in_check_value; /* deprecated! only used from jtag_set_check_value. used to validate scan results */
u8* in_check_mask; /* deprecated! only used from jtag_set_check_value. check specified bits against check_value */
in_handler_t in_handler; /* deprecated! DO NOT USE! process received buffer using this handler */
void* in_handler_priv; /* additional information for the in_handler */
in_handler_t in_handler; /* deprecated! SET TO NULL. DO NOT USE! process received buffer using this handler */
void* in_handler_priv; /* deprecated! only used by obsolete in_handler implementations */
} scan_field_t;
enum scan_type {
......
......@@ -56,12 +56,12 @@ int virtex2_set_instr(jtag_tap_t *tap, u32 new_instr)
field.num_bits = tap->ir_length;
field.out_value = calloc(CEIL(field.num_bits, 8), 1);
buf_set_u32(field.out_value, 0, field.num_bits, new_instr);
field.in_value = NULL;
field.in_check_value = NULL;
field.in_check_mask = NULL;
field.in_handler = NULL;
field.in_handler_priv = NULL;
jtag_add_ir_scan(1, &field, TAP_IDLE);
......@@ -84,10 +84,7 @@ int virtex2_send_32(struct pld_device_s *pld_device, int num_words, u32 *words)
scan_field.num_bits = num_words * 32;
scan_field.out_value = values;
scan_field.in_value = NULL;
scan_field.in_check_value = NULL;
scan_field.in_check_mask = NULL;
scan_field.in_handler = NULL;
scan_field.in_handler_priv = NULL;
for (i = 0; i < num_words; i++)
buf_set_u32(values + 4 * i, 0, 32, flip_u32(*words++, 32));
......@@ -117,8 +114,6 @@ int virtex2_receive_32(struct pld_device_s *pld_device, int num_words, u32 *word
scan_field.num_bits = 32;
scan_field.out_value = NULL;
scan_field.in_value = NULL;
scan_field.in_check_value = NULL;
scan_field.in_check_mask = NULL;
scan_field.in_handler = virtex2_jtag_buf_to_u32; /* deprecated! invoke this from user code! */
virtex2_set_instr(virtex2_info->tap, 0x4); /* CFG_OUT */
......@@ -164,12 +159,12 @@ int virtex2_load(struct pld_device_s *pld_device, char *filename)
scan_field_t field;
field.tap = virtex2_info->tap;
field.in_value = NULL;
field.in_check_value = NULL;
field.in_check_mask = NULL;
field.in_handler = NULL;
field.in_handler_priv = NULL;
if ((retval = xilinx_read_bit_file(&bit_file, filename)) != ERROR_OK)
return retval;
......
......@@ -977,10 +977,10 @@ static int svf_run_command(struct command_context_s *cmd_ctx, char *cmd_str)
field.out_value = &svf_tdi_buffer[svf_buffer_index];
field.in_value = &svf_tdi_buffer[svf_buffer_index];
field.in_check_value = NULL;
field.in_check_mask = NULL;
field.in_handler = NULL;
field.in_handler_priv = NULL;
jtag_add_plain_dr_scan(1, &field, svf_para.dr_end_state);
svf_buffer_index += (i + 7) >> 3;
......@@ -1078,10 +1078,10 @@ static int svf_run_command(struct command_context_s *cmd_ctx, char *cmd_str)
field.out_value = &svf_tdi_buffer[svf_buffer_index];
field.in_value = &svf_tdi_buffer[svf_buffer_index];
field.in_check_value = NULL;
field.in_check_mask = NULL;
field.in_handler = NULL;
field.in_handler_priv = NULL;
jtag_add_plain_ir_scan(1, &field, svf_para.ir_end_state);
svf_buffer_index += (i + 7) >> 3;
......
......@@ -114,10 +114,10 @@ int arm720t_scan_cp15(target_t *target, u32 out, u32 *in, int instruction, int c
fields[0].out_value = &instruction_buf;
fields[0].in_value = NULL;
fields[0].in_check_value = NULL;
fields[0].in_check_mask = NULL;
fields[0].in_handler = NULL;
fields[0].in_handler_priv = NULL;
fields[1].tap = jtag_info->tap;
fields[1].num_bits = 32;
......@@ -131,10 +131,10 @@ int arm720t_scan_cp15(target_t *target, u32 out, u32 *in, int instruction, int c
} else
{
fields[1].in_handler = NULL;
fields[1].in_handler_priv = NULL;
}
fields[1].in_check_value = NULL;
fields[1].in_check_mask = NULL;
jtag_add_dr_scan(2, fields, TAP_INVALID);
......
......@@ -113,20 +113,20 @@ int arm7tdmi_examine_debug_reason(target_t *target)
fields[0].out_value = NULL;
fields[0].in_value = &breakpoint;
fields[0].in_check_value = NULL;
fields[0].in_check_mask = NULL;
fields[0].in_handler = NULL;
fields[0].in_handler_priv = NULL;
fields[1].tap = arm7_9->jtag_info.tap;
fields[1].num_bits = 32;
fields[1].out_value = NULL;
fields[1].in_value = databus;
fields[1].in_check_value = NULL;
fields[1].in_check_mask = NULL;
fields[1].in_handler = NULL;
fields[1].in_handler_priv = NULL;
if((retval = arm_jtag_scann(&arm7_9->jtag_info, 0x1)) != ERROR_OK)
{
......@@ -200,10 +200,10 @@ int arm7tdmi_clock_data_in(arm_jtag_t *jtag_info, u32 *in)
fields[0].out_value = NULL;
fields[0].in_value = NULL;
fields[0].in_check_value = NULL;
fields[0].in_check_mask = NULL;
fields[0].in_handler = NULL;
fields[0].in_handler_priv = NULL;
fields[1].tap = jtag_info->tap;
fields[1].num_bits = 32;
......@@ -212,8 +212,8 @@ int arm7tdmi_clock_data_in(arm_jtag_t *jtag_info, u32 *in)
fields[1].in_value = NULL;
fields[1].in_handler = arm_jtag_buf_to_u32_flip; /* deprecated! invoke this from user code! */
fields[1].in_handler_priv = in;
fields[1].in_check_value = NULL;
fields[1].in_check_mask = NULL;
jtag_add_dr_scan(2, fields, TAP_INVALID);
......@@ -261,10 +261,10 @@ int arm7tdmi_clock_data_in_endianness(arm_jtag_t *jtag_info, void *in, int size,
fields[0].out_value = NULL;
fields[0].in_value = NULL;
fields[0].in_check_value = NULL;
fields[0].in_check_mask = NULL;
fields[0].in_handler = NULL;
fields[0].in_handler_priv = NULL;
fields[1].tap = jtag_info->tap;
fields[1].num_bits = 32;
......@@ -284,8 +284,8 @@ int arm7tdmi_clock_data_in_endianness(arm_jtag_t *jtag_info, void *in, int size,
break;
}
fields[1].in_handler_priv = in;
fields[1].in_check_value = NULL;
fields[1].in_check_mask = NULL;
jtag_add_dr_scan(2, fields, TAP_INVALID);
......
......@@ -115,40 +115,40 @@ int arm920t_read_cp15_physical(target_t *target, int reg_addr, u32 *value)
fields[0].out_value = &access_type_buf;
fields[0].in_value = NULL;
fields[0].in_check_value = NULL;
fields[0].in_check_mask = NULL;
fields[0].in_handler = NULL;
fields[0].in_handler_priv = NULL;
fields[1].tap = jtag_info->tap;
fields[1].num_bits = 32;
fields[1].out_value = NULL;
fields[1].in_value = NULL;
fields[1].in_check_value = NULL;
fields[1].in_check_mask = NULL;
fields[1].in_handler = NULL;
fields[1].in_handler_priv = NULL;
fields[2].tap = jtag_info->tap;
fields[2].num_bits = 6;
fields[2].out_value = &reg_addr_buf;
fields[2].in_value = NULL;
fields[2].in_check_value = NULL;
fields[2].in_check_mask = NULL;
fields[2].in_handler = NULL;
fields[2].in_handler_priv = NULL;
fields[3].tap = jtag_info->tap;
fields[3].num_bits = 1;
fields[3].out_value = &nr_w_buf;
fields[3].in_value = NULL;
fields[3].in_check_value = NULL;
fields[3].in_check_mask = NULL;
fields[3].in_handler = NULL;
fields[3].in_handler_priv = NULL;
jtag_add_dr_scan(4, fields, TAP_INVALID);
......@@ -187,40 +187,40 @@ int arm920t_write_cp15_physical(target_t *target, int reg_addr, u32 value)
fields[0].out_value = &access_type_buf;
fields[0].in_value = NULL;
fields[0].in_check_value = NULL;
fields[0].in_check_mask = NULL;
fields[0].in_handler = NULL;
fields[0].in_handler_priv = NULL;
fields[1].tap = jtag_info->tap;
fields[1].num_bits = 32;
fields[1].out_value = value_buf;
fields[1].in_value = NULL;
fields[1].in_check_value = NULL;
fields[1].in_check_mask = NULL;
fields[1].in_handler = NULL;
fields[1].in_handler_priv = NULL;
fields[2].tap = jtag_info->tap;
fields[2].num_bits = 6;
fields[2].out_value = &reg_addr_buf;
fields[2].in_value = NULL;
fields[2].in_check_value = NULL;
fields[2].in_check_mask = NULL;
fields[2].in_handler = NULL;
fields[2].in_handler_priv = NULL;
fields[3].tap = jtag_info->tap;
fields[3].num_bits = 1;
fields[3].out_value = &nr_w_buf;
fields[3].in_value = NULL;
fields[3].in_check_value = NULL;
fields[3].in_check_mask = NULL;
fields[3].in_handler = NULL;
fields[3].in_handler_priv = NULL;
jtag_add_dr_scan(4, fields, TAP_INVALID);
......@@ -254,40 +254,40 @@ int arm920t_execute_cp15(target_t *target, u32 cp15_opcode, u32 arm_opcode)
fields[0].out_value = &access_type_buf;
fields[0].in_value = NULL;
fields[0].in_check_value = NULL;
fields[0].in_check_mask = NULL;
fields[0].in_handler = NULL;
fields[0].in_handler_priv = NULL;
fields[1].tap = jtag_info->tap;
fields[1].num_bits = 32;
fields[1].out_value = cp15_opcode_buf;
fields[1].in_value = NULL;
fields[1].in_check_value = NULL;
fields[1].in_check_mask = NULL;
fields[1].in_handler = NULL;
fields[1].in_handler_priv = NULL;
fields[2].tap = jtag_info->tap;
fields[2].num_bits = 6;
fields[2].out_value = &reg_addr_buf;
fields[2].in_value = NULL;
fields[2].in_check_value = NULL;
fields[2].in_check_mask = NULL;
fields[2].in_handler = NULL;
fields[2].in_handler_priv = NULL;
fields[3].tap = jtag_info->tap;
fields[3].num_bits = 1;
fields[3].out_value = &nr_w_buf;
fields[3].in_value = NULL;
fields[3].in_check_value = NULL;
fields[3].in_check_mask = NULL;
fields[3].in_handler = NULL;
fields[3].in_handler_priv = NULL;
jtag_add_dr_scan(4, fields, TAP_INVALID);
......
......@@ -139,40 +139,40 @@ int arm926ejs_cp15_read(target_t *target, u32 op1, u32 op2, u32 CRn, u32 CRm, u3
fields[0].out_value = NULL;
fields[0].in_value = NULL;
fields[0].in_check_value = NULL;
fields[0].in_check_mask = NULL;
fields[0].in_handler = NULL;
fields[0].in_handler_priv = NULL;