Fixed formatting issues flagged by checkpatch.pl.
This commit is contained in:
parent
7f18c48b83
commit
7e0baf6720
|
@ -282,10 +282,9 @@ static uint32_t dtmcontrol_scan(struct target *target, uint32_t out)
|
||||||
uint8_t out_value[4];
|
uint8_t out_value[4];
|
||||||
|
|
||||||
#if BUILD_RISCV_ARTY_BSCAN == 1
|
#if BUILD_RISCV_ARTY_BSCAN == 1
|
||||||
if (target->bscan_tunnel_ir_width != 0) {
|
if (target->bscan_tunnel_ir_width != 0)
|
||||||
return dtmcontrol_scan_via_bscan(target, out);
|
return dtmcontrol_scan_via_bscan(target, out);
|
||||||
}
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
buf_set_u32(out_value, 0, 32, out);
|
buf_set_u32(out_value, 0, 32, out);
|
||||||
|
|
||||||
|
|
|
@ -411,7 +411,7 @@ static void select_dmi(struct target *target)
|
||||||
select_dmi_via_bscan(target);
|
select_dmi_via_bscan(target);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
jtag_add_ir_scan(target->tap, &select_dbus, TAP_IDLE);
|
jtag_add_ir_scan(target->tap, &select_dbus, TAP_IDLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -422,10 +422,9 @@ static uint32_t dtmcontrol_scan(struct target *target, uint32_t out)
|
||||||
uint8_t out_value[4];
|
uint8_t out_value[4];
|
||||||
|
|
||||||
#if BUILD_RISCV_ARTY_BSCAN == 1
|
#if BUILD_RISCV_ARTY_BSCAN == 1
|
||||||
if (target->bscan_tunnel_ir_width != 0) {
|
if (target->bscan_tunnel_ir_width != 0)
|
||||||
return dtmcontrol_scan_via_bscan(target, out);
|
return dtmcontrol_scan_via_bscan(target, out);
|
||||||
}
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
buf_set_u32(out_value, 0, 32, out);
|
buf_set_u32(out_value, 0, 32, out);
|
||||||
|
|
||||||
|
@ -501,7 +500,7 @@ static dmi_status_t dmi_scan(struct target *target, uint32_t *address_in,
|
||||||
#if BUILD_RISCV_ARTY_BSCAN == 1
|
#if BUILD_RISCV_ARTY_BSCAN == 1
|
||||||
/* I wanted to place this code in a different function, but the way JTAG command
|
/* I wanted to place this code in a different function, but the way JTAG command
|
||||||
queueing works in the jtag handling functions, the scan fields either have to be
|
queueing works in the jtag handling functions, the scan fields either have to be
|
||||||
heap allocated, global/static, or else they need to stay on the stack until
|
heap allocated, global/static, or else they need to stay on the stack until
|
||||||
the jtag_execute_queue() call. Heap or static fields in this case doesn't seem
|
the jtag_execute_queue() call. Heap or static fields in this case doesn't seem
|
||||||
the best fit. Declaring stack based field values in a subsidiary function call wouldn't
|
the best fit. Declaring stack based field values in a subsidiary function call wouldn't
|
||||||
work. */
|
work. */
|
||||||
|
@ -521,7 +520,7 @@ static dmi_status_t dmi_scan(struct target *target, uint32_t *address_in,
|
||||||
.out_value = tunneled_dr_width,
|
.out_value = tunneled_dr_width,
|
||||||
.in_value = NULL,
|
.in_value = NULL,
|
||||||
},
|
},
|
||||||
/* for BSCAN tunnel, there is a one-TCK skew between shift in and shift out, so
|
/* for BSCAN tunnel, there is a one-TCK skew between shift in and shift out, so
|
||||||
scanning num_bits + 1, and then will right shift the input field after executing the queues */
|
scanning num_bits + 1, and then will right shift the input field after executing the queues */
|
||||||
{
|
{
|
||||||
.num_bits = num_bits+1,
|
.num_bits = num_bits+1,
|
||||||
|
@ -534,10 +533,10 @@ static dmi_status_t dmi_scan(struct target *target, uint32_t *address_in,
|
||||||
.in_value = NULL,
|
.in_value = NULL,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
jtag_add_dr_scan(target->tap, DIM(tunneled_dr), tunneled_dr, TAP_IDLE);
|
jtag_add_dr_scan(target->tap, DIM(tunneled_dr), tunneled_dr, TAP_IDLE);
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
/* Assume dbus is already selected. */
|
/* Assume dbus is already selected. */
|
||||||
jtag_add_dr_scan(target->tap, 1, &field, TAP_IDLE);
|
jtag_add_dr_scan(target->tap, 1, &field, TAP_IDLE);
|
||||||
|
|
||||||
|
@ -557,9 +556,9 @@ static dmi_status_t dmi_scan(struct target *target, uint32_t *address_in,
|
||||||
#if BUILD_RISCV_ARTY_BSCAN == 1
|
#if BUILD_RISCV_ARTY_BSCAN == 1
|
||||||
if (target->bscan_tunnel_ir_width != 0) {
|
if (target->bscan_tunnel_ir_width != 0) {
|
||||||
/* need to right-shift "in" by one bit, because of clock skew between BSCAN TAP and DM TAP */
|
/* need to right-shift "in" by one bit, because of clock skew between BSCAN TAP and DM TAP */
|
||||||
buffer_shr(in, num_bytes, 1);
|
buffer_shr(in, num_bytes, 1);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (data_in)
|
if (data_in)
|
||||||
*data_in = buf_get_u32(in, DTM_DMI_DATA_OFFSET, DTM_DMI_DATA_LENGTH);
|
*data_in = buf_get_u32(in, DTM_DMI_DATA_OFFSET, DTM_DMI_DATA_LENGTH);
|
||||||
|
|
|
@ -259,7 +259,7 @@ uint32_t dtmcontrol_scan_via_bscan(struct target *target, uint32_t out)
|
||||||
uint8_t in_value[5];
|
uint8_t in_value[5];
|
||||||
|
|
||||||
buf_set_u32(out_value, 0, 32, out);
|
buf_set_u32(out_value, 0, 32, out);
|
||||||
|
|
||||||
struct scan_field tunneled_ir[] = {
|
struct scan_field tunneled_ir[] = {
|
||||||
{
|
{
|
||||||
.num_bits = 1,
|
.num_bits = 1,
|
||||||
|
@ -281,7 +281,6 @@ uint32_t dtmcontrol_scan_via_bscan(struct target *target, uint32_t out)
|
||||||
.out_value = bscan_zero,
|
.out_value = bscan_zero,
|
||||||
.in_value = NULL,
|
.in_value = NULL,
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
struct scan_field tunneled_dr[] = {
|
struct scan_field tunneled_dr[] = {
|
||||||
{
|
{
|
||||||
|
@ -337,11 +336,10 @@ static uint32_t dtmcontrol_scan(struct target *target, uint32_t out)
|
||||||
uint8_t out_value[4];
|
uint8_t out_value[4];
|
||||||
|
|
||||||
#if BUILD_RISCV_ARTY_BSCAN == 1
|
#if BUILD_RISCV_ARTY_BSCAN == 1
|
||||||
if (target->bscan_tunnel_ir_width != 0) {
|
if (target->bscan_tunnel_ir_width != 0)
|
||||||
return dtmcontrol_scan_via_bscan(target, out);
|
return dtmcontrol_scan_via_bscan(target, out);
|
||||||
}
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
buf_set_u32(out_value, 0, 32, out);
|
buf_set_u32(out_value, 0, 32, out);
|
||||||
|
|
||||||
|
@ -408,8 +406,7 @@ static int riscv_init_target(struct command_context *cmd_ctx,
|
||||||
bscan_tunneled_ir_width[0] = target->bscan_tunnel_ir_width;
|
bscan_tunneled_ir_width[0] = target->bscan_tunnel_ir_width;
|
||||||
bscan_tunneled_select_dmi[2].num_bits = target->bscan_tunnel_ir_width;
|
bscan_tunneled_select_dmi[2].num_bits = target->bscan_tunnel_ir_width;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
riscv_semihosting_init(target);
|
riscv_semihosting_init(target);
|
||||||
|
|
||||||
|
|
|
@ -4603,7 +4603,7 @@ enum target_cfg_param {
|
||||||
TCFG_RTOS,
|
TCFG_RTOS,
|
||||||
TCFG_DEFER_EXAMINE,
|
TCFG_DEFER_EXAMINE,
|
||||||
TCFG_GDB_PORT,
|
TCFG_GDB_PORT,
|
||||||
TCFG_BSCAN_TUNNEL_IR_WIDTH,
|
TCFG_BSCAN_TUNNEL_IR_WIDTH,
|
||||||
};
|
};
|
||||||
|
|
||||||
static Jim_Nvp nvp_config_opts[] = {
|
static Jim_Nvp nvp_config_opts[] = {
|
||||||
|
@ -4621,8 +4621,8 @@ static Jim_Nvp nvp_config_opts[] = {
|
||||||
{ .name = "-defer-examine", .value = TCFG_DEFER_EXAMINE },
|
{ .name = "-defer-examine", .value = TCFG_DEFER_EXAMINE },
|
||||||
{ .name = "-gdb-port", .value = TCFG_GDB_PORT },
|
{ .name = "-gdb-port", .value = TCFG_GDB_PORT },
|
||||||
#if BUILD_RISCV_ARTY_BSCAN == 1
|
#if BUILD_RISCV_ARTY_BSCAN == 1
|
||||||
{ .name = "-bscan-tunnel-ir-width", .value = TCFG_BSCAN_TUNNEL_IR_WIDTH },
|
{ .name = "-bscan-tunnel-ir-width", .value = TCFG_BSCAN_TUNNEL_IR_WIDTH },
|
||||||
#endif
|
#endif
|
||||||
{ .name = NULL, .value = -1 }
|
{ .name = NULL, .value = -1 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -4924,7 +4924,7 @@ no_params:
|
||||||
Jim_SetResultString(goi->interp, target->gdb_port_override ? : "undefined", -1);
|
Jim_SetResultString(goi->interp, target->gdb_port_override ? : "undefined", -1);
|
||||||
/* loop for more */
|
/* loop for more */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TCFG_BSCAN_TUNNEL_IR_WIDTH:
|
case TCFG_BSCAN_TUNNEL_IR_WIDTH:
|
||||||
if (goi->isconfigure) {
|
if (goi->isconfigure) {
|
||||||
e = Jim_GetOpt_Wide(goi, &w);
|
e = Jim_GetOpt_Wide(goi, &w);
|
||||||
|
|
|
@ -210,9 +210,9 @@ struct target {
|
||||||
|
|
||||||
/* The semihosting information, extracted from the target. */
|
/* The semihosting information, extracted from the target. */
|
||||||
struct semihosting *semihosting;
|
struct semihosting *semihosting;
|
||||||
#if BUILD_RISCV_ARTY_BSCAN == 1
|
#if BUILD_RISCV_ARTY_BSCAN == 1
|
||||||
int bscan_tunnel_ir_width; /* if zero, then tunneling is not present/active */
|
int bscan_tunnel_ir_width; /* if zero, then tunneling is not present/active */
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
struct target_list {
|
struct target_list {
|
||||||
|
|
Loading…
Reference in New Issue