]>
Commit | Line | Data |
---|---|---|
858b1a64 WD |
1 | /* |
2 | * (C) Copyright 2001 | |
3 | * Denis Peter, MPL AG Switzerland, d.peter@mpl.ch | |
4 | * | |
1a459660 | 5 | * SPDX-License-Identifier: GPL-2.0+ |
858b1a64 WD |
6 | * |
7 | * hacked for PIP405 | |
8 | */ | |
9 | ||
10 | #include <common.h> | |
11 | #include <command.h> | |
12 | #include "pip405.h" | |
13 | #include "../common/common_util.h" | |
14 | ||
15 | ||
16 | extern void print_pip405_info(void); | |
54841ab5 | 17 | extern int do_mplcommon(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); |
858b1a64 WD |
18 | |
19 | ||
858b1a64 WD |
20 | /* ------------------------------------------------------------------------- */ |
21 | ||
54841ab5 | 22 | int do_pip405(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) |
858b1a64 WD |
23 | { |
24 | ||
53677ef1 | 25 | ulong led_on,led_nr; |
858b1a64 WD |
26 | |
27 | if (strcmp(argv[1], "info") == 0) | |
28 | { | |
29 | print_pip405_info(); | |
53677ef1 WD |
30 | return 0; |
31 | } | |
32 | if (strcmp(argv[1], "led") == 0) | |
858b1a64 WD |
33 | { |
34 | led_nr = (ulong)simple_strtoul(argv[2], NULL, 10); | |
35 | led_on = (ulong)simple_strtoul(argv[3], NULL, 10); | |
36 | if(!led_nr) | |
37 | user_led0(led_on); | |
38 | else | |
39 | user_led1(led_on); | |
40 | return 0; | |
53677ef1 | 41 | } |
858b1a64 WD |
42 | |
43 | return (do_mplcommon(cmdtp, flag, argc, argv)); | |
44 | } | |
0d498393 WD |
45 | U_BOOT_CMD( |
46 | pip405, 6, 1, do_pip405, | |
2fb2604d | 47 | "PIP405 specific Cmds", |
8bde7f77 WD |
48 | "flash mem [SrcAddr] - updates U-Boot with image in memory\n" |
49 | "pip405 flash floppy [SrcAddr] - updates U-Boot with image from floppy\n" | |
a89c33db | 50 | "pip405 flash mps - updates U-Boot with image from MPS" |
8bde7f77 | 51 | ); |
858b1a64 WD |
52 | |
53 | /* ------------------------------------------------------------------------- */ |