2 * (C) Copyright 2000-2003
3 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
5 * SPDX-License-Identifier: GPL-2.0+
17 /* Allow ports to override the default behavior */
19 unsigned long do_go_exec(ulong (*entry)(int, char * const []), int argc,
22 return entry (argc, argv);
25 static int do_go(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
33 addr = simple_strtoul(argv[1], NULL, 16);
35 printf ("## Starting application at 0x%08lX ...\n", addr);
38 * pass address parameter as argv[0] (aka command name),
39 * and all remaining args
41 rc = do_go_exec ((void *)addr, argc - 1, argv + 1);
42 if (rc != 0) rcode = 1;
44 printf ("## Application terminated, rc = 0x%lX\n", rc);
48 /* -------------------------------------------------------------------- */
51 go, CONFIG_SYS_MAXARGS, 1, do_go,
52 "start application at address 'addr'",
53 "addr [arg ...]\n - start application at address 'addr'\n"
54 " passing 'arg' as arguments"
60 reset, 1, 0, do_reset,
61 "Perform RESET of the CPU",