public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] nand_spl: nand_boot.c: Init nand_chip.options to 0
@ 2011-05-04  9:44 Stefan Roese
  2011-05-04 17:30 ` Scott Wood
  2011-05-13 16:16 ` Scott Wood
  0 siblings, 2 replies; 4+ messages in thread
From: Stefan Roese @ 2011-05-04  9:44 UTC (permalink / raw)
  To: u-boot

Patch 65a9db7b [nand_spl: Fix large page nand_command()] broke
nand booting on canyonlands. "options" has to be initialized to
0. If not, boards might have the NAND_BUSWIDTH_16 bit set,
resulting in wrong offset calculation.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Alex Waterman <awaterman@dawning.com>
---
 nand_spl/nand_boot.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/nand_spl/nand_boot.c b/nand_spl/nand_boot.c
index cefeb91..62303aa 100644
--- a/nand_spl/nand_boot.c
+++ b/nand_spl/nand_boot.c
@@ -232,6 +232,7 @@ void nand_boot(void)
 	nand_info.priv = &nand_chip;
 	nand_chip.IO_ADDR_R = nand_chip.IO_ADDR_W = (void  __iomem *)CONFIG_SYS_NAND_BASE;
 	nand_chip.dev_ready = NULL;	/* preset to NULL */
+	nand_chip.options = 0;
 	board_nand_init(&nand_chip);
 
 	if (nand_chip.select_chip)
-- 
1.7.5

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

* [U-Boot] [PATCH] nand_spl: nand_boot.c: Init nand_chip.options to 0
  2011-05-04  9:44 [U-Boot] [PATCH] nand_spl: nand_boot.c: Init nand_chip.options to 0 Stefan Roese
@ 2011-05-04 17:30 ` Scott Wood
  2011-05-06 13:12   ` Stefan Roese
  2011-05-13 16:16 ` Scott Wood
  1 sibling, 1 reply; 4+ messages in thread
From: Scott Wood @ 2011-05-04 17:30 UTC (permalink / raw)
  To: u-boot

On Wed, 4 May 2011 11:44:44 +0200
Stefan Roese <sr@denx.de> wrote:

> Patch 65a9db7b [nand_spl: Fix large page nand_command()] broke
> nand booting on canyonlands. "options" has to be initialized to
> 0. If not, boards might have the NAND_BUSWIDTH_16 bit set,
> resulting in wrong offset calculation.
> 
> Signed-off-by: Stefan Roese <sr@denx.de>
> Cc: Scott Wood <scottwood@freescale.com>
> Cc: Alex Waterman <awaterman@dawning.com>
> ---
>  nand_spl/nand_boot.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/nand_spl/nand_boot.c b/nand_spl/nand_boot.c
> index cefeb91..62303aa 100644
> --- a/nand_spl/nand_boot.c
> +++ b/nand_spl/nand_boot.c
> @@ -232,6 +232,7 @@ void nand_boot(void)
>  	nand_info.priv = &nand_chip;
>  	nand_chip.IO_ADDR_R = nand_chip.IO_ADDR_W = (void  __iomem *)CONFIG_SYS_NAND_BASE;
>  	nand_chip.dev_ready = NULL;	/* preset to NULL */
> +	nand_chip.options = 0;
>  	board_nand_init(&nand_chip);
>  
>  	if (nand_chip.select_chip)

Maybe nand_chip should be made static so it goes in the BSS?  This would
avoid any other such problems, without adding any extra code to zero things
out.

-Scott

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

* [U-Boot] [PATCH] nand_spl: nand_boot.c: Init nand_chip.options to 0
  2011-05-04 17:30 ` Scott Wood
@ 2011-05-06 13:12   ` Stefan Roese
  0 siblings, 0 replies; 4+ messages in thread
From: Stefan Roese @ 2011-05-06 13:12 UTC (permalink / raw)
  To: u-boot

On Wednesday 04 May 2011 19:30:29 Scott Wood wrote:
> > +	nand_chip.options = 0;
> >  	board_nand_init(&nand_chip);
> >  	
> >  	if (nand_chip.select_chip)
> 
> Maybe nand_chip should be made static so it goes in the BSS?  This would
> avoid any other such problems, without adding any extra code to zero things
> out.

Yes, good idea. I tried it but it resulted in a bigger image instead of a 
smaller one. I need to investigate further to see why this is the case...

Cheers,
Stefan

--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de

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

* [U-Boot] [PATCH] nand_spl: nand_boot.c: Init nand_chip.options to 0
  2011-05-04  9:44 [U-Boot] [PATCH] nand_spl: nand_boot.c: Init nand_chip.options to 0 Stefan Roese
  2011-05-04 17:30 ` Scott Wood
@ 2011-05-13 16:16 ` Scott Wood
  1 sibling, 0 replies; 4+ messages in thread
From: Scott Wood @ 2011-05-13 16:16 UTC (permalink / raw)
  To: u-boot

On Wed, May 04, 2011 at 11:44:44AM +0200, Stefan Roese wrote:
> Patch 65a9db7b [nand_spl: Fix large page nand_command()] broke
> nand booting on canyonlands. "options" has to be initialized to
> 0. If not, boards might have the NAND_BUSWIDTH_16 bit set,
> resulting in wrong offset calculation.
> 
> Signed-off-by: Stefan Roese <sr@denx.de>
> Cc: Scott Wood <scottwood@freescale.com>
> Cc: Alex Waterman <awaterman@dawning.com>
> ---
>  nand_spl/nand_boot.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)

Applied to u-boot-nand-flash

-Scott

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

end of thread, other threads:[~2011-05-13 16:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-04  9:44 [U-Boot] [PATCH] nand_spl: nand_boot.c: Init nand_chip.options to 0 Stefan Roese
2011-05-04 17:30 ` Scott Wood
2011-05-06 13:12   ` Stefan Roese
2011-05-13 16:16 ` Scott Wood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox