summaryrefslogtreecommitdiff
path: root/drivers/nand
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 /drivers/nand
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 'drivers/nand')
-rw-r--r--drivers/nand/diskonchip.c7
-rw-r--r--drivers/nand/nand.c7
-rw-r--r--drivers/nand/nand_base.c11
-rw-r--r--drivers/nand/nand_bbt.c7
-rw-r--r--drivers/nand/nand_ecc.c7
-rw-r--r--drivers/nand/nand_ids.c7
6 files changed, 27 insertions, 19 deletions
diff --git a/drivers/nand/diskonchip.c b/drivers/nand/diskonchip.c
index 07e2549..afaae83 100644
--- a/drivers/nand/diskonchip.c
+++ b/drivers/nand/diskonchip.c
@@ -20,7 +20,11 @@
*/
#include <common.h>
-#ifdef CONFIG_NEW_NAND_CODE
+
+#ifdef CFG_NAND_LEGACY
+#error CFG_NAND_LEGACY defined in a file not using the legacy NAND support!
+#endif
+
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/sched.h>
@@ -1782,4 +1786,3 @@ module_exit(cleanup_nanddoc);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("David Woodhouse <dwmw2@infradead.org>");
MODULE_DESCRIPTION("M-Systems DiskOnChip 2000, Millennium and Millennium Plus device driver\n");
-#endif /* CONFIG_NEW_NAND_CODE */
diff --git a/drivers/nand/nand.c b/drivers/nand/nand.c
index bc85005..dd80026 100644
--- a/drivers/nand/nand.c
+++ b/drivers/nand/nand.c
@@ -23,7 +23,10 @@
#include <common.h>
-#ifdef CONFIG_NEW_NAND_CODE
+#ifdef CFG_NAND_LEGACY
+#error CFG_NAND_LEGACY defined in a file not using the legacy NAND support!
+#endif
+
#if (CONFIG_COMMANDS & CFG_CMD_NAND)
#include <nand.h>
@@ -72,5 +75,3 @@ void nand_init(void)
}
#endif
-#endif /* CONFIG_NEW_NAND_CODE */
-
diff --git a/drivers/nand/nand_base.c b/drivers/nand/nand_base.c
index d6c84fb..d91d90b 100644
--- a/drivers/nand/nand_base.c
+++ b/drivers/nand/nand_base.c
@@ -71,7 +71,10 @@
#endif
#include <common.h>
-#ifdef CONFIG_NEW_NAND_CODE
+
+#ifdef CFG_NAND_LEGACY
+#error CFG_NAND_LEGACY defined in a file not using the legacy NAND support!
+#endif
#if (CONFIG_COMMANDS & CFG_CMD_NAND)
@@ -864,10 +867,10 @@ static int nand_wait(struct mtd_info *mtd, struct nand_chip *this, int state)
break;
}
}
-
- /* XXX nand device 1 on dave (PPChameleonEVB) needs more time */
+#ifdef PPCHAMELON_NAND_TIMER_HACK
reset_timer();
while (get_timer(0) < 10);
+#endif /* PPCHAMELON_NAND_TIMER_HACK */
return this->read_byte(mtd);
}
@@ -2663,5 +2666,3 @@ void nand_release (struct mtd_info *mtd)
}
#endif
-#endif /* CONFIG_NEW_NAND_CODE */
-
diff --git a/drivers/nand/nand_bbt.c b/drivers/nand/nand_bbt.c
index f481308..ac16872 100644
--- a/drivers/nand/nand_bbt.c
+++ b/drivers/nand/nand_bbt.c
@@ -54,7 +54,10 @@
#include <common.h>
-#ifdef CONFIG_NEW_NAND_CODE
+#ifdef CFG_NAND_LEGACY
+#error CFG_NAND_LEGACY defined in a file not using the legacy NAND support!
+#endif
+
#if (CONFIG_COMMANDS & CFG_CMD_NAND)
#include <malloc.h>
@@ -1051,5 +1054,3 @@ int nand_isbad_bbt (struct mtd_info *mtd, loff_t offs, int allowbbt)
}
#endif
-#endif /* CONFIG_NEW_NAND_CODE */
-
diff --git a/drivers/nand/nand_ecc.c b/drivers/nand/nand_ecc.c
index 4e610c1..e0d0e8b 100644
--- a/drivers/nand/nand_ecc.c
+++ b/drivers/nand/nand_ecc.c
@@ -37,7 +37,10 @@
#include <common.h>
-#ifdef CONFIG_NEW_NAND_CODE
+#ifdef CFG_NAND_LEGACY
+#error CFG_NAND_LEGACY defined in a file not using the legacy NAND support!
+#endif
+
#if (CONFIG_COMMANDS & CFG_CMD_NAND)
#include<linux/mtd/mtd.h>
@@ -243,5 +246,3 @@ int nand_correct_data(struct mtd_info *mtd, u_char *dat, u_char *read_ecc, u_cha
}
#endif /* CONFIG_COMMANDS & CFG_CMD_NAND */
-#endif /* CONFIG_NEW_NAND_CODE */
-
diff --git a/drivers/nand/nand_ids.c b/drivers/nand/nand_ids.c
index d355326..3d4d372 100644
--- a/drivers/nand/nand_ids.c
+++ b/drivers/nand/nand_ids.c
@@ -13,7 +13,10 @@
#include <common.h>
-#ifdef CONFIG_NEW_NAND_CODE
+#ifdef CFG_NAND_LEGACY
+#error CFG_NAND_LEGACY defined in a file not using the legacy NAND support!
+#endif
+
#if (CONFIG_COMMANDS & CFG_CMD_NAND)
#include <linux/mtd/nand.h>
@@ -127,5 +130,3 @@ struct nand_manufacturers nand_manuf_ids[] = {
{0x0, "Unknown"}
};
#endif
-#endif /* CONFIG_NEW_NAND_CODE */
-