From a64928c4e7dd36c57e4a137f93a49522c28f547a Mon Sep 17 00:00:00 2001 From: Daniel Anselmi Date: Mon, 24 Jul 2023 01:43:58 +0200 Subject: [PATCH] pld/virtex2: allow calling set_instr_codes and set_user_codes before 'init' Change-Id: Ib21366b2fdbf33ee06a958e52b725989114751f4 Signed-off-by: Daniel Anselmi Reviewed-on: https://review.openocd.org/c/openocd/+/7821 Tested-by: jenkins Reviewed-by: Antonio Borneo --- src/pld/virtex2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pld/virtex2.c b/src/pld/virtex2.c index a97c7c6d6..5a8cf9d96 100644 --- a/src/pld/virtex2.c +++ b/src/pld/virtex2.c @@ -422,14 +422,14 @@ static const struct command_registration virtex2_exec_command_handlers[] = { .usage = "pld_name", }, { .name = "set_instr_codes", - .mode = COMMAND_EXEC, + .mode = COMMAND_ANY, .handler = virtex2_handle_set_instuction_codes_command, .help = "set instructions codes used for loading the bitstream/refreshing/jtag-hub", .usage = "pld_name cfg_out cfg_in jprogb jstart jshutdown" " [user1 [user2 [user3 [user4]]]]", }, { .name = "set_user_codes", - .mode = COMMAND_EXEC, + .mode = COMMAND_ANY, .handler = virtex2_handle_set_user_codes_command, .help = "set instructions codes used for jtag-hub", .usage = "pld_name user1 [user2 [user3 [user4]]]",