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] Davinci: Configurable NAND chip selects
Date: Wed, 18 Nov 2009 14:22:16 -0600	[thread overview]
Message-ID: <20091118202216.GA15517@loki.buserror.net> (raw)
In-Reply-To: <4B0190C3.3060007@gefanuc.com>

On Mon, Nov 16, 2009 at 05:49:55PM +0000, Nick Thompson wrote:
>  static void nand_davinci_enable_hwecc(struct mtd_info *mtd, int mode)
>  {
> -	int		dummy;
> +	u_int32_t	val;
>  
> -	dummy = emif_regs->NANDF1ECC;
> +	val = readl(&emif_regs->NANDF1ECC);

"val =" can be omitted, which would keep it clear that it is a dummy read.

> -	/* FIXME:  only chipselect 0 is supported for now */
> -	emif_regs->NANDFCR |= 1 << 8;
> +	val = readl(&emif_regs->NANDFCR);
> +	val |= DAVINCI_NANDFCR_1BIT_ECC_START(CONFIG_SYS_NAND_CS);
> +	writel(val, &emif_regs->NANDFCR);

Do you need to clear the bit corresponding to the previous chipselect?

Otherwise, ACK.

-Scott

  parent reply	other threads:[~2009-11-18 20:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-16 17:49 [U-Boot] [PATCH] Davinci: Configurable NAND chip selects Nick Thompson
2009-11-16 18:02 ` Paulraj, Sandeep
2009-11-17  9:24   ` Nick Thompson
2009-11-18 20:22 ` Scott Wood [this message]
2009-11-18 20:38   ` Paulraj, Sandeep
2009-11-18 21:18   ` Wolfgang Denk
2009-11-19  9:57   ` Nick Thompson

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=20091118202216.GA15517@loki.buserror.net \
    --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