summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/cmd_jffs2.c36
-rw-r--r--common/cmd_mfsl.c11
2 files changed, 14 insertions, 33 deletions
diff --git a/common/cmd_jffs2.c b/common/cmd_jffs2.c
index 3e6061a..513a226 100644
--- a/common/cmd_jffs2.c
+++ b/common/cmd_jffs2.c
@@ -85,7 +85,7 @@
*/
/*
- * JFFS2/CRAMFS/ROMFS support
+ * JFFS2/CRAMFS support
*/
#include <common.h>
#include <command.h>
@@ -175,11 +175,6 @@ extern int cramfs_load (char *loadoffset, struct part_info *info, char *filename
extern int cramfs_ls (struct part_info *info, char *filename);
extern int cramfs_info (struct part_info *info);
-extern int romfs_check (struct part_info *info);
-extern int romfs_load (char *loadoffset, struct part_info *info, char *filename);
-extern int romfs_ls (struct part_info *info, char *filename);
-extern int romfs_info (struct part_info *info);
-
static struct part_info* jffs2_part_info(struct mtd_device *dev, unsigned int part_num);
/* command line only routines */
@@ -1879,22 +1874,14 @@ int do_jffs2_fsload(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
if ((part = jffs2_part_info(current_dev, current_partnum))){
- /* check partition type for JFFS2, cramfs, romfs */
- if (cramfs_check(part)) {
- fsname = "CRAMFS";
- } else if (romfs_check(part)) {
- fsname = "ROMFS";
- } else {
- fsname = "JFFS2";
- }
+ /* check partition type for cramfs */
+ fsname = (cramfs_check(part) ? "CRAMFS" : "JFFS2");
printf("### %s loading '%s' to 0x%lx\n", fsname, filename, offset);
if (cramfs_check(part)) {
size = cramfs_load ((char *) offset, part, filename);
- } else if (romfs_check(part)){
- size = romfs_load ((char *) offset, part, filename);
} else {
- /* if this is not cramfs or romfs assume jffs2 */
+ /* if this is not cramfs assume jffs2 */
size = jffs2_1pass_load((char *)offset, part, filename);
}
@@ -1941,10 +1928,8 @@ int do_jffs2_ls(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
/* check partition type for cramfs */
if (cramfs_check(part)) {
ret = cramfs_ls (part, filename);
- } else if (romfs_check(part)) {
- ret = romfs_ls (part, filename);
} else {
- /* if this is not cramfs or romfs assume jffs2 */
+ /* if this is not cramfs assume jffs2 */
ret = jffs2_1pass_ls(part, filename);
}
@@ -1966,6 +1951,7 @@ int do_jffs2_ls(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
int do_jffs2_fsinfo(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
struct part_info *part;
+ char *fsname;
int ret;
/* make sure we are in sync with env variables */
@@ -1975,17 +1961,13 @@ int do_jffs2_fsinfo(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
if ((part = jffs2_part_info(current_dev, current_partnum))){
/* check partition type for cramfs */
- puts("### filesystem type is ");
+ fsname = (cramfs_check(part) ? "CRAMFS" : "JFFS2");
+ printf("### filesystem type is %s\n", fsname);
if (cramfs_check(part)) {
- puts("CRAMFS\n");
ret = cramfs_info (part);
- } else if (romfs_check(part)) {
- puts("ROMFS\n");
- ret = romfs_info (part);
} else {
- /* if this is not cramfs or romfs assume jffs2 */
- puts("JFFS2\n");
+ /* if this is not cramfs assume jffs2 */
ret = jffs2_1pass_info(part);
}
diff --git a/common/cmd_mfsl.c b/common/cmd_mfsl.c
index 93cc873..8d4c1a3 100644
--- a/common/cmd_mfsl.c
+++ b/common/cmd_mfsl.c
@@ -357,7 +357,7 @@ int do_rspr (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
reg = (unsigned int)simple_strtoul (argv[1], NULL, 16);
val = (unsigned int)simple_strtoul (argv[2], NULL, 16);
- if (argc < 2) {
+ if (argc < 1) {
printf ("Usage:\n%s\n", cmdtp->usage);
return 1;
}
@@ -382,7 +382,6 @@ int do_rspr (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
puts ("ESR");
break;
default:
- puts ("Unsupported register\n");
return 1;
}
printf (": 0x%08lx\n", val);
@@ -409,10 +408,10 @@ U_BOOT_CMD (fwr, 4, 1, do_fwr,
" 3 - blocking control write\n");
U_BOOT_CMD (rspr, 3, 1, do_rspr,
- "rspr - read/write special purpose register\n",
+ "rmsr - read/write special purpose register\n",
"- reg_num [write value] read/write special purpose register\n"
- " 1 - MSR - Machine status register\n"
- " 3 - EAR - Exception address register\n"
- " 5 - ESR - Exception status register\n");
+ " 0 - MSR - Machine status register\n"
+ " 1 - EAR - Exception address register\n"
+ " 2 - ESR - Exception status register\n");
#endif