jtag: remove file driver.h 45/6645/2
authorAntonio Borneo <borneo.antonio@gmail.com>
Thu, 7 Oct 2021 13:07:57 +0000 (15:07 +0200)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sat, 13 Nov 2021 10:50:58 +0000 (10:50 +0000)
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 <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6645
Tested-by: jenkins
Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
src/jtag/Makefile.am
src/jtag/adapter.c
src/jtag/adapter.h
src/jtag/driver.h [deleted file]
src/openocd.c

index cbdfb205478d75cc5941bfabbb44bfbc8f32b924..23424f5a2ecd200c00915d05f2f5d1dbbfc4d782 100644 (file)
@@ -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 \
index 0320d295d2af658ba6afd0f9d6f4a863d3e1e66b..a5a6222a9190d0017191ec6eb5b1f5e19c5b124e 100644 (file)
@@ -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);
 }
index a66fef1a7b0cce2a845eba6bb781e6f142b38e00..8b73c0c9ef188755b0dbe2a62819184dcafc03b7 100644 (file)
@@ -1,5 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0-or-later */
 /*
+ * Copyright (C) 2005 by Dominic Rath <Dominic.Rath@gmx.de>
  * Copyright (c) 2018 Pengutronix, Oleksij Rempel <kernel@pengutronix.de>
  */
 
@@ -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 (file)
index ae00414..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/***************************************************************************
- *   Copyright (C) 2005 by Dominic Rath                                    *
- *   Dominic.Rath@gmx.de                                                   *
- *                                                                         *
- *   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 */
index e8c526bfd1f764c732b551b3ff411c1e0dd60eeb..0292ba445b28f89559e565fe276673c3b9273f74 100644 (file)
@@ -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,

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)