All of lore.kernel.org
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/3] NAND FSL elbc: Use virt_to_phys to determine which bank is in use
Date: Mon, 24 Nov 2008 10:34:24 -0600	[thread overview]
Message-ID: <492AD790.7030803@freescale.com> (raw)
In-Reply-To: <1227543921-8713-1-git-send-email-galak@kernel.crashing.org>

Kumar Gala wrote:
> diff --git a/drivers/mtd/nand/fsl_elbc_nand.c b/drivers/mtd/nand/fsl_elbc_nand.c
> index 367c7d7..3f318e0 100644
> --- a/drivers/mtd/nand/fsl_elbc_nand.c
> +++ b/drivers/mtd/nand/fsl_elbc_nand.c
> @@ -718,7 +718,7 @@ static void fsl_elbc_ctrl_init(void)
>  int board_nand_init(struct nand_chip *nand)
>  {
>  	struct fsl_elbc_mtd *priv;
> -	uint32_t br, or;
> +	uint32_t br = 0, or = 0;

Which GCC version complains about this?  Seems like it's getting worse 
about false positives.

> @@ -737,11 +737,13 @@ int board_nand_init(struct nand_chip *nand)
>  	 * if we could pass more than one datum to the NAND driver...
>  	 */
>  	for (priv->bank = 0; priv->bank < MAX_BANKS; priv->bank++) {
> +		phys_addr_t base_addr = virt_to_phys(nand->IO_ADDR_R);
> +
>  		br = in_be32(&elbc_ctrl->regs->bank[priv->bank].br);
>  		or = in_be32(&elbc_ctrl->regs->bank[priv->bank].or);
>  
>  		if ((br & BR_V) && (br & BR_MSEL) == BR_MS_FCM &&
> -		    (br & or & BR_BA) == (phys_addr_t)nand->IO_ADDR_R)
> +		    (br & or & BR_BA) == BR_PHYS_ADDR(base_addr))

ACK to go via whichever tree the BR_PHYS_ADDR patch goes through.

-Scott

  reply	other threads:[~2008-11-24 16:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-24 16:25 [U-Boot] [PATCH 3/3] NAND FSL elbc: Use virt_to_phys to determine which bank is in use Kumar Gala
2008-11-24 16:34 ` Scott Wood [this message]
2008-11-24 16:36   ` Kumar Gala
  -- strict thread matches above, loose matches on Subject: below --
2008-12-16 20:59 [U-Boot] [PATCH 1/3] 85xx: Add support to populate addr map based on TLB settings Kumar Gala
2008-12-16 20:59 ` [U-Boot] [PATCH 2/3] ppc: Use addrmap in virt_to_phys and map_physmem Kumar Gala
2008-12-16 20:59   ` [U-Boot] [PATCH 3/3] NAND FSL elbc: Use virt_to_phys to determine which bank is in use Kumar Gala

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=492AD790.7030803@freescale.com \
    --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 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.