@@ -1968,60 +1968,6 @@ static int rcvr_extended(int argc, char **argv)
19681968 return 0 ;
19691969}
19701970
1971- #define CMD_DESC_REF_CLK "Enable or disable the output reference clock of a stack"
1972-
1973- static int refclk (int argc , char * * argv )
1974- {
1975- int ret ;
1976-
1977- static struct {
1978- struct switchtec_dev * dev ;
1979- int stack_id ;
1980- int enable ;
1981- int disable ;
1982- } cfg = {
1983- .stack_id = -1
1984- };
1985- const struct argconfig_options opts [] = {
1986- DEVICE_OPTION ,
1987- {"disable" , 'd' , "" , CFG_NONE , & cfg .disable , no_argument ,
1988- "disable the rfclk output" },
1989- {"enable" , 'e' , "" , CFG_NONE , & cfg .enable , no_argument ,
1990- "enable the rfclk output" },
1991- {"stack" , 's' , "NUM" , CFG_NONNEGATIVE , & cfg .stack_id ,
1992- required_argument , "stack to operate on" },
1993- {NULL }};
1994-
1995- argconfig_parse (argc , argv , CMD_DESC_REF_CLK , opts , & cfg ,
1996- sizeof (cfg ));
1997-
1998- if (!cfg .enable && !cfg .disable ) {
1999- fprintf (stderr , "Must set either --enable or --disable\n" );
2000- return -1 ;
2001- }
2002-
2003- if (cfg .enable && cfg .disable ) {
2004- fprintf (stderr , "Must not set both --enable and --disable\n" );
2005- return -1 ;
2006- }
2007-
2008- if (cfg .stack_id == -1 ) {
2009- fprintf (stderr , "Must specify stack ID using --stack or -s\n" );
2010- return -1 ;
2011- }
2012-
2013- ret = switchtec_diag_refclk_ctl (cfg .dev , cfg .stack_id , cfg .enable );
2014- if (ret ) {
2015- switchtec_perror ("refclk_ctl" );
2016- return -1 ;
2017- }
2018-
2019- printf ("REFCLK Output %s for Stack %d\n" ,
2020- cfg .enable ? "Enabled" : "Disabled" , cfg .stack_id );
2021-
2022- return 0 ;
2023- }
2024-
20251971static const struct cmd commands [] = {
20261972 CMD (crosshair , CMD_DESC_CROSS_HAIR ),
20271973 CMD (eye , CMD_DESC_EYE ),
@@ -2033,7 +1979,6 @@ static const struct cmd commands[] = {
20331979 CMD (port_eq_txtable , CMD_DESC_PORT_EQ_TXTABLE ),
20341980 CMD (rcvr_extended , CMD_DESC_RCVR_EXTENDED ),
20351981 CMD (rcvr_obj , CMD_DESC_RCVR_OBJ ),
2036- CMD (refclk , CMD_DESC_REF_CLK ),
20371982 CMD (ltssm_log , CMD_DESC_LTSSM_LOG ),
20381983 {}
20391984};
0 commit comments