X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fjtag%2Faice%2Faice_interface.c;h=7c57d444dee58fbb496814be8df8921a17c83383;hb=772d8b42b65e4a1eb381d441219bc5c589ae6373;hp=c7556c018f378c246e5197df2841bced182693cd;hpb=c0c7d6fe8b04f521a7262303083ef5eb6ebaf4e5;p=fw%2Fopenocd diff --git a/src/jtag/aice/aice_interface.c b/src/jtag/aice/aice_interface.c index c7556c018..7c57d444d 100644 --- a/src/jtag/aice/aice_interface.c +++ b/src/jtag/aice/aice_interface.c @@ -1,25 +1,15 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + /*************************************************************************** * Copyright (C) 2013 by Andes Technology * * Hsiangkai Wang * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program. If not, see . * ***************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif +#include #include #include #include @@ -269,7 +259,7 @@ COMMAND_HANDLER(aice_handle_aice_info_command) LOG_DEBUG("aice_handle_aice_info_command"); command_print(CMD, "Description: %s", param.device_desc); - command_print(CMD, "Serial number: %s", param.serial); + command_print(CMD, "Serial number: %s", adapter_get_required_serial()); if (strncmp(aice_port->name, "aice_pipe", 9) == 0) command_print(CMD, "Adapter: %s", param.adapter_name); @@ -308,18 +298,6 @@ COMMAND_HANDLER(aice_handle_aice_desc_command) return ERROR_OK; } -COMMAND_HANDLER(aice_handle_aice_serial_command) -{ - LOG_DEBUG("aice_handle_aice_serial_command"); - - if (CMD_ARGC == 1) - param.serial = strdup(CMD_ARGV[0]); - else - LOG_ERROR("expected exactly one argument to aice serial "); - - return ERROR_OK; -} - COMMAND_HANDLER(aice_handle_aice_vid_pid_command) { LOG_DEBUG("aice_handle_aice_vid_pid_command"); @@ -438,13 +416,6 @@ static const struct command_registration aice_subcommand_handlers[] = { .help = "set the aice device description", .usage = "[description string]", }, - { - .name = "serial", - .handler = &aice_handle_aice_serial_command, - .mode = COMMAND_CONFIG, - .help = "set the serial number of the AICE device", - .usage = "[serial string]", - }, { .name = "vid_pid", .handler = &aice_handle_aice_vid_pid_command,