1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27#include <common.h>
28#include <command.h>
29#include <net.h>
30
31
32__attribute__((weak))
33unsigned long do_go_exec (ulong (*entry)(int, char *[]), int argc, char *argv[])
34{
35 return entry (argc, argv);
36}
37
38int do_go (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
39{
40 ulong addr, rc;
41 int rcode = 0;
42
43 if (argc < 2) {
44 cmd_usage(cmdtp);
45 return 1;
46 }
47
48 addr = simple_strtoul(argv[1], NULL, 16);
49
50 printf ("## Starting application at 0x%08lX ...\n", addr);
51
52
53
54
55
56 rc = do_go_exec ((void *)addr, argc - 1, argv + 1);
57 if (rc != 0) rcode = 1;
58
59 printf ("## Application terminated, rc = 0x%lX\n", rc);
60 return rcode;
61}
62
63
64
65U_BOOT_CMD(
66 go, CONFIG_SYS_MAXARGS, 1, do_go,
67 "start application at address 'addr'",
68 "addr [arg ...]\n - start application at address 'addr'\n"
69 " passing 'arg' as arguments\n"
70);
71
72extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
73
74U_BOOT_CMD(
75 reset, 1, 0, do_reset,
76 "Perform RESET of the CPU",
77 NULL
78);
79