mtd: Update MTD infrastructure to support 64bit device size

This patch brings the U-Boot MTD infrastructure in sync with the current
Linux MTD version (2.6.30-rc3). Biggest change is the 64bit device size
support and a resync of the mtdpart.c file which has seen multiple fixes
meanwhile.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Kyungmin Park <kmpark@infradead.org>
This commit is contained in:
Stefan Roese
2009-05-11 16:03:55 +02:00
committed by Wolfgang Denk
parent 0a57265533
commit 8d2effea23
6 changed files with 256 additions and 284 deletions

View File

@@ -19,6 +19,10 @@
#include <asm/io.h>
#if !defined(CONFIG_SYS_64BIT_VSPRINTF)
#warning Please define CONFIG_SYS_64BIT_VSPRINTF for correct output!
#endif
static struct mtd_info *mtd;
static loff_t next_ofs;
@@ -53,7 +57,7 @@ static int arg_off_size(int argc, char *argv[], ulong *off, size_t *size)
}
if ((*off + *size) > mtd->size) {
printf("total chip size (0x%x) exceeded!\n", mtd->size);
printf("total chip size (0x%llx) exceeded!\n", mtd->size);
return -1;
}

View File

@@ -109,7 +109,7 @@ int saveenv(void)
if (onenand_write(&onenand_mtd, env_addr, onenand_mtd.writesize, &retlen,
(u_char *) env_ptr)) {
printf("OneNAND: write failed at 0x%08x\n", instr.addr);
printf("OneNAND: write failed at 0x%llx\n", instr.addr);
return 2;
}