aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAntonio Borneo <borneo.antonio@gmail.com>2020-01-17 16:44:00 +0100
committerAntonio Borneo <borneo.antonio@gmail.com>2020-01-22 12:49:59 +0000
commit60aaf14837d39393edff0df76e426232e72988f5 (patch)
tree9d4932915c8682377800e1697ba6f29e005813b1 /src
parent8b7265700136d6035d2769531a6202295f7113a6 (diff)
downloadriscv-openocd-60aaf14837d39393edff0df76e426232e72988f5.zip
riscv-openocd-60aaf14837d39393edff0df76e426232e72988f5.tar.gz
riscv-openocd-60aaf14837d39393edff0df76e426232e72988f5.tar.bz2
jtag: drivers: xlnx-pcie-xvc: fix build after merge
Commit [1] was submitted in gerrit well before the conflicting commit [2] get merged in master branch. While it was fine committing in master branch [1] alone, it should not be committed "as is" after [2]. Unfortunately gerrit did not complained committing [1] after [2]. The result is that master branch does not build anymore when the driver xlnx-pcie-xvc is enabled at configure time by the optional flag --enable-xlnx-pcie-xvc. Apply to the driver the required changes as in [2]. While there, remove the duplicated struct xlnx_pcie_xvc_transports and the struct field already implicitly initialized to zero. [1] ff6d0704ecd6 ("jtag: drivers: xlnx-pcie-xvc: Add support for Xilinx XVC/PCIe") [2] efd1d642220a ("adapter: switch from struct jtag_interface to adapter_driver") Change-Id: I5498479b802a231afbee1b845ae9775e1da7c728 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5402 Reviewed-by: Moritz Fischer <moritzf@google.com> Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/jtag/drivers/xlnx-pcie-xvc.c15
-rw-r--r--src/jtag/interfaces.c4
2 files changed, 10 insertions, 9 deletions
diff --git a/src/jtag/drivers/xlnx-pcie-xvc.c b/src/jtag/drivers/xlnx-pcie-xvc.c
index fabf0f3..48b03ec 100644
--- a/src/jtag/drivers/xlnx-pcie-xvc.c
+++ b/src/jtag/drivers/xlnx-pcie-xvc.c
@@ -466,16 +466,17 @@ static const struct command_registration xlnx_pcie_xvc_command_handlers[] = {
COMMAND_REGISTRATION_DONE
};
-static const char * const xlnx_pcie_xvc_transports[] = { "jtag", NULL };
+static struct jtag_interface xlnx_pcie_xvc_interface = {
+ .execute_queue = &xlnx_pcie_xvc_execute_queue,
+};
-struct jtag_interface xlnx_pcie_xvc_interface = {
+struct adapter_driver xlnx_pcie_xvc_adapter_driver = {
.name = "xlnx_pcie_xvc",
+ .transports = jtag_only,
.commands = xlnx_pcie_xvc_command_handlers,
- .transports = xlnx_pcie_xvc_transports,
- .execute_queue = &xlnx_pcie_xvc_execute_queue,
- .speed = NULL,
- .speed_div = NULL,
- .khz = NULL,
+
.init = &xlnx_pcie_xvc_init,
.quit = &xlnx_pcie_xvc_quit,
+
+ .jtag_ops = &xlnx_pcie_xvc_interface,
};
diff --git a/src/jtag/interfaces.c b/src/jtag/interfaces.c
index 356d89e..00b3bb5 100644
--- a/src/jtag/interfaces.c
+++ b/src/jtag/interfaces.c
@@ -118,7 +118,7 @@ extern struct adapter_driver opendous_adapter_driver;
extern struct adapter_driver sysfsgpio_adapter_driver;
#endif
#if BUILD_XLNX_PCIE_XVC == 1
-extern struct jtag_interface xlnx_pcie_xvc_interface;
+extern struct adapter_driver xlnx_pcie_xvc_adapter_driver;
#endif
#if BUILD_AICE == 1
extern struct adapter_driver aice_adapter_driver;
@@ -229,7 +229,7 @@ struct adapter_driver *adapter_drivers[] = {
&sysfsgpio_adapter_driver,
#endif
#if BUILD_XLNX_PCIE_XVC == 1
- &xlnx_pcie_xvc_interface,
+ &xlnx_pcie_xvc_adapter_driver,
#endif
#if BUILD_AICE == 1
&aice_adapter_driver,