]> git.ipfire.org Git - people/ms/u-boot.git/blame - board/mpl/mip405/cmd_mip405.c
Add GPL-2.0+ SPDX-License-Identifier to source files
[people/ms/u-boot.git] / board / mpl / mip405 / cmd_mip405.c
CommitLineData
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 MIP405
8 */
9
10#include <common.h>
11#include <command.h>
12#include "mip405.h"
13#include "../common/common_util.h"
14
15
16extern void print_mip405_info(void);
54841ab5 17extern int do_mplcommon(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
858b1a64
WD
18
19
20/* ------------------------------------------------------------------------- */
21
54841ab5 22int do_mip405(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
858b1a64
WD
23{
24
53677ef1 25 ulong led_on;
858b1a64
WD
26
27 if (strcmp(argv[1], "info") == 0)
28 {
29 print_mip405_info();
53677ef1
WD
30 return 0;
31 }
32 if (strcmp(argv[1], "led") == 0)
858b1a64
WD
33 {
34 led_on = (ulong)simple_strtoul(argv[2], NULL, 10);
35 user_led0(led_on);
36 return 0;
53677ef1 37 }
858b1a64
WD
38 return (do_mplcommon(cmdtp, flag, argc, argv));
39}
0d498393 40U_BOOT_CMD(
7205e407 41 mip405, 8, 1, do_mip405,
2fb2604d 42 "MIP405 specific Cmds",
8bde7f77
WD
43 "flash mem [SrcAddr] - updates U-Boot with image in memory\n"
44 "mip405 flash mps - updates U-Boot with image from MPS\n"
7205e407 45 "mip405 info - displays board information\n"
a7d54346 46 "mip405 led <on> - switches LED on (on=1) or off (on=0)"
8bde7f77 47);
858b1a64
WD
48
49/* ------------------------------------------------------------------------- */