public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Thomas Lange <thomas@corelatus.se>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] ARM DaVinci: EMIF settings
Date: Sun, 03 May 2009 19:46:05 +0200	[thread overview]
Message-ID: <49FDD85D.1020604@corelatus.se> (raw)

NAND module should not modify EMIF registers unrelated to CS2
that is used for NAND, i.e. do not modify EWAIT config register
or registers for other Chip Selects.

Without this patch, EMIF configurations made in board_init()
will be invalidated.

Signed-off-by: Thomas Lange <thomas@corelatus.se>
---
 drivers/mtd/nand/davinci_nand.c |   12 +++---------
 1 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/drivers/mtd/nand/davinci_nand.c b/drivers/mtd/nand/davinci_nand.c
index a974667..8ef18b8 100644
--- a/drivers/mtd/nand/davinci_nand.c
+++ b/drivers/mtd/nand/davinci_nand.c
@@ -386,9 +386,6 @@ static int nand_davinci_waitfunc(struct mtd_info *mtd, struct nand_chip *this)
 static void nand_flash_init(void)
 {
 	u_int32_t	acfg1 = 0x3ffffffc;
-	u_int32_t	acfg2 = 0x3ffffffc;
-	u_int32_t	acfg3 = 0x3ffffffc;
-	u_int32_t	acfg4 = 0x3ffffffc;
 	emifregs	emif_regs;

 	/*------------------------------------------------------------------*
@@ -413,12 +410,9 @@ static void nand_flash_init(void)

 	emif_regs = (emifregs)DAVINCI_ASYNC_EMIF_CNTRL_BASE;

-	emif_regs->AWCCR |= 0x10000000;
-	emif_regs->AB1CR = acfg1;	/* 0x08244128 */;
-	emif_regs->AB2CR = acfg2;
-	emif_regs->AB3CR = acfg3;
-	emif_regs->AB4CR = acfg4;
-	emif_regs->NANDFCR = 0x00000101;
+	emif_regs->AB1CR = acfg1; /* CS2 */
+
+	emif_regs->NANDFCR = 0x00000101; /* NAND flash on CS2 */
 }

 int board_nand_init(struct nand_chip *nand)
-- 
1.5.6.5

             reply	other threads:[~2009-05-03 17:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-03 17:46 Thomas Lange [this message]
2009-05-31 12:03 ` [U-Boot] [PATCH] ARM DaVinci: EMIF settings Jean-Christophe PLAGNIOL-VILLARD
2009-06-03 21:12   ` David Brownell
2009-06-07 11:58 ` Jean-Christophe PLAGNIOL-VILLARD

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=49FDD85D.1020604@corelatus.se \
    --to=thomas@corelatus.se \
    --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