summaryrefslogtreecommitdiff
path: root/board/mpl/vcma9/cmd_vcma9.c
diff options
context:
space:
mode:
authorwdenk <wdenk>2003-09-13 19:01:12 +0000
committerwdenk <wdenk>2003-09-13 19:01:12 +0000
commit531716e1710083f91d9fa351f89d18e271b5c577 (patch)
treeb16f8f3683078ee64ac2b87c2f3c1c37c60f9a93 /board/mpl/vcma9/cmd_vcma9.c
parentb70e7a00c8bc6feb5f5718ba1c6d4fedb294483a (diff)
downloadu-boot-imx-531716e1710083f91d9fa351f89d18e271b5c577.zip
u-boot-imx-531716e1710083f91d9fa351f89d18e271b5c577.tar.gz
u-boot-imx-531716e1710083f91d9fa351f89d18e271b5c577.tar.bz2
* Patch by David Müller, 13 Sep 2003:
various changes to VCMA9 board specific files * Add I2C support for MGT5100 / MPC5200
Diffstat (limited to 'board/mpl/vcma9/cmd_vcma9.c')
-rw-r--r--board/mpl/vcma9/cmd_vcma9.c46
1 files changed, 42 insertions, 4 deletions
diff --git a/board/mpl/vcma9/cmd_vcma9.c b/board/mpl/vcma9/cmd_vcma9.c
index 32fa334..3b04535 100644
--- a/board/mpl/vcma9/cmd_vcma9.c
+++ b/board/mpl/vcma9/cmd_vcma9.c
@@ -41,9 +41,12 @@ static uchar cs8900_chksum(ushort data)
#endif
extern void print_vcma9_info(void);
-extern int vcma9_cantest(void);
+extern int vcma9_cantest(int);
extern int vcma9_nandtest(void);
-extern int vcma9_dactest(void);
+extern int vcma9_nanderase(void);
+extern int vcma9_nandread(ulong);
+extern int vcma9_nandwrite(ulong);
+extern int vcma9_dactest(int);
extern int do_mplcommon(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
/* ------------------------------------------------------------------------- */
@@ -126,18 +129,53 @@ int do_vcma9(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
#endif
#if 0
if (strcmp(argv[1], "cantest") == 0) {
- vcma9_cantest();
+ if (argc >= 3)
+ vcma9_cantest(strcmp(argv[2], "s") ? 0 : 1);
+ else
+ vcma9_cantest(0);
return 0;
}
if (strcmp(argv[1], "nandtest") == 0) {
vcma9_nandtest();
return 0;
}
+ if (strcmp(argv[1], "nanderase") == 0) {
+ vcma9_nanderase();
+ return 0;
+ }
+ if (strcmp(argv[1], "nandread") == 0) {
+ ulong offset = 0;
+
+ if (argc >= 3)
+ offset = simple_strtoul(argv[2], NULL, 16);
+
+ vcma9_nandread(offset);
+ return 0;
+ }
+ if (strcmp(argv[1], "nandwrite") == 0) {
+ ulong offset = 0;
+
+ if (argc >= 3)
+ offset = simple_strtoul(argv[2], NULL, 16);
+
+ vcma9_nandwrite(offset);
+ return 0;
+ }
if (strcmp(argv[1], "dactest") == 0) {
- vcma9_dactest();
+ if (argc >= 3)
+ vcma9_dactest(strcmp(argv[2], "s") ? 0 : 1);
+ else
+ vcma9_dactest(0);
return 0;
}
#endif
return (do_mplcommon(cmdtp, flag, argc, argv));
}
+
+U_BOOT_CMD(
+ vcma9, 6, 1, do_vcma9,
+ "vcma9 - VCMA9 specific commands\n",
+ "flash mem [SrcAddr]\n - updates U-Boot with image in memory\n"
+);
+