Browse Source

drivers/ulink: Group adapter commands

Use a command group 'ulink' with subcommands instead of individual
commands with 'ulink_' prefix.

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

Change-Id: I600d65de2bbd5fb8107445f7fe93b6b24c572e3e
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: http://openocd.zylin.com/6392
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
jim
Marc Schink 2 years ago
committed by Antonio Borneo
parent
commit
6c56182184
2 changed files with 18 additions and 2 deletions
  1. +13
    -2
      src/jtag/drivers/ulink.c
  2. +5
    -0
      src/jtag/startup.tcl

+ 13
- 2
src/jtag/drivers/ulink.c View File

@@ -2258,9 +2258,9 @@ COMMAND_HANDLER(ulink_download_firmware_handler)

/*************************** Command Registration **************************/

static const struct command_registration ulink_command_handlers[] = {
static const struct command_registration ulink_subcommand_handlers[] = {
{
.name = "ulink_download_firmware",
.name = "download_firmware",
.handler = &ulink_download_firmware_handler,
.mode = COMMAND_EXEC,
.help = "download firmware image to ULINK device",
@@ -2269,6 +2269,17 @@ static const struct command_registration ulink_command_handlers[] = {
COMMAND_REGISTRATION_DONE,
};

static const struct command_registration ulink_command_handlers[] = {
{
.name = "ulink",
.mode = COMMAND_ANY,
.help = "perform ulink management",
.chain = ulink_subcommand_handlers,
.usage = "",
},
COMMAND_REGISTRATION_DONE
};

static struct jtag_interface ulink_interface = {
.execute_queue = ulink_execute_queue,
};


+ 5
- 0
src/jtag/startup.tcl View File

@@ -321,5 +321,10 @@ proc xlnx_pcie_xvc_config args {
eval xlnx_pcie_xvc config $args
}

lappend _telnet_autocomplete_skip ulink_download_firmware
proc ulink_download_firmware args {
echo "DEPRECATED! use 'ulink download_firmware' not 'ulink_download_firmware'"
eval ulink download_firmware $args
}

# END MIGRATION AIDS

Loading…
Cancel
Save