From: OpenOCD-Gerrit <ope...@us...> - 2021-11-13 10:51:26
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via ac1a632ba13efa77393cecf29bd29410db60cada (commit) from 3c50288612cde9ce5d8f3004f5ad287abd80753e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit ac1a632ba13efa77393cecf29bd29410db60cada Author: Antonio Borneo <bor...@gm...> Date: Thu Oct 7 15:07:57 2021 +0200 jtag: remove file driver.h The only purpose of include file driver.h was to expose the API to register the adapter's commands. Move the prototype in adapter.h, already used by openocd.c. Change-Id: Ie1090c60ef9e5bac5ea187c87bed6e7b08d9671c Signed-off-by: Antonio Borneo <bor...@gm...> Reviewed-on: https://review.openocd.org/c/openocd/+/6645 Tested-by: jenkins Reviewed-by: Tarek BOCHKATI <tar...@gm...> diff --git a/src/jtag/Makefile.am b/src/jtag/Makefile.am index cbdfb2054..23424f5a2 100644 --- a/src/jtag/Makefile.am +++ b/src/jtag/Makefile.am @@ -25,7 +25,6 @@ include %D%/drivers/Makefile.am %D%/tcl.c \ %D%/swim.c \ %D%/commands.h \ - %D%/driver.h \ %D%/interface.h \ %D%/interfaces.h \ %D%/minidriver.h \ diff --git a/src/jtag/adapter.c b/src/jtag/adapter.c index 0320d295d..a5a6222a9 100644 --- a/src/jtag/adapter.c +++ b/src/jtag/adapter.c @@ -886,7 +886,7 @@ static const struct command_registration interface_command_handlers[] = { * @todo Remove internal assumptions that all debug adapters use JTAG for * transport. Various types and data structures are not named generically. */ -int interface_register_commands(struct command_context *ctx) +int adapter_register_commands(struct command_context *ctx) { return register_commands(ctx, NULL, interface_command_handlers); } diff --git a/src/jtag/adapter.h b/src/jtag/adapter.h index a66fef1a7..8b73c0c9e 100644 --- a/src/jtag/adapter.h +++ b/src/jtag/adapter.h @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */ /* + * Copyright (C) 2005 by Dominic Rath <Dom...@gm...> * Copyright (c) 2018 Pengutronix, Oleksij Rempel <ke...@pe...> */ @@ -12,6 +13,9 @@ struct command_context; +/** Register the adapter's commands */ +int adapter_register_commands(struct command_context *ctx); + /** Initialize debug adapter upon startup. */ int adapter_init(struct command_context *cmd_ctx); diff --git a/src/jtag/driver.h b/src/jtag/driver.h deleted file mode 100644 index ae00414c4..000000000 --- a/src/jtag/driver.h +++ /dev/null @@ -1,26 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2005 by Dominic Rath * - * Dom...@gm... * - * * - * 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 <http://www.gnu.org/licenses/>. * - ***************************************************************************/ - -#ifndef OPENOCD_JTAG_DRIVER_H -#define OPENOCD_JTAG_DRIVER_H - -struct command_context; - -int interface_register_commands(struct command_context *ctx); - -#endif /* OPENOCD_JTAG_DRIVER_H */ diff --git a/src/openocd.c b/src/openocd.c index e8c526bfd..0292ba445 100644 --- a/src/openocd.c +++ b/src/openocd.c @@ -28,7 +28,6 @@ #include "openocd.h" #include <jtag/adapter.h> -#include <jtag/driver.h> #include <jtag/jtag.h> #include <transport/transport.h> #include <helper/util.h> @@ -313,7 +312,7 @@ static struct command_context *setup_command_handler(Jim_Interp *interp) &log_register_commands, &rtt_server_register_commands, &transport_register_commands, - &interface_register_commands, + &adapter_register_commands, &target_register_commands, &flash_register_commands, &nand_register_commands, ----------------------------------------------------------------------- Summary of changes: src/jtag/Makefile.am | 1 - src/jtag/adapter.c | 2 +- src/jtag/adapter.h | 4 ++++ src/jtag/driver.h | 26 -------------------------- src/openocd.c | 3 +-- 5 files changed, 6 insertions(+), 30 deletions(-) delete mode 100644 src/jtag/driver.h hooks/post-receive -- Main OpenOCD repository |