blob: ca6f0affe48f4ee479e4fffba81287cf560be889 [file] [log] [blame]
wdenk858b1a62002-09-30 16:12:23 +00001/*
2 * (C) Copyright 2001
3 * Denis Peter, MPL AG Switzerland, d.peter@mpl.ch
4 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
wdenk858b1a62002-09-30 16:12:23 +00006 *
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);
Wolfgang Denk6262d0212010-06-28 22:00:46 +020017extern int do_mplcommon(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
wdenk858b1a62002-09-30 16:12:23 +000018
19
20/* ------------------------------------------------------------------------- */
21
Wolfgang Denk6262d0212010-06-28 22:00:46 +020022int do_mip405(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
wdenk858b1a62002-09-30 16:12:23 +000023{
24
Wolfgang Denka1be4762008-05-20 16:00:29 +020025 ulong led_on;
wdenk858b1a62002-09-30 16:12:23 +000026
27 if (strcmp(argv[1], "info") == 0)
28 {
29 print_mip405_info();
Wolfgang Denka1be4762008-05-20 16:00:29 +020030 return 0;
31 }
32 if (strcmp(argv[1], "led") == 0)
wdenk858b1a62002-09-30 16:12:23 +000033 {
34 led_on = (ulong)simple_strtoul(argv[2], NULL, 10);
35 user_led0(led_on);
36 return 0;
Wolfgang Denka1be4762008-05-20 16:00:29 +020037 }
wdenk858b1a62002-09-30 16:12:23 +000038 return (do_mplcommon(cmdtp, flag, argc, argv));
39}
wdenkf287a242003-07-01 21:06:45 +000040U_BOOT_CMD(
wdenk2c9b05d2003-09-10 22:30:53 +000041 mip405, 8, 1, do_mip405,
Peter Tyserdfb72b82009-01-27 18:03:12 -060042 "MIP405 specific Cmds",
wdenk57b2d802003-06-27 21:31:46 +000043 "flash mem [SrcAddr] - updates U-Boot with image in memory\n"
44 "mip405 flash mps - updates U-Boot with image from MPS\n"
wdenk2c9b05d2003-09-10 22:30:53 +000045 "mip405 info - displays board information\n"
Peter Tysere9b1b492010-10-05 23:48:47 -050046 "mip405 led <on> - switches LED on (on=1) or off (on=0)"
wdenk57b2d802003-06-27 21:31:46 +000047);
wdenk858b1a62002-09-30 16:12:23 +000048
49/* ------------------------------------------------------------------------- */