All of lore.kernel.org
 help / color / mirror / Atom feed
From: Scott McNutt <smcnutt@psyent.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 5/5 v3] nios2: fix no flash, add nand and mmc init in board.c
Date: Thu, 22 Apr 2010 22:22:21 -0400	[thread overview]
Message-ID: <4BD1045D.7000908@psyent.com> (raw)
In-Reply-To: <1271928436-6681-1-git-send-email-thomas@wytron.com.tw>

Applied. Thanks.
--Scott

Thomas Chou wrote:
> This patch fixes error when CONFIG_SYS_NO_FLASH. And adds
> nand flash and mmc initialization, which should go before
> env initialization.
> 
> Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
> ---
> v3 include mmc.h and nand.h.
> v2 arch dir reorganized.
> 
>  arch/nios2/lib/board.c |   18 ++++++++++++++++++
>  1 files changed, 18 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/nios2/lib/board.c b/arch/nios2/lib/board.c
> index 8ec66a3..f83e691 100644
> --- a/arch/nios2/lib/board.c
> +++ b/arch/nios2/lib/board.c
> @@ -28,6 +28,7 @@
>  #include <stdio_dev.h>
>  #include <watchdog.h>
>  #include <malloc.h>
> +#include <mmc.h>
>  #include <net.h>
>  #ifdef CONFIG_STATUS_LED
>  #include <status_led.h>
> @@ -35,6 +36,9 @@
>  #if defined(CONFIG_SYS_NIOS_EPCSBASE)
>  #include <nios2-epcs.h>
>  #endif
> +#ifdef CONFIG_CMD_NAND
> +#include <nand.h>	/* cannot even include nand.h if it isnt configured */
> +#endif
>  
>  DECLARE_GLOBAL_DATA_PTR;
>  
> @@ -100,7 +104,9 @@ void board_init (void)
>  	bd = gd->bd;
>  	bd->bi_memstart	= CONFIG_SYS_SDRAM_BASE;
>  	bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
> +#ifndef CONFIG_SYS_NO_FLASH
>  	bd->bi_flashstart = CONFIG_SYS_FLASH_BASE;
> +#endif
>  #if	defined(CONFIG_SYS_SRAM_BASE) && defined(CONFIG_SYS_SRAM_SIZE)
>  	bd->bi_sramstart= CONFIG_SYS_SRAM_BASE;
>  	bd->bi_sramsize	= CONFIG_SYS_SRAM_SIZE;
> @@ -119,8 +125,20 @@ void board_init (void)
>  	/* The Malloc area is immediately below the monitor copy in RAM */
>  	mem_malloc_init(CONFIG_SYS_MALLOC_BASE, CONFIG_SYS_MALLOC_LEN);
>  
> +#ifndef CONFIG_SYS_NO_FLASH
>  	WATCHDOG_RESET ();
>  	bd->bi_flashsize = flash_init();
> +#endif
> +
> +#ifdef CONFIG_CMD_NAND
> +	puts("NAND:  ");
> +	nand_init();
> +#endif
> +
> +#ifdef CONFIG_GENERIC_MMC
> +	puts("MMC:   ");
> +	mmc_initialize(bd);
> +#endif
>  
>  	WATCHDOG_RESET ();
>  	env_relocate();

  reply	other threads:[~2010-04-23  2:22 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-31  0:50 [U-Boot] [PATCH 1/5] nios2: add nios2-generic board Thomas Chou
2010-03-31  0:50 ` [U-Boot] [PATCH 2/5] nios2: add Altera EP2C35 board Thomas Chou
2010-03-31  4:03   ` [U-Boot] [PATCH 2/5 v2] " Thomas Chou
2010-04-01 12:26     ` Thomas Chou
2010-04-05  5:48     ` Ben Warren
2010-03-31  4:03   ` [U-Boot] [PATCH 3/5 v2] nios2: add Altera EP3C120 board Thomas Chou
2010-04-02  1:33     ` [U-Boot] [PATCH 3/5 v3] " Thomas Chou
2010-04-02  6:57       ` Michal Simek
2010-04-15 14:40       ` Thomas Chou
2010-03-31  4:03   ` [U-Boot] [PATCH 4/5 v2] nios2: add Altera NEEK board Thomas Chou
2010-04-01 12:26     ` Thomas Chou
2010-04-05  5:50     ` Ben Warren
2010-04-01  7:17   ` [U-Boot] [PATCH 2/5] nios2: add Altera EP2C35 board Michal Simek
2010-04-01 12:24     ` Thomas Chou
2010-03-31  0:50 ` [U-Boot] [PATCH 3/5] nios2: add Altera EP3C120 board Thomas Chou
2010-03-31  0:50 ` [U-Boot] [PATCH 4/5] nios2: add Altera NEEK board Thomas Chou
2010-03-31  0:50 ` [U-Boot] [PATCH 5/5] nios2: fix no flash, add nand and mmc init in board.c Thomas Chou
2010-04-17 15:20   ` [U-Boot] [PATCH 5/5 v2] " Thomas Chou
2010-04-22  9:27   ` [U-Boot] [PATCH 5/5 v3] " Thomas Chou
2010-04-23  2:22     ` Scott McNutt [this message]
2010-04-15 14:55 ` [U-Boot] [PATCH v2] nios2: add nios2-generic board Thomas Chou
2010-04-16 10:40   ` Michal Simek
2010-04-17  9:53 ` [U-Boot] [PATCH 1/5 v3] " Thomas Chou
2010-04-21  0:40 ` [U-Boot] [PATCH 1/5 v4] " Thomas Chou

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=4BD1045D.7000908@psyent.com \
    --to=smcnutt@psyent.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.