Patchwork [U-Boot] atmel_nand: fix the U-Boot output information about nand flash with PMECC enable.

login
register
mail settings
Submitter Wu, Josh
Date Sept. 10, 2012, 9:45 a.m.
Message ID <1347270349-10942-1-git-send-email-josh.wu@atmel.com>
Download mbox | patch
Permalink /patch/182838/
State Accepted
Delegated to: Andreas Bießmann
Headers show

Comments

Wu, Josh - Sept. 10, 2012, 9:45 a.m.
Before the patch, it looks like:
	|U-Boot 2012.07-00441-gd578d6f-dirty (Sep 10 2012 - 16:11:06)
	|
	|CPU: AT91SAM9G35
	|Crystal frequency:       12 MHz
	|CPU clock        :      400 MHz
	|Master clock     :  133.333 MHz
	|DRAM:  128 MiB
	|WARNING: Caches not enabled
>	|NAND:  Initialize PMECC params, cap: 2, sector: 512
>	|256 MiB
	|MMC:   mci: 0
	|In:    serial
	|Out:   serial
	|Err:   serial
	|Net:   macb0
	|Hit any key to stop autoboot:  0

After the patch:
	|U-Boot 2012.07-00441-gd578d6f-dirty (Sep 10 2012 - 16:18:11)
	|
	|CPU: AT91SAM9G35
	|Crystal frequency:       12 MHz
	|CPU clock        :      400 MHz
	|Master clock     :  133.333 MHz
	|DRAM:  128 MiB
	|WARNING: Caches not enabled
>	|NAND:  256 MiB
	|	... ...
	|Hit any key to stop autoboot:  0

Signed-off-by: Josh Wu <josh.wu@atmel.com>
---
 drivers/mtd/nand/atmel_nand.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
Andreas Bießmann - Sept. 13, 2012, 12:33 p.m.
Dear Josh Wu,

On 10.09.2012 11:45, Josh Wu wrote:
> Before the patch, it looks like:
> 	|U-Boot 2012.07-00441-gd578d6f-dirty (Sep 10 2012 - 16:11:06)
> 	|
> 	|CPU: AT91SAM9G35
> 	|Crystal frequency:       12 MHz
> 	|CPU clock        :      400 MHz
> 	|Master clock     :  133.333 MHz
> 	|DRAM:  128 MiB
> 	|WARNING: Caches not enabled
>> 	|NAND:  Initialize PMECC params, cap: 2, sector: 512
>> 	|256 MiB
> 	|MMC:   mci: 0
> 	|In:    serial
> 	|Out:   serial
> 	|Err:   serial
> 	|Net:   macb0
> 	|Hit any key to stop autoboot:  0
> 
> After the patch:
> 	|U-Boot 2012.07-00441-gd578d6f-dirty (Sep 10 2012 - 16:18:11)
> 	|
> 	|CPU: AT91SAM9G35
> 	|Crystal frequency:       12 MHz
> 	|CPU clock        :      400 MHz
> 	|Master clock     :  133.333 MHz
> 	|DRAM:  128 MiB
> 	|WARNING: Caches not enabled
>> 	|NAND:  256 MiB
> 	|	... ...
> 	|Hit any key to stop autoboot:  0
> 
> Signed-off-by: Josh Wu <josh.wu@atmel.com>
> ---

applied to u-boot-atmel/master, thanks!

Best regards

Andreas Bießmann

Patch

diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c
index c6aa5db..994dd9f 100644
--- a/drivers/mtd/nand/atmel_nand.c
+++ b/drivers/mtd/nand/atmel_nand.c
@@ -652,8 +652,9 @@  static int atmel_pmecc_nand_init_params(struct nand_chip *nand,
 	sector_size = host->pmecc_sector_size = CONFIG_PMECC_SECTOR_SIZE;
 	host->pmecc_index_table_offset = CONFIG_PMECC_INDEX_TABLE_OFFSET;
 
-	printk(KERN_INFO "Initialize PMECC params, cap: %d, sector: %d\n",
-		 cap, sector_size);
+	MTDDEBUG(MTD_DEBUG_LEVEL1,
+		"Initialize PMECC params, cap: %d, sector: %d\n",
+		cap, sector_size);
 
 	host->pmecc = (struct pmecc_regs __iomem *) ATMEL_BASE_PMECC;
 	host->pmerrloc = (struct pmecc_errloc_regs __iomem *)