summaryrefslogtreecommitdiff
path: root/common/cmd_jffs2.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@atlas.denx.de>2006-03-06 23:18:48 +0100
committerWolfgang Denk <wd@atlas.denx.de>2006-03-06 23:18:48 +0100
commit951a954b77ef30df1f5c1b7b9b4312e783b2cbb4 (patch)
tree8f94ab1a2e15fbf31c322e6be1f750e10ac2fe2f /common/cmd_jffs2.c
parentac7d97dcbb499c96c8182757f301dd2e09c9f49d (diff)
parentbfc81252c0de3bfcf92c7c35bc04341fb33e4e4e (diff)
downloadu-boot-imx-951a954b77ef30df1f5c1b7b9b4312e783b2cbb4.zip
u-boot-imx-951a954b77ef30df1f5c1b7b9b4312e783b2cbb4.tar.gz
u-boot-imx-951a954b77ef30df1f5c1b7b9b4312e783b2cbb4.tar.bz2
Merge with /home/wd/git/u-boot/master
Code cleanup.
Diffstat (limited to 'common/cmd_jffs2.c')
-rw-r--r--common/cmd_jffs2.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/common/cmd_jffs2.c b/common/cmd_jffs2.c
index ecadb79..201c3c1 100644
--- a/common/cmd_jffs2.c
+++ b/common/cmd_jffs2.c
@@ -91,7 +91,6 @@
#include <command.h>
#include <malloc.h>
#include <jffs2/jffs2.h>
-#include <linux/mtd/nand.h>
#include <linux/list.h>
#include <linux/ctype.h>
@@ -99,10 +98,14 @@
#include <cramfs/cramfs_fs.h>
-#ifdef CONFIG_NEW_NAND_CODE
+#if (CONFIG_COMMANDS & CFG_CMD_NAND)
+#ifdef CFG_NAND_LEGACY
+#include <linux/mtd/nand_legacy.h>
+#else /* !CFG_NAND_LEGACY */
+#include <linux/mtd/nand.h>
#include <nand.h>
-#endif
-
+#endif /* !CFG_NAND_LEGACY */
+#endif /* (CONFIG_COMMANDS & CFG_CMD_NAND) */
/* enable/disable debugging messages */
#define DEBUG_JFFS
#undef DEBUG_JFFS
@@ -467,7 +470,7 @@ static int part_del(struct mtd_device *dev, struct part_info *part)
}
}
-#ifndef CONFIG_NEW_NAND_CODE
+#ifdef CFG_NAND_LEGACY
jffs2_free_cache(part);
#endif
list_del(&part->link);
@@ -496,7 +499,7 @@ static void part_delall(struct list_head *head)
list_for_each_safe(entry, n, head) {
part_tmp = list_entry(entry, struct part_info, link);
-#ifndef CONFIG_NEW_NAND_CODE
+#ifdef CFG_NAND_LEGACY
jffs2_free_cache(part_tmp);
#endif
list_del(entry);
@@ -732,7 +735,7 @@ static int device_validate(u8 type, u8 num, u32 *size)
} else if (type == MTD_DEV_TYPE_NAND) {
#if defined(CONFIG_JFFS2_NAND) && (CONFIG_COMMANDS & CFG_CMD_NAND)
if (num < CFG_MAX_NAND_DEVICE) {
-#ifdef CONFIG_NEW_NAND_CODE
+#ifndef CFG_NAND_LEGACY
*size = nand_info[num].size;
#else
extern struct nand_chip nand_dev_desc[CFG_MAX_NAND_DEVICE];