2002-09-30 16:12:23 +00:00
|
|
|
/*
|
|
|
|
* (C) Copyright 2001
|
|
|
|
* Denis Peter, MPL AG Switzerland, d.peter@mpl.ch
|
|
|
|
*
|
2013-07-08 07:37:19 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0+
|
2002-09-30 16:12:23 +00:00
|
|
|
*
|
|
|
|
* hacked for MIP405
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <common.h>
|
|
|
|
#include <command.h>
|
|
|
|
#include "mip405.h"
|
|
|
|
#include "../common/common_util.h"
|
|
|
|
|
|
|
|
|
|
|
|
extern void print_mip405_info(void);
|
2010-06-28 20:00:46 +00:00
|
|
|
extern int do_mplcommon(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
|
2002-09-30 16:12:23 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* ------------------------------------------------------------------------- */
|
|
|
|
|
2010-06-28 20:00:46 +00:00
|
|
|
int do_mip405(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
2002-09-30 16:12:23 +00:00
|
|
|
{
|
|
|
|
|
2008-05-20 14:00:29 +00:00
|
|
|
ulong led_on;
|
2002-09-30 16:12:23 +00:00
|
|
|
|
|
|
|
if (strcmp(argv[1], "info") == 0)
|
|
|
|
{
|
|
|
|
print_mip405_info();
|
2008-05-20 14:00:29 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
if (strcmp(argv[1], "led") == 0)
|
2002-09-30 16:12:23 +00:00
|
|
|
{
|
|
|
|
led_on = (ulong)simple_strtoul(argv[2], NULL, 10);
|
|
|
|
user_led0(led_on);
|
|
|
|
return 0;
|
2008-05-20 14:00:29 +00:00
|
|
|
}
|
2002-09-30 16:12:23 +00:00
|
|
|
return (do_mplcommon(cmdtp, flag, argc, argv));
|
|
|
|
}
|
2003-07-01 21:06:45 +00:00
|
|
|
U_BOOT_CMD(
|
2003-09-10 22:30:53 +00:00
|
|
|
mip405, 8, 1, do_mip405,
|
2009-01-28 00:03:12 +00:00
|
|
|
"MIP405 specific Cmds",
|
2003-06-27 21:31:46 +00:00
|
|
|
"flash mem [SrcAddr] - updates U-Boot with image in memory\n"
|
|
|
|
"mip405 flash mps - updates U-Boot with image from MPS\n"
|
2003-09-10 22:30:53 +00:00
|
|
|
"mip405 info - displays board information\n"
|
2010-10-06 04:48:47 +00:00
|
|
|
"mip405 led <on> - switches LED on (on=1) or off (on=0)"
|
2003-06-27 21:31:46 +00:00
|
|
|
);
|
2002-09-30 16:12:23 +00:00
|
|
|
|
|
|
|
/* ------------------------------------------------------------------------- */
|