OpenOCD
aice_interface.c File Reference
Include dependency graph for aice_interface.c:

Go to the source code of this file.

Macros

#define AICE_KHZ_TO_SPEED_MAP_SIZE   16
 

Functions

static int aice_execute_command (struct jtag_command *cmd)
 
static int aice_execute_queue (void)
 
static int aice_execute_reset (struct jtag_command *cmd)
 
static int aice_init (void)
 
int aice_init_targets (void)
 
static int aice_khz (int khz, int *jtag_speed)
 
static int aice_quit (void)
 
int aice_scan_jtag_chain (void)
 
static int aice_speed (int speed)
 
static int aice_speed_div (int speed, int *khz)
 
 COMMAND_HANDLER (aice_handle_aice_adapter_command)
 
 COMMAND_HANDLER (aice_handle_aice_count_to_check_dbger_command)
 
 COMMAND_HANDLER (aice_handle_aice_custom_restart_script_command)
 
 COMMAND_HANDLER (aice_handle_aice_custom_srst_script_command)
 
 COMMAND_HANDLER (aice_handle_aice_custom_trst_script_command)
 
 COMMAND_HANDLER (aice_handle_aice_desc_command)
 
 COMMAND_HANDLER (aice_handle_aice_info_command)
 
 COMMAND_HANDLER (aice_handle_aice_port_command)
 
 COMMAND_HANDLER (aice_handle_aice_reset_command)
 
 COMMAND_HANDLER (aice_handle_aice_retry_times_command)
 
 COMMAND_HANDLER (aice_handle_aice_vid_pid_command)
 

Variables

struct adapter_driver aice_adapter_driver
 
static const struct command_registration aice_command_handlers []
 
static struct jtag_interface aice_interface
 
static const int aice_khz_to_speed_map [AICE_KHZ_TO_SPEED_MAP_SIZE]
 
static uint8_t aice_num_of_target_id_codes
 
static const struct aice_portaice_port
 
static const struct command_registration aice_subcommand_handlers []
 
static uint32_t aice_target_id_codes [AICE_MAX_NUM_CORE]
 
static uint32_t count_to_check_dbger
 
static struct aice_port_param_s param
 
static uint32_t retry_times
 

Macro Definition Documentation

◆ AICE_KHZ_TO_SPEED_MAP_SIZE

#define AICE_KHZ_TO_SPEED_MAP_SIZE   16

Definition at line 20 of file aice_interface.c.

Function Documentation

◆ aice_execute_command()

static int aice_execute_command ( struct jtag_command cmd)
static

Definition at line 154 of file aice_interface.c.

References aice_execute_reset(), cmd, ERROR_OK, and JTAG_RESET.

Referenced by aice_execute_queue().

◆ aice_execute_queue()

static int aice_execute_queue ( void  )
static

◆ aice_execute_reset()

static int aice_execute_reset ( struct jtag_command cmd)
static

Definition at line 137 of file aice_interface.c.

References aice_port::api, cmd, ERROR_OK, LOG_DEBUG_IO, and aice_port_api_s::reset.

Referenced by aice_execute_command().

◆ aice_init()

◆ aice_init_targets()

◆ aice_khz()

static int aice_khz ( int  khz,
int *  jtag_speed 
)
static

◆ aice_quit()

static int aice_quit ( void  )
static

Definition at line 131 of file aice_interface.c.

References aice_port::api, aice_port_api_s::close, and ERROR_OK.

◆ aice_scan_jtag_chain()

◆ aice_speed()

static int aice_speed ( int  speed)
static

Definition at line 189 of file aice_interface.c.

References aice_port::api, and aice_port_api_s::set_jtag_clock.

◆ aice_speed_div()

static int aice_speed_div ( int  speed,
int *  khz 
)
static

Definition at line 196 of file aice_interface.c.

References aice_khz_to_speed_map, and ERROR_OK.

◆ COMMAND_HANDLER() [1/11]

COMMAND_HANDLER ( aice_handle_aice_adapter_command  )

◆ COMMAND_HANDLER() [2/11]

COMMAND_HANDLER ( aice_handle_aice_count_to_check_dbger_command  )

