1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (C) 2017 Marvell International Ltd.
5 * SPDX-License-Identifier: GPL-2.0
13 #include <dm/device-internal.h>
14 #include <mvebu/comphy.h>
16 int mvebu_comphy_rx_training_cmd(struct cmd_tbl *cmdtp, int flag, int argc,
21 int ret, cp_index, comphy_index, i = 0;
24 printf("missing arguments\n");
28 cp_index = hextoul(argv[1], NULL);
29 comphy_index = hextoul(argv[2], NULL);
31 ret = uclass_get(UCLASS_MISC, &uc);
33 printf("Couldn't find UCLASS_MISC\n");
37 uclass_foreach_dev(dev, uc) {
38 if (!(memcmp(dev->name, "comphy", 5))) {
40 comphy_rx_training(dev, comphy_index);
48 printf("Coudn't find comphy %d\n", cp_index);
54 mvebu_comphy_rx_training, 3, 0, mvebu_comphy_rx_training_cmd,
55 "mvebu_comphy_rx_training <cp id> <comphy id>\n",
56 "\n\tRun COMPHY RX training sequence, the user must state CP index (0/1) and comphy ID (0/5)"