[U-Boot] [PATCH 3/4] mtd/nand: remove CONFIG_SYS_NAND_ONFI_DETECTION to enable ONFI detection
Shengzhou Liu
Shengzhou.Liu at freescale.com
Fri Dec 2 10:17:16 CET 2011
We should first try ONFI detection, if ONFI is not supported or fails,
then try to check nand_flash_ids table.
Signed-off-by: Shengzhou Liu <Shengzhou.Liu at freescale.com>
---
drivers/mtd/nand/nand_base.c | 9 ---------
include/linux/mtd/nand.h | 2 --
2 files changed, 0 insertions(+), 11 deletions(-)
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 8d03f54..383da76 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -2415,7 +2415,6 @@ static void nand_set_defaults(struct nand_chip *chip, int busw)
chip->controller = &chip->hwcontrol;
}
-#ifdef CONFIG_SYS_NAND_ONFI_DETECTION
static u16 onfi_crc16(u16 crc, u8 const *p, size_t len)
{
int i;
@@ -2493,14 +2492,6 @@ static int nand_flash_detect_onfi(struct mtd_info *mtd,
return 1;
}
-#else
-static inline int nand_flash_detect_onfi(struct mtd_info *mtd,
- struct nand_chip *chip,
- int *busw)
-{
- return 0;
-}
-#endif
static void nand_flash_detect_non_onfi(struct mtd_info *mtd,
struct nand_chip *chip,
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index 987a2ec..e61149e 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -472,9 +472,7 @@ struct nand_chip {
uint8_t cellinfo;
int badblockpos;
int onfi_version;
-#ifdef CONFIG_SYS_NAND_ONFI_DETECTION
struct nand_onfi_params onfi_params;
-#endif
int state;
--
1.6.4
More information about the U-Boot
mailing list