◆ COMMAND_HANDLER() [3/11]

COMMAND_HANDLER ( aice_handle_aice_custom_restart_script_command  )

◆ COMMAND_HANDLER() [4/11]

COMMAND_HANDLER ( aice_handle_aice_custom_srst_script_command  )

◆ COMMAND_HANDLER() [5/11]

COMMAND_HANDLER ( aice_handle_aice_custom_trst_script_command  )

◆ COMMAND_HANDLER() [6/11]

COMMAND_HANDLER ( aice_handle_aice_desc_command  )

◆ COMMAND_HANDLER() [7/11]

COMMAND_HANDLER ( aice_handle_aice_info_command  )

◆ COMMAND_HANDLER() [8/11]

COMMAND_HANDLER ( aice_handle_aice_port_command  )

◆ COMMAND_HANDLER() [9/11]

COMMAND_HANDLER ( aice_handle_aice_reset_command  )

Definition at line 389 of file aice_interface.c.

◆ COMMAND_HANDLER() [10/11]

COMMAND_HANDLER ( aice_handle_aice_retry_times_command  )

◆ COMMAND_HANDLER() [11/11]

COMMAND_HANDLER ( aice_handle_aice_vid_pid_command  )

Variable Documentation

◆ aice_adapter_driver

struct adapter_driver aice_adapter_driver
Initial value:
= {
.name = "aice",
.transports = aice_transports,
.commands = aice_command_handlers,
.init = aice_init,
.quit = aice_quit,
.speed = aice_speed,
.khz = aice_khz,
.speed_div = aice_speed_div,
.jtag_ops = &aice_interface,
}
static int aice_khz(int khz, int *jtag_speed)
static const struct command_registration aice_command_handlers[]
static int aice_speed(int speed)
static int aice_speed_div(int speed, int *khz)
static int aice_quit(void)
static int aice_init(void)
static struct jtag_interface aice_interface
const char * aice_transports[]

Definition at line 389 of file aice_interface.c.

◆ aice_command_handlers

const struct command_registration aice_command_handlers[]
static
Initial value:
= {
{
.name = "aice",
.mode = COMMAND_ANY,
.help = "perform aice management",
.usage = "[subcommand]",
},
}
static const struct command_registration aice_subcommand_handlers[]
#define COMMAND_REGISTRATION_DONE
Use this as the last entry in an array of command_registration records.
Definition: command.h:247
@ COMMAND_ANY
Definition: command.h:42

Definition at line 389 of file aice_interface.c.

◆ aice_interface

struct jtag_interface aice_interface
static
Initial value:
= {
.execute_queue = aice_execute_queue,
}
static int aice_execute_queue(void)

Definition at line 389 of file aice_interface.c.

◆ aice_khz_to_speed_map

const int aice_khz_to_speed_map[AICE_KHZ_TO_SPEED_MAP_SIZE]
static
Initial value:
= {
30000,
15000,
7500,
3750,
1875,
937,
468,
234,
48000,
24000,
12000,
6000,
3000,
1500,
750,
375,
}

Definition at line 21 of file aice_interface.c.

Referenced by aice_khz(), and aice_speed_div().

◆ aice_num_of_target_id_codes

uint8_t aice_num_of_target_id_codes
static

Definition at line 48 of file aice_interface.c.

Referenced by aice_init_targets().

◆ aice_port

const struct aice_port* aice_port
static

Definition at line 40 of file aice_interface.c.

Referenced by aice_init_targets().

◆ aice_subcommand_handlers

const struct command_registration aice_subcommand_handlers[]
static

Definition at line 389 of file aice_interface.c.

◆ aice_target_id_codes

uint32_t aice_target_id_codes[AICE_MAX_NUM_CORE]
static

Definition at line 47 of file aice_interface.c.

Referenced by aice_init_targets(), and aice_scan_jtag_chain().

◆ count_to_check_dbger

uint32_t count_to_check_dbger
static

Definition at line 43 of file aice_interface.c.

Referenced by aice_init(), and COMMAND_HANDLER().

◆ param

◆ retry_times