Re-factoring the legacy NAND code (legacy NAND now only in board-specific

code and in SoC code). Boards using the old way have CFG_NAND_LEGACY and
BOARDLIBS = drivers/nand_legacy/libnand_legacy.a added. Build breakage for
NETTA.ERR and NETTA_ISDN - will go away when the new NAND support is
implemented for these boards.
This commit is contained in:
Bartlomiej Sieka
2006-03-05 18:57:33 +01:00
parent 038ccac511
commit addb2e1650
86 changed files with 2881 additions and 2712 deletions

View File

@@ -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 */

View File

@@ -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 */

View File

@@ -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);
}
@@ -2660,5 +2663,3 @@ void nand_release (struct mtd_info *mtd)
}
#endif
#endif /* CONFIG_NEW_NAND_CODE */

View File

@@ -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 */

View File

@@ -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 */

View File

@@ -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 */

View File

@@ -0,0 +1,16 @@
include $(TOPDIR)/config.mk
LIB := libnand_legacy.a
OBJS := nand_legacy.o
all: $(LIB)
$(LIB): $(OBJS)
$(AR) crv $@ $(OBJS)
#########################################################################
.depend: Makefile $(OBJS:.o=.c)
$(CC) -M $(CFLAGS) $(OBJS:.o=.c) > $@
sinclude .depend

File diff suppressed because it is too large Load Diff