/* Return: 0 if no error, else returns appropriate error value.  */
static int do_remoteproc_load(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
/* Return: 0 if no error, else returns appropriate error value.  */
static int do_remoteproc_load(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
{
	ulong addr, size;
	int id, ret;
	if (argc != 4)
		return CMD_RET_USAGE;
	id = (int)simple_strtoul(argv[1], NULL, 10);
	addr = simple_strtoul(argv[2], NULL, 16);
	size = simple_strtoul(argv[3], NULL, 16);
	if (!size) {
		printf("\t Expect some size??\n");
		return CMD_RET_USAGE;
	}
	ret = rproc_load(id, addr, size);
	printf("Load Remote Processor %d with data@addr=0x%08lx %lu bytes:%s\n",
	       id, addr, size, ret ? " Failed!" : " Success!");
	return ret ? CMD_RET_FAILURE : 0;
}