public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 5/5] ARM: at91: atmel_nand: add code to check the ONFI parameter ECC requirement
Date: Thu, 20 Jun 2013 15:57:04 -0500	[thread overview]
Message-ID: <1371761824.11064.15@snotra> (raw)
In-Reply-To: <1371466281-31922-6-git-send-email-josh.wu@atmel.com> (from josh.wu@atmel.com on Mon Jun 17 05:51:21 2013)

On 06/17/2013 05:51:21 AM, Josh Wu wrote:
> +static int pmecc_choose_ecc(struct atmel_nand_host *host,
> +		struct nand_chip *chip,
> +		int *cap, int *sector_size)
> +{
> +	/* Get ECC requirement from ONFI parameters */
> +	*cap = *sector_size = 0;
> +	if (chip->onfi_version) {
> +		if (!get_onfi_ecc_param(chip, cap, sector_size))
> +			pr_debug("ONFI params, minimum required ECC: %d  
> bits in %d bytes\n",
> +				*cap, *sector_size);
> +		else
> +			dev_info(NULL, "NAND chip ECC reqirement is in  
> Extended ONFI parameter, we don't support yet.\n");
> +	} else {
> +		dev_info(NULL, "NAND chip is not ONFI compliant, assume  
> ecc_bits is 2 in 512 bytes");
> +	}

Don't pass NULL to dev_info().  Either pass host->dev as the Linux code  
does (and use dev_dbg rather than pr_debug), or just use printf() (and  
debug()) if there's no intent to sync this change back to Linux.  It  
doesn't matter if host->dev doesn't exist in U-Boot, as the macro  
doesn't use that parameter, but the only reason to use Linux-style  
prints is to keep the code common with Linux.

-Scott

  reply	other threads:[~2013-06-20 20:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-17 10:51 [U-Boot] [PATCH v2 0/5] ARM: at91: atmel_nand: check ONFI ecc minimum requirement Josh Wu
2013-06-17 10:51 ` [U-Boot] [PATCH v2 1/5] ARM: at91: atmel_nand: pmecc driver will select the galois table by sector size Josh Wu
2013-06-17 10:51 ` [U-Boot] [PATCH v2 2/5] ARM: at91: sama5d3: remove unused definition about PMECC alpha table offset Josh Wu
2013-06-17 10:51 ` [U-Boot] [PATCH v2 3/5] linux/compat.h: move dev_err, dev_info and dev_dbg from usb driver to compat.h Josh Wu
2013-06-17 10:51 ` [U-Boot] [PATCH v2 4/5] mtd: atmel_nand: alloc memory instead of use static array for pmecc data Josh Wu
2013-06-17 10:51 ` [U-Boot] [PATCH v2 5/5] ARM: at91: atmel_nand: add code to check the ONFI parameter ECC requirement Josh Wu
2013-06-20 20:57   ` Scott Wood [this message]
2013-06-25  6:33     ` Josh Wu
2013-06-25 15:10       ` Scott Wood

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1371761824.11064.15@snotra \
    --to=scottwood@freescale.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox