/* Return: 0 if no error, else returns appropriate error value.  */
static int do_rproc_init(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
/* Return: 0 if no error, else returns appropriate error value.  */
static int do_rproc_init(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
{
	int id;
	if (rproc_is_initialized()) {
		printf("\tRemote Processors are already initialized\n");
		return CMD_RET_FAILURE;
	}
	if (argc == 1) {
		if (!rproc_init())
			return 0;
		printf("Few Remote Processors failed to be initialized\n");
	} else if (argc == 2) {
		id = (int)simple_strtoul(argv[1], NULL, 10);
		if (!rproc_dev_init(id))
			return 0;
		printf("Remote Processor %d failed to be initialized\n", id);
	}
	return CMD_RET_FAILURE;
}