diff mbox

[U-Boot,3/5,v2] mtd/nand: remove CONFIG_SYS_NAND_ONFI_DETECTION to enable ONFI detection

Message ID 1323683398-11001-3-git-send-email-Shengzhou.Liu@freescale.com
State Rejected
Headers show

Commit Message

Shengzhou Liu Dec. 12, 2011, 9:49 a.m. UTC
remove CONFIG_SYS_NAND_ONFI_DETECTION to enable ONFI detection.

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
---
 drivers/mtd/nand/nand_base.c |    9 ---------
 include/linux/mtd/nand.h     |    2 --
 2 files changed, 0 insertions(+), 11 deletions(-)

Comments

Scott Wood Dec. 12, 2011, 6:42 p.m. UTC | #1
On 12/12/2011 03:49 AM, Shengzhou Liu wrote:
> remove CONFIG_SYS_NAND_ONFI_DETECTION to enable ONFI detection.
> 
> Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>

Why?

-Scott
Scott Wood Dec. 14, 2011, 6:08 p.m. UTC | #2
On 12/13/2011 08:37 PM, Liu Shengzhou-B36685 wrote:
> 
>> -----Original Message-----
>> From: Wood Scott-B07421
>> Sent: Tuesday, December 13, 2011 2:42 AM
>> To: Liu Shengzhou-B36685
>> Cc: u-boot@lists.denx.de; Gala Kumar-B11780
>> Subject: Re: [PATCH 3/5 v2] mtd/nand: remove
>> CONFIG_SYS_NAND_ONFI_DETECTION to enable ONFI detection
>>
>> On 12/12/2011 03:49 AM, Shengzhou Liu wrote:
>>> remove CONFIG_SYS_NAND_ONFI_DETECTION to enable ONFI detection.
>>>
>>> Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
>>
>> Why?
>>
>> -Scott
> 
> [Shengzhou] 
> There is not necessity to CONFIG_SYS_NAND_ONFI_DETECTION now. 
> We should always enable ONFI detection as what Linux does.

Linux has fewer concerns about code size than U-Boot does.

-Scott
diff mbox

Patch

diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index fd38477..80c9e5c 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 1cdc7ae..fc35102 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;