mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-13 15:03:58 +03:00
Merge git://git.denx.de/u-boot-nand-flash
This commit is contained in:
@@ -1493,7 +1493,7 @@ static int spread_partitions(void)
|
||||
part = list_entry(pentry, struct part_info, link);
|
||||
|
||||
debug("spread_partitions: device = %s%d, partition %d ="
|
||||
" (%s) 0x%08x@0x%08x\n",
|
||||
" (%s) 0x%08llx@0x%08llx\n",
|
||||
MTD_DEV_TYPE(dev->id->type), dev->id->num,
|
||||
part_num, part->name, part->size,
|
||||
part->offset);
|
||||
@@ -2025,7 +2025,7 @@ static int do_mtdparts(cmd_tbl_t *cmdtp, int flag, int argc,
|
||||
|
||||
if (!strcmp(&argv[1][3], ".spread")) {
|
||||
spread_partition(mtd, p, &next_offset);
|
||||
debug("increased %s to %d bytes\n", p->name, p->size);
|
||||
debug("increased %s to %llu bytes\n", p->name, p->size);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
15
cmd/nand.c
15
cmd/nand.c
@@ -306,7 +306,7 @@ static void nand_print_and_set_info(int idx)
|
||||
}
|
||||
|
||||
static int raw_access(struct mtd_info *mtd, ulong addr, loff_t off,
|
||||
ulong count, int read)
|
||||
ulong count, int read, int no_verify)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
@@ -324,7 +324,7 @@ static int raw_access(struct mtd_info *mtd, ulong addr, loff_t off,
|
||||
ret = mtd_read_oob(mtd, off, &ops);
|
||||
} else {
|
||||
ret = mtd_write_oob(mtd, off, &ops);
|
||||
if (!ret)
|
||||
if (!ret && !no_verify)
|
||||
ret = nand_verify_page_oob(mtd, &ops, off);
|
||||
}
|
||||
|
||||
@@ -546,6 +546,7 @@ static int do_nand(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
||||
ulong pagecount = 1;
|
||||
int read;
|
||||
int raw = 0;
|
||||
int no_verify = 0;
|
||||
|
||||
if (argc < 4)
|
||||
goto usage;
|
||||
@@ -557,9 +558,12 @@ static int do_nand(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
||||
|
||||
s = strchr(cmd, '.');
|
||||
|
||||
if (s && !strcmp(s, ".raw")) {
|
||||
if (s && !strncmp(s, ".raw", 4)) {
|
||||
raw = 1;
|
||||
|
||||
if (!strcmp(s, ".raw.noverify"))
|
||||
no_verify = 1;
|
||||
|
||||
if (mtd_arg_off(argv[3], &dev, &off, &size, &maxsize,
|
||||
MTD_DEV_TYPE_NAND,
|
||||
nand_info[dev]->size))
|
||||
@@ -633,7 +637,8 @@ static int do_nand(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
||||
else
|
||||
ret = mtd_write_oob(mtd, off, &ops);
|
||||
} else if (raw) {
|
||||
ret = raw_access(mtd, addr, off, pagecount, read);
|
||||
ret = raw_access(mtd, addr, off, pagecount, read,
|
||||
no_verify);
|
||||
} else {
|
||||
printf("Unknown nand command suffix '%s'.\n", s);
|
||||
return 1;
|
||||
@@ -786,7 +791,7 @@ static char nand_help_text[] =
|
||||
" read/write 'size' bytes starting at offset 'off'\n"
|
||||
" to/from memory address 'addr', skipping bad blocks.\n"
|
||||
"nand read.raw - addr off|partition [count]\n"
|
||||
"nand write.raw - addr off|partition [count]\n"
|
||||
"nand write.raw[.noverify] - addr off|partition [count]\n"
|
||||
" Use read.raw/write.raw to avoid ECC and access the flash as-is.\n"
|
||||
#ifdef CONFIG_CMD_NAND_TRIMFFS
|
||||
"nand write.trimffs - addr off|partition size\n"
|
||||
|
||||
Reference in New Issue
Block a user