All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve Chen <schen@mvista.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] ARM DaVinci: Adding CONFIG options for NAND ALE and CLE
Date: Tue, 28 Apr 2009 15:54:08 -0500	[thread overview]
Message-ID: <1240952049.3101.94.camel@linux-1lbu> (raw)
In-Reply-To: <1240950794-30050-1-git-send-email-s-paulraj@ti.com>

On Tue, 2009-04-28 at 16:33 -0400, s-paulraj at ti.com wrote:
> The CLE and ALE for DaVinci DM644x is not the same as DM646x. This patch
> adds 2 CONFIG_ options to the config.h header files to all the DM6446 based
> boards. These values are then used by the driver. This has been tested on the
> DM644x, DM355, DM357 and DM365. Support for the latter 3 will be added soon.
> 
> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
> ---
>  drivers/mtd/nand/davinci_nand.c          |    6 +++---
>  include/asm-arm/arch-davinci/nand_defs.h |    9 ++++-----
>  include/configs/davinci_dvevm.h          |    2 ++
>  include/configs/davinci_schmoogie.h      |    2 ++
>  include/configs/davinci_sffsdr.h         |    2 ++
>  include/configs/davinci_sonata.h         |    2 ++
>  6 files changed, 15 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/mtd/nand/davinci_nand.c b/drivers/mtd/nand/davinci_nand.c
> index a974667..dcc0f39 100644
> --- a/drivers/mtd/nand/davinci_nand.c
> +++ b/drivers/mtd/nand/davinci_nand.c
> @@ -54,13 +54,13 @@ static void nand_davinci_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int c
>  	struct		nand_chip *this = mtd->priv;
>  	u_int32_t	IO_ADDR_W = (u_int32_t)this->IO_ADDR_W;
>  
> -	IO_ADDR_W &= ~(MASK_ALE|MASK_CLE);
> +	IO_ADDR_W &= ~(CONFIG_MASK_ALE | CONFIG_MASK_CLE);
>  
>  	if (ctrl & NAND_CTRL_CHANGE) {
>  		if ( ctrl & NAND_CLE )
> -			IO_ADDR_W |= MASK_CLE;
> +			IO_ADDR_W |= CONFIG_MASK_CLE;
>  		if ( ctrl & NAND_ALE )
> -			IO_ADDR_W |= MASK_ALE;
> +			IO_ADDR_W |= CONFIG_MASK_ALE;

When I modified this code in the MV kernel, I remember having to use +=
and -= instead of |= and &=.  The reason is tha DM6467 CLE/ALE mask has
large enough that the bits overlaps IO_ADDR_W.

  reply	other threads:[~2009-04-28 20:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-28 20:33 [U-Boot] [PATCH] ARM DaVinci: Adding CONFIG options for NAND ALE and CLE s-paulraj at ti.com
2009-04-28 20:54 ` Steve Chen [this message]
2009-04-28 20:57   ` Paulraj, Sandeep
2009-04-28 21:22 ` Scott Wood
2009-04-29  0:02   ` Paulraj, Sandeep
2009-04-28 21:51 ` David Brownell
2009-04-29  0:32   ` Paulraj, Sandeep
2009-04-29  2:03     ` David Brownell

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=1240952049.3101.94.camel@linux-1lbu \
    --to=schen@mvista.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.