diff mbox

[U-Boot] NAND: Remove ONFI detection message to from bootup log

Message ID 1336462170-21112-1-git-send-email-sr@denx.de
State Accepted
Commit e52fee9b04157c3f5bd73bb122e95d0c6ebb2270
Delegated to: Scott Wood
Headers show

Commit Message

Stefan Roese May 8, 2012, 7:29 a.m. UTC
Without this patch, boot shows this messages upon NAND detection:

NAND:  ONFI flash detected
ONFI param page 0 valid
ONFI flash detected
ONFI param page 0 valid
128 MiB

With this patch, its back to the U-Boot "standard":

NAND:  128 MiB

Tested on x600 (SPEAr600).

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Amit Virdi <amit.virdi@st.com>
Cc: Vipin Kumar <vipin.kumar@st.com>
Cc: Scott Wood <scottwood@freescale.com>
---
 drivers/mtd/nand/nand_base.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Amit Virdi May 9, 2012, 9:29 a.m. UTC | #1
Stefan,

On 5/8/2012 12:59 PM, Stefan Roese wrote:
> Without this patch, boot shows this messages upon NAND detection:
>
> NAND:  ONFI flash detected
> ONFI param page 0 valid
> ONFI flash detected
> ONFI param page 0 valid
> 128 MiB
>
> With this patch, its back to the U-Boot "standard":
>
> NAND:  128 MiB
>
> Tested on x600 (SPEAr600).
>
> Signed-off-by: Stefan Roese<sr@denx.de>
> Cc: Amit Virdi<amit.virdi@st.com>
> Cc: Vipin Kumar<vipin.kumar@st.com>
> Cc: Scott Wood<scottwood@freescale.com>
> ---
>   drivers/mtd/nand/nand_base.c |    5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
> index bef79be..bfd668f 100644
> --- a/drivers/mtd/nand/nand_base.c
> +++ b/drivers/mtd/nand/nand_base.c
> @@ -2530,13 +2530,14 @@ static int nand_flash_detect_onfi(struct mtd_info *mtd, struct nand_chip *chip,
>   		chip->read_byte(mtd) != 'F' || chip->read_byte(mtd) != 'I')
>   		return 0;
>
> -	printk(KERN_INFO "ONFI flash detected\n");
> +	MTDDEBUG(MTD_DEBUG_LEVEL0, "ONFI flash detected\n");
>   	chip->cmdfunc(mtd, NAND_CMD_PARAM, 0, -1);
>   	for (i = 0; i<  3; i++) {
>   		chip->read_buf(mtd, (uint8_t *)p, sizeof(*p));
>   		if (onfi_crc16(ONFI_CRC_BASE, (uint8_t *)p, 254) ==
>   				le16_to_cpu(p->crc)) {
> -			printk(KERN_INFO "ONFI param page %d valid\n", i);
> +			MTDDEBUG(MTD_DEBUG_LEVEL0,
> +				 "ONFI param page %d valid\n", i);
>   			break;
>   		}
>   	}

Acked-by: Amit Virdi <amit.virdi@st.com>

Regards
Amit Virdi
Scott Wood May 18, 2012, 11:19 p.m. UTC | #2
On Mon, May 07, 2012 at 09:29:30PM -0000, Stefan Roese wrote:
> Without this patch, boot shows this messages upon NAND detection:
> 
> NAND:  ONFI flash detected
> ONFI param page 0 valid
> ONFI flash detected
> ONFI param page 0 valid
> 128 MiB
> 
> With this patch, its back to the U-Boot "standard":
> 
> NAND:  128 MiB
> 
> Tested on x600 (SPEAr600).
> 
> Signed-off-by: Stefan Roese <sr@denx.de>
> Cc: Amit Virdi <amit.virdi@st.com>
> Cc: Vipin Kumar <vipin.kumar@st.com>
> Cc: Scott Wood <scottwood@freescale.com>
> Acked-by: Amit Virdi <amit.virdi@st.com>
> 
> ---
> drivers/mtd/nand/nand_base.c |    5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)

Applied to u-boot-nand-flash.

BTW, I don't see any boards enabling the ONFI code at the moment...

-Scott
stefan@roese.nl May 21, 2012, 10:50 p.m. UTC | #3
On Fri, 18 May 2012 18:19:34 -0500, Scott Wood 
 <scottwood@freescale.com> wrote:
> On Mon, May 07, 2012 at 09:29:30PM -0000, Stefan Roese wrote:
>> Without this patch, boot shows this messages upon NAND detection:
>>
>> NAND:  ONFI flash detected
>> ONFI param page 0 valid
>> ONFI flash detected
>> ONFI param page 0 valid
>> 128 MiB
>>
>> With this patch, its back to the U-Boot "standard":
>>
>> NAND:  128 MiB
>>
>> Tested on x600 (SPEAr600).
>>
>> Signed-off-by: Stefan Roese <sr@denx.de>
>> Cc: Amit Virdi <amit.virdi@st.com>
>> Cc: Vipin Kumar <vipin.kumar@st.com>
>> Cc: Scott Wood <scottwood@freescale.com>
>> Acked-by: Amit Virdi <amit.virdi@st.com>
>>
>> ---
>> drivers/mtd/nand/nand_base.c |    5 +++--
>>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> Applied to u-boot-nand-flash.

 Thanks.
 
> BTW, I don't see any boards enabling the ONFI code at the moment...

 The pending (already posted) SPEAr patches will use it.

 Thanks,
 Stefan
diff mbox

Patch

diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index bef79be..bfd668f 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -2530,13 +2530,14 @@  static int nand_flash_detect_onfi(struct mtd_info *mtd, struct nand_chip *chip,
 		chip->read_byte(mtd) != 'F' || chip->read_byte(mtd) != 'I')
 		return 0;
 
-	printk(KERN_INFO "ONFI flash detected\n");
+	MTDDEBUG(MTD_DEBUG_LEVEL0, "ONFI flash detected\n");
 	chip->cmdfunc(mtd, NAND_CMD_PARAM, 0, -1);
 	for (i = 0; i < 3; i++) {
 		chip->read_buf(mtd, (uint8_t *)p, sizeof(*p));
 		if (onfi_crc16(ONFI_CRC_BASE, (uint8_t *)p, 254) ==
 				le16_to_cpu(p->crc)) {
-			printk(KERN_INFO "ONFI param page %d valid\n", i);
+			MTDDEBUG(MTD_DEBUG_LEVEL0,
+				 "ONFI param page %d valid\n", i);
 			break;
 		}
 	}