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 PIP405
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <common.h>
|
|
|
|
#include <command.h>
|
|
|
|
#include "pip405.h"
|
|
|
|
#include "../common/common_util.h"
|
|
|
|
|
|
|
|
|
|
|
|
extern void print_pip405_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_pip405(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,led_nr;
|
2002-09-30 16:12:23 +00:00
|
|
|
|
|
|
|
if (strcmp(argv[1], "info") == 0)
|
|
|
|
{
|
|
|
|
print_pip405_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_nr = (ulong)simple_strtoul(argv[2], NULL, 10);
|
|
|
|
led_on = (ulong)simple_strtoul(argv[3], NULL, 10);
|
|
|
|
if(!led_nr)
|
|
|
|
user_led0(led_on);
|
|
|
|
else
|
|
|
|
user_led1(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(
|
|
|
|
pip405, 6, 1, do_pip405,
|
2009-01-28 00:03:12 +00:00
|
|
|
"PIP405 specific Cmds",
|
2003-06-27 21:31:46 +00:00
|
|
|
"flash mem [SrcAddr] - updates U-Boot with image in memory\n"
|
|
|
|
"pip405 flash floppy [SrcAddr] - updates U-Boot with image from floppy\n"
|
2009-05-24 15:06:54 +00:00
|
|
|
"pip405 flash mps - updates U-Boot with image from MPS"
|
2003-06-27 21:31:46 +00:00
|
|
|
);
|
2002-09-30 16:12:23 +00:00
|
|
|
|
|
|
|
/* ------------------------------------------------------------------------- */
|