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#include <common.h>
27#include <command.h>
28#include "pip405.h"
29#include "../common/common_util.h"
30
31
32extern void print_pip405_info(void);
33extern int do_mplcommon(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
34
35
36
37
38int do_pip405(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
39{
40
41 ulong led_on,led_nr;
42
43 if (strcmp(argv[1], "info") == 0)
44 {
45 print_pip405_info();
46 return 0;
47 }
48 if (strcmp(argv[1], "led") == 0)
49 {
50 led_nr = (ulong)simple_strtoul(argv[2], NULL, 10);
51 led_on = (ulong)simple_strtoul(argv[3], NULL, 10);
52 if(!led_nr)
53 user_led0(led_on);
54 else
55 user_led1(led_on);
56 return 0;
57 }
58
59 return (do_mplcommon(cmdtp, flag, argc, argv));
60}
61U_BOOT_CMD(
62 pip405, 6, 1, do_pip405,
63 "PIP405 specific Cmds",
64 "flash mem [SrcAddr] - updates U-Boot with image in memory\n"
65 "pip405 flash floppy [SrcAddr] - updates U-Boot with image from floppy\n"
66 "pip405 flash mps - updates U-Boot with image from MPS"
67);
68
69
70