![]() |
TT-System-Firmware APIs 19.10.99
Tenstorrent Firmware
|
#include <stdlib.h>#include <zephyr/drivers/jtag.h>#include <zephyr/shell/shell.h>#include <zephyr/sys/util.h>
Macros | |
| #define | ARBITRARY_LIMIT 16 |
| #define | JTAG_CTRL_LIST_ENTRY(node_id) |
| #define | IS_JTAG_CTRL_LIST(node_id) |
Functions | |
| static void | device_name_get (size_t idx, struct shell_static_entry *entry) |
| SHELL_DYNAMIC_CMD_CREATE (sub_jtag_dev, device_name_get) | |
| static const struct device * | get_jtag_dev (char *name) |
| static int | cmd_jtag_tick (const struct shell *sh, size_t argc, char **argv, void *data) |
| static int | cmd_jtag_read_id (const struct shell *sh, size_t argc, char **argv, void *data) |
| static int | cmd_jtag_reset (const struct shell *sh, size_t argc, char **argv, void *data) |
| static int | cmd_jtag_ir (const struct shell *sh, size_t argc, char **argv, void *data) |
| static int | cmd_jtag_dr (const struct shell *sh, size_t argc, char **argv, void *data) |
| SHELL_STATIC_SUBCMD_SET_CREATE (sub_jtag, SHELL_CMD_ARG(tick, &sub_jtag_dev, "Clock JTAG TCK pin\n" "Usage: jtag tick <device> [count]\n" "[count] - number of cycles (default 1)\n", cmd_jtag_tick, 2, 1), SHELL_CMD_ARG(read_id, &sub_jtag_dev, "Read JTAG target id\n" "Usage: jtag read_id <device>", cmd_jtag_read_id, 2, 0), SHELL_CMD_ARG(reset, &sub_jtag_dev, "Reset JTAG target\n" "Usage: jtag reset <device>", cmd_jtag_reset, 2, 0), SHELL_CMD_ARG(ir, &sub_jtag_dev, "Update JTAG IR\n" "Usage: jtag ir <device> [<word0> <word1> ..]\n" "<word0> - 32-bit word (decimal or hex)", cmd_jtag_ir, 2, 16), SHELL_CMD_ARG(dr, &sub_jtag_dev, "Update JTAG DR\n" "Usage: jtag dr [device] <idle> [<word0> <word1> ..]\n" "<idle> - a non-zero integer to set the device back to idle\n" "<word0> - 32-bit word (decimal or hex)", cmd_jtag_dr, 3, 16), SHELL_SUBCMD_SET_END) | |
| SHELL_CMD_REGISTER (jtag, &sub_jtag, "JTAG commands", NULL) | |
Variables | |
| static const struct device * | jtag_list [] = {DT_FOREACH_STATUS_OKAY_NODE(IS_JTAG_CTRL_LIST)} |
| #define ARBITRARY_LIMIT 16 |
| #define IS_JTAG_CTRL_LIST | ( | node_id | ) |
| #define JTAG_CTRL_LIST_ENTRY | ( | node_id | ) |
|
static |
|
static |
| SHELL_CMD_REGISTER | ( | jtag | , |
| & | sub_jtag, | ||
| "JTAG commands" | , | ||
| NULL | ) |
| SHELL_DYNAMIC_CMD_CREATE | ( | sub_jtag_dev | , |
| device_name_get | ) |
| SHELL_STATIC_SUBCMD_SET_CREATE | ( | sub_jtag | , |
| SHELL_CMD_ARG(tick, &sub_jtag_dev, "Clock JTAG TCK pin\n" "Usage: jtag tick <device> [count]\n" "[count] - number of cycles (default 1)\n", cmd_jtag_tick, 2, 1) | , | ||
| SHELL_CMD_ARG(read_id, &sub_jtag_dev, "Read JTAG target id\n" "Usage: jtag read_id <device>", cmd_jtag_read_id, 2, 0) | , | ||
| SHELL_CMD_ARG(reset, &sub_jtag_dev, "Reset JTAG target\n" "Usage: jtag reset <device>", cmd_jtag_reset, 2, 0) | , | ||
| SHELL_CMD_ARG(ir, &sub_jtag_dev, "Update JTAG IR\n" "Usage: jtag ir <device> [<word0> <word1> ..]\n" "<word0> - 32-bit word (decimal or hex)", cmd_jtag_ir, 2, 16) | , | ||
| SHELL_CMD_ARG(dr, &sub_jtag_dev, "Update JTAG DR\n" "Usage: jtag dr [device] <idle> [<word0> <word1> ..]\n" "<idle> - a non-zero integer to set the device back to idle\n" "<word0> - 32-bit word (decimal or hex)", cmd_jtag_dr, 3, 16) | , | ||
| SHELL_SUBCMD_SET_END | ) |
|
static |