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:
@@ -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 */
|
||||
|
||||
@@ -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 */
|
||||
|
||||
|
||||
@@ -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 */
|
||||
|
||||
|
||||
@@ -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 */
|
||||
|
||||
|
||||
@@ -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 */
|
||||
|
||||
|
||||
@@ -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 */
|
||||
|
||||
|
||||
16
drivers/nand_legacy/Makefile
Normal file
16
drivers/nand_legacy/Makefile
Normal 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
|
||||
1615
drivers/nand_legacy/nand_legacy.c
Normal file
1615
drivers/nand_legacy/nand_legacy.c
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user