drivers/xlnx-pcie-xvc: Group adapter commands
authorMarc Schink <dev@zapb.de>
Fri, 30 Jul 2021 16:19:02 +0000 (18:19 +0200)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sat, 14 Aug 2021 12:33:55 +0000 (13:33 +0100)
Use a command group 'xlnx_pcie_xvc' with subcommands instead of individual
commands with 'xlnx_pcie_xvc_' prefix.

The old commands are still available for backward compatibility but
marked as deprecated.

Change-Id: I0deaaa14ed14f65bf356f3c248331bfab472f08d
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: http://openocd.zylin.com/6391
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
doc/openocd.texi
src/jtag/drivers/xlnx-pcie-xvc.c
src/jtag/startup.tcl

index a9fe2906ce22c8e558a194697af0eae3be44664a..eb45acc396e1df17198821d4b97e482d7baad20e 100644 (file)
@@ -3172,7 +3172,7 @@ exposed via extended capability registers in the PCI Express configuration space
 
 For more information see Xilinx PG245 (Section on From_PCIE_to_JTAG mode).
 
-@deffn {Config Command} {xlnx_pcie_xvc_config} device
+@deffn {Config Command} {xlnx_pcie_xvc config} device
 Specifies the PCI Express device via parameter @var{device} to use.
 
 The correct value for @var{device} can be obtained by looking at the output
index 27295f59670edbb82dda5d67d52ebfe09993e25c..c05b9cf4abf5e0e633be763d4142506377491bb7 100644 (file)
@@ -460,9 +460,9 @@ COMMAND_HANDLER(xlnx_pcie_xvc_handle_config_command)
        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",
@@ -471,6 +471,17 @@ static const struct command_registration xlnx_pcie_xvc_command_handlers[] = {
        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,
 };
index 94dbca2636789a41c72573e75fd2def43b9560a9..d4226c6862bcf68ddde9e8e4546edd47880ed09e 100644 (file)
@@ -315,4 +315,11 @@ proc presto_serial args {
        eval presto serial $args
 }
 
+lappend _telnet_autocomplete_skip xlnx_pcie_xvc_config
+proc xlnx_pcie_xvc_config args {
+       echo "DEPRECATED! use 'xlnx_pcie_xvc config' not 'xlnx_pcie_xvc_config'"
+       eval xlnx_pcie_xvc config $args
+}
+
+
 # END MIGRATION AIDS