]>
git.ipfire.org Git - people/ms/u-boot.git/blob - common/cmd_diag.c
3 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
5 * SPDX-License-Identifier: GPL-2.0+
15 int do_diag (cmd_tbl_t
* cmdtp
, int flag
, int argc
, char * const argv
[])
19 if (argc
== 1 || strcmp (argv
[1], "run") != 0) {
22 puts ("Available hardware tests:\n");
24 puts ("Use 'diag [<test1> [<test2> ...]]'"
25 " to get more info.\n");
26 puts ("Use 'diag run [<test1> [<test2> ...]]'"
29 for (i
= 1; i
< argc
; i
++) {
30 if (post_info (argv
[i
]) != 0)
31 printf ("%s - no such test\n", argv
[i
]);
37 post_run (NULL
, POST_RAM
| POST_MANUAL
);
39 for (i
= 2; i
< argc
; i
++) {
40 if (post_run (argv
[i
], POST_RAM
| POST_MANUAL
) != 0)
41 printf ("%s - unable to execute the test\n",
49 /***************************************************/
52 diag
, CONFIG_SYS_MAXARGS
, 0, do_diag
,
53 "perform board diagnostics",
54 " - print list of available tests\n"
55 "diag [test1 [test2]]\n"
56 " - print information about specified tests\n"
57 "diag run - run all available tests\n"
58 "diag run [test1 [test2]]\n"
59 " - run specified tests"