1 // SPDX-License-Identifier: GPL-2.0+
3 * cmd_sdp.c -- sdp command
5 * Copyright (C) 2016 Toradex
14 #include <linux/printk.h>
16 static int do_sdp(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
25 controller_index = simple_strtoul(argv[1], NULL, 0);
26 ret = udc_device_get_by_index(controller_index, &udc);
31 ret = g_dnl_register("usb_dnl_sdp");
33 pr_err("SDP dnl register failed: %d\n", ret);
39 pr_err("SDP init failed: %d\n", ret);
43 /* This command typically does not return but jumps to an image */
45 pr_err("SDP ended\n");
52 return CMD_RET_FAILURE;
55 U_BOOT_CMD(sdp, 2, 1, do_sdp,
56 "Serial Downloader Protocol",
58 " - serial downloader protocol via <USB_controller>\n"