openocd: trivial replace of jim-nvp with new nvp
For some trivial case only, replace calls to jim-nvp with calls to the new OpenOCD nvp. Change-Id: Ifd9aff32b67748af8ab808e6a6b6e64f5271b888 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7553 Tested-by: jenkins
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#include "arm_semihosting.h"
|
||||
#include "jtag/interface.h"
|
||||
#include "smp.h"
|
||||
#include <helper/nvp.h>
|
||||
#include <helper/time_support.h>
|
||||
|
||||
enum restart_mode {
|
||||
@@ -2957,15 +2958,15 @@ COMMAND_HANDLER(aarch64_mask_interrupts_command)
|
||||
struct target *target = get_current_target(CMD_CTX);
|
||||
struct aarch64_common *aarch64 = target_to_aarch64(target);
|
||||
|
||||
static const struct jim_nvp nvp_maskisr_modes[] = {
|
||||
static const struct nvp nvp_maskisr_modes[] = {
|
||||
{ .name = "off", .value = AARCH64_ISRMASK_OFF },
|
||||
{ .name = "on", .value = AARCH64_ISRMASK_ON },
|
||||
{ .name = NULL, .value = -1 },
|
||||
};
|
||||
const struct jim_nvp *n;
|
||||
const struct nvp *n;
|
||||
|
||||
if (CMD_ARGC > 0) {
|
||||
n = jim_nvp_name2value_simple(nvp_maskisr_modes, CMD_ARGV[0]);
|
||||
n = nvp_name2value(nvp_maskisr_modes, CMD_ARGV[0]);
|
||||
if (!n->name) {
|
||||
LOG_ERROR("Unknown parameter: %s - should be off or on", CMD_ARGV[0]);
|
||||
return ERROR_COMMAND_SYNTAX_ERROR;
|
||||
@@ -2974,7 +2975,7 @@ COMMAND_HANDLER(aarch64_mask_interrupts_command)
|
||||
aarch64->isrmasking_mode = n->value;
|
||||
}
|
||||
|
||||
n = jim_nvp_value2name_simple(nvp_maskisr_modes, aarch64->isrmasking_mode);
|
||||
n = nvp_value2name(nvp_maskisr_modes, aarch64->isrmasking_mode);
|
||||
command_print(CMD, "aarch64 interrupt mask %s", n->name);
|
||||
|
||||
return ERROR_OK;
|
||||
|
||||
Reference in New Issue
Block a user