All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] ARM DaVinci: EMIF settings
@ 2009-05-03 17:46 Thomas Lange
  2009-05-31 12:03 ` Jean-Christophe PLAGNIOL-VILLARD
  2009-06-07 11:58 ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 2 replies; 4+ messages in thread
From: Thomas Lange @ 2009-05-03 17:46 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] ARM DaVinci: EMIF settings
  2009-05-03 17:46 [U-Boot] [PATCH] ARM DaVinci: EMIF settings Thomas Lange
@ 2009-05-31 12:03 ` Jean-Christophe PLAGNIOL-VILLARD
  2009-06-03 21:12   ` David Brownell
  2009-06-07 11:58 ` Jean-Christophe PLAGNIOL-VILLARD
  1 sibling, 1 reply; 4+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2009-05-31 12:03 UTC (permalink / raw)
  To: u-boot

On 19:46 Sun 03 May     , Thomas Lange wrote:
> 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>
> ---
David, Sandeep
is one of you can test it on some boards too?

Best Regards,
J.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] ARM DaVinci: EMIF settings
  2009-05-31 12:03 ` Jean-Christophe PLAGNIOL-VILLARD
@ 2009-06-03 21:12   ` David Brownell
  0 siblings, 0 replies; 4+ messages in thread
From: David Brownell @ 2009-06-03 21:12 UTC (permalink / raw)
  To: u-boot

On Sunday 31 May 2009, Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 19:46 Sun 03 May     , Thomas Lange wrote:
> > 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>
> > ---
> David, Sandeep
> is one of you can test it on some boards too?

I'd just merge it as-is (it builds, yes?).

That code is *extremely* dubious already, and the boards
using that driver only use NAND on CS2.  Code reconfiguring
other chipselects is broken.

That code is already dm6446-specific.  I have one dm6446
board, which only uses CS2 ... so the only error I could
turn up would be a build error.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] ARM DaVinci: EMIF settings
  2009-05-03 17:46 [U-Boot] [PATCH] ARM DaVinci: EMIF settings Thomas Lange
  2009-05-31 12:03 ` Jean-Christophe PLAGNIOL-VILLARD
@ 2009-06-07 11:58 ` Jean-Christophe PLAGNIOL-VILLARD
  1 sibling, 0 replies; 4+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2009-06-07 11:58 UTC (permalink / raw)
  To: u-boot

On 19:46 Sun 03 May     , Thomas Lange wrote:
> 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(-)
applied to arm/next

Best Regards,
J.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-06-07 11:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-03 17:46 [U-Boot] [PATCH] ARM DaVinci: EMIF settings Thomas Lange
2009-05-31 12:03 ` Jean-Christophe PLAGNIOL-VILLARD
2009-06-03 21:12   ` David Brownell
2009-06-07 11:58 ` Jean-Christophe PLAGNIOL-VILLARD

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.