projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
usb: kbd: Properly translate up/down arrow keys
[oweals/u-boot.git]
/
cmd
/
jffs2.c
diff --git
a/cmd/jffs2.c
b/cmd/jffs2.c
index 9be198eddce44b638f76477308860bbabf012ec4..64621f2546602af59bcf862d7628b04ae50f64f2 100644
(file)
--- a/
cmd/jffs2.c
+++ b/
cmd/jffs2.c
@@
-1,3
+1,4
@@
+// SPDX-License-Identifier: GPL-2.0+
/*
* (C) Copyright 2002
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
/*
* (C) Copyright 2002
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
@@
-17,8
+18,6
@@
*
* $Id: cmdlinepart.c,v 1.17 2004/11/26 11:18:47 lavinen Exp $
* Copyright 2002 SYSGO Real-Time Solutions GmbH
*
* $Id: cmdlinepart.c,v 1.17 2004/11/26 11:18:47 lavinen Exp $
* Copyright 2002 SYSGO Real-Time Solutions GmbH
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
/*
*/
/*
@@
-80,7
+79,7
@@
#include <cramfs/cramfs_fs.h>
#if defined(CONFIG_CMD_NAND)
#include <cramfs/cramfs_fs.h>
#if defined(CONFIG_CMD_NAND)
-#include <linux/mtd/nand.h>
+#include <linux/mtd/
raw
nand.h>
#include <nand.h>
#endif
#include <nand.h>
#endif
@@
-166,8
+165,9
@@
static int mtd_device_validate(u8 type, u8 num, u32 *size)
#endif
} else if (type == MTD_DEV_TYPE_NAND) {
#if defined(CONFIG_JFFS2_NAND) && defined(CONFIG_CMD_NAND)
#endif
} else if (type == MTD_DEV_TYPE_NAND) {
#if defined(CONFIG_JFFS2_NAND) && defined(CONFIG_CMD_NAND)
- if (num < CONFIG_SYS_MAX_NAND_DEVICE) {
- *size = nand_info[num]->size;
+ struct mtd_info *mtd = get_nand_dev_by_index(num);
+ if (mtd) {
+ *size = mtd->size;
return 0;
}
return 0;
}
@@
-244,7
+244,7
@@
static inline u32 get_part_sector_size_nand(struct mtdids *id)
#if defined(CONFIG_JFFS2_NAND) && defined(CONFIG_CMD_NAND)
struct mtd_info *mtd;
#if defined(CONFIG_JFFS2_NAND) && defined(CONFIG_CMD_NAND)
struct mtd_info *mtd;
- mtd =
nand_info[id->num]
;
+ mtd =
get_nand_dev_by_index(id->num)
;
return mtd->erasesize;
#else
return mtd->erasesize;
#else
@@
-478,9
+478,9
@@
int do_jffs2_fsload(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
ulong offset = load_addr;
/* pre-set Boot file name */
ulong offset = load_addr;
/* pre-set Boot file name */
- if ((filename = getenv("bootfile")) == NULL) {
+ filename = env_get("bootfile");
+ if (!filename)
filename = "uImage";
filename = "uImage";
- }
if (argc == 2) {
filename = argv[1];
if (argc == 2) {
filename = argv[1];
@@
-511,7
+511,7
@@
int do_jffs2_fsload(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
if (size > 0) {
printf("### %s load complete: %d bytes loaded to 0x%lx\n",
fsname, size, offset);
if (size > 0) {
printf("### %s load complete: %d bytes loaded to 0x%lx\n",
fsname, size, offset);
-
setenv
_hex("filesize", size);
+
env_set
_hex("filesize", size);
} else {
printf("### %s LOAD ERROR<%x> for %s!\n", fsname, size, filename);
}
} else {
printf("### %s LOAD ERROR<%x> for %s!\n", fsname, size, filename);
}