]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
Separate mtdparts command from jffs2
authorLadislav Michl <ladis@linux-mips.org>
Mon, 23 Mar 2009 11:06:07 +0000 (12:06 +0100)
committerWolfgang Denk <wd@denx.de>
Sat, 4 Apr 2009 20:42:05 +0000 (22:42 +0200)
On Thu, Mar 19, 2009 at 01:30:36PM +0100, Stefan Roese wrote:
> Currently the mtdparts commands are included in the jffs2 command support.
> This doesn't make sense anymore since other commands (e.g. UBI) use this
> infrastructure as well now. This patch separates the mtdparts commands from
> the jffs2 commands making it possible to only select mtdparts when no JFFS2
> support is needed.

... and to make it useful for NAND chips as well, we should also remove now
unrelated CONFIG_JFFS2_NAND. Note that struct part_info etc is in
jffs2/load_kernel.h which is a bit misleading filename for that purpose,
but that can be fixed later (tm).

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
common/cmd_mtdparts.c

index c8bf2c6392e8e9e99551455186c02ce80b60ef0b..3d437c0861070d261014188e7c6a8ff0eb9e10b4 100644 (file)
  *
  */
 
-/*
- * JFFS2/CRAMFS support
- */
 #include <common.h>
 #include <command.h>
 #include <malloc.h>
-#include <jffs2/jffs2.h>
+#include <jffs2/load_kernel.h>
 #include <linux/list.h>
 #include <linux/ctype.h>
 #include <cramfs/cramfs_fs.h>
@@ -375,7 +372,7 @@ static int part_validate_nor(struct mtdids *id, struct part_info *part)
  */
 static int part_validate_nand(struct mtdids *id, struct part_info *part)
 {
-#if defined(CONFIG_JFFS2_NAND) && defined(CONFIG_CMD_NAND)
+#if defined(CONFIG_CMD_NAND)
        /* info for NAND chips */
        nand_info_t *nand;
 
@@ -780,7 +777,7 @@ int mtd_device_validate(u8 type, u8 num, u32 *size)
                printf("support for FLASH devices not present\n");
 #endif
        } else if (type == MTD_DEV_TYPE_NAND) {
-#if defined(CONFIG_JFFS2_NAND) && defined(CONFIG_CMD_NAND)
+#if defined(CONFIG_CMD_NAND)
                if (num < CONFIG_SYS_MAX_NAND_DEVICE) {
 #ifndef CONFIG_NAND_LEGACY
                        *size = nand_info[num].size;