diff options
author | Mike Frysinger <vapier@gentoo.org> | 2010-01-08 08:03:06 -0500 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2010-01-26 00:07:50 +0100 |
commit | 2903ad33a71251a3a87485b5b185852c8998f209 (patch) | |
tree | c730e4dd84904360d08fdfa27c5fe91c0dc31a02 /common | |
parent | 64b150213365db6be97a98d25884f87d83caacaf (diff) | |
download | u-boot-imx-2903ad33a71251a3a87485b5b185852c8998f209.zip u-boot-imx-2903ad33a71251a3a87485b5b185852c8998f209.tar.gz u-boot-imx-2903ad33a71251a3a87485b5b185852c8998f209.tar.bz2 |
jffs2: fix hangs/crashs when not using CONFIG_JFFS2_PART_SIZE
Commit b5b004ad8a0ac6f98bd5708ec8b22fbddd1c1042 caused the sector_size to
be calculated incorrectly when the part size was not hardcoded. This is
because the new code relied on part->size but tried to do the calculation
before it was initialized properly, and it did not take into consideration
the magic SIZE_REMAINING define.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'common')
-rw-r--r-- | common/cmd_jffs2.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/cmd_jffs2.c b/common/cmd_jffs2.c index 372ccb2..6799cca 100644 --- a/common/cmd_jffs2.c +++ b/common/cmd_jffs2.c @@ -406,8 +406,6 @@ int mtdparts_init(void) part->offset = 0x00000000; #endif - part->sector_size = get_part_sector_size(id, part); - part->dev = current_mtd_dev; INIT_LIST_HEAD(&part->link); @@ -415,6 +413,8 @@ int mtdparts_init(void) if (part->size == SIZE_REMAINING) part->size = id->size - part->offset; + part->sector_size = get_part_sector_size(id, part); + DEBUGF("part : name = %s, size = 0x%08lx, offset = 0x%08lx\n", part->name, part->size, part->offset); |