Skip to content

Trident code removal #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 0 additions & 55 deletions cli/diag.c
Original file line number Diff line number Diff line change
Expand Up @@ -1968,60 +1968,6 @@ static int rcvr_extended(int argc, char **argv)
return 0;
}

#define CMD_DESC_REF_CLK "Enable or disable the output reference clock of a stack"

static int refclk(int argc, char **argv)
{
int ret;

static struct {
struct switchtec_dev *dev;
int stack_id;
int enable;
int disable;
} cfg = {
.stack_id = -1
};
const struct argconfig_options opts[] = {
DEVICE_OPTION,
{"disable", 'd', "", CFG_NONE, &cfg.disable, no_argument,
"disable the rfclk output"},
{"enable", 'e', "", CFG_NONE, &cfg.enable, no_argument,
"enable the rfclk output"},
{"stack", 's', "NUM", CFG_NONNEGATIVE, &cfg.stack_id,
required_argument, "stack to operate on"},
{NULL}};

argconfig_parse(argc, argv, CMD_DESC_REF_CLK, opts, &cfg,
sizeof(cfg));

if (!cfg.enable && !cfg.disable) {
fprintf(stderr, "Must set either --enable or --disable\n");
return -1;
}

if (cfg.enable && cfg.disable) {
fprintf(stderr, "Must not set both --enable and --disable\n");
return -1;
}

if (cfg.stack_id == -1) {
fprintf(stderr, "Must specify stack ID using --stack or -s\n");
return -1;
}

ret = switchtec_diag_refclk_ctl(cfg.dev, cfg.stack_id, cfg.enable);
if (ret) {
switchtec_perror("refclk_ctl");
return -1;
}

printf("REFCLK Output %s for Stack %d\n",
cfg.enable ? "Enabled" : "Disabled", cfg.stack_id);

return 0;
}

static const struct cmd commands[] = {
CMD(crosshair, CMD_DESC_CROSS_HAIR),
CMD(eye, CMD_DESC_EYE),
Expand All @@ -2033,7 +1979,6 @@ static const struct cmd commands[] = {
CMD(port_eq_txtable, CMD_DESC_PORT_EQ_TXTABLE),
CMD(rcvr_extended, CMD_DESC_RCVR_EXTENDED),
CMD(rcvr_obj, CMD_DESC_RCVR_OBJ),
CMD(refclk, CMD_DESC_REF_CLK),
CMD(ltssm_log, CMD_DESC_LTSSM_LOG),
{}
};
Expand Down
Loading