return ERROR_OK;
}
-static const struct command_registration xlnx_pcie_xvc_command_handlers[] = {
+static const struct command_registration xlnx_pcie_xvc_subcommand_handlers[] = {
{
- .name = "xlnx_pcie_xvc_config",
+ .name = "config",
.handler = xlnx_pcie_xvc_handle_config_command,
.mode = COMMAND_CONFIG,
.help = "Configure XVC/PCIe JTAG adapter",
COMMAND_REGISTRATION_DONE
};
+static const struct command_registration xlnx_pcie_xvc_command_handlers[] = {
+ {
+ .name = "xlnx_pcie_xvc",
+ .mode = COMMAND_ANY,
+ .help = "perform xlnx_pcie_xvc management",
+ .chain = xlnx_pcie_xvc_subcommand_handlers,
+ .usage = "",
+ },
+ COMMAND_REGISTRATION_DONE
+};
+
static struct jtag_interface xlnx_pcie_xvc_jtag_ops = {
.execute_queue = &xlnx_pcie_xvc_execute_queue,
};
uint32_t res, ack, rpar;
int err;
- assert(cmd & SWD_CMD_RnW);
+ assert(cmd & SWD_CMD_RNW);
cmd |= SWD_CMD_START | SWD_CMD_PARK;
/* cmd + ack */
LOG_DEBUG("%s %s %s reg %X = %08"PRIx32,
ack == SWD_ACK_OK ? "OK" : ack == SWD_ACK_WAIT ?
"WAIT" : ack == SWD_ACK_FAULT ? "FAULT" : "JUNK",
- cmd & SWD_CMD_APnDP ? "AP" : "DP",
- cmd & SWD_CMD_RnW ? "read" : "write",
+ cmd & SWD_CMD_APNDP ? "AP" : "DP",
+ cmd & SWD_CMD_RNW ? "read" : "write",
(cmd & SWD_CMD_A32) >> 1,
res);
switch (ack) {
}
if (value)
*value = res;
- if (cmd & SWD_CMD_APnDP)
+ if (cmd & SWD_CMD_APNDP)
err = xlnx_pcie_xvc_transact(ap_delay_clk, 0, 0, NULL);
queued_retval = err;
return;
uint32_t res, ack;
int err;
- assert(!(cmd & SWD_CMD_RnW));
+ assert(!(cmd & SWD_CMD_RNW));
cmd |= SWD_CMD_START | SWD_CMD_PARK;
/* cmd + trn + ack */
LOG_DEBUG("%s %s %s reg %X = %08"PRIx32,
ack == SWD_ACK_OK ? "OK" : ack == SWD_ACK_WAIT ?
"WAIT" : ack == SWD_ACK_FAULT ? "FAULT" : "JUNK",
- cmd & SWD_CMD_APnDP ? "AP" : "DP",
- cmd & SWD_CMD_RnW ? "read" : "write",
+ cmd & SWD_CMD_APNDP ? "AP" : "DP",
+ cmd & SWD_CMD_RNW ? "read" : "write",
(cmd & SWD_CMD_A32) >> 1,
value);
switch (ack) {
case SWD_ACK_OK:
- if (cmd & SWD_CMD_APnDP)
+ if (cmd & SWD_CMD_APNDP)
err = xlnx_pcie_xvc_transact(ap_delay_clk, 0, 0, NULL);
queued_retval = err;
return;