public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 4/4] Environment in MMC
Date: Fri, 14 May 2010 13:56:04 +0530	[thread overview]
Message-ID: <014f01caf33f$17c731a0$475594e0$@raj@ti.com> (raw)
In-Reply-To: <1273657107-7148-4-git-send-email-alagusankar@embwise.com>

Hi Alagu,

On Wed, May 12, 2010 at 15:08:27, Alagu Sankar wrote:
> This patch is to save environment data to mmc card. It uses interfaces defined
> in generic MMC framework.  This is enabled with CONFIG_ENV_IS_IN_MMC option.
> Based on the earlier patch from Terry Lv at Freescale
> 
> Signed-off-by: Alagu Sankar <alagusankar@embwise.com>
> ---
>  arch/arm/lib/board.c     |   10 ++--
>  arch/powerpc/lib/board.c |   12 ++--
>  common/Makefile          |    1 +
>  common/cmd_nvedit.c      |    3 +-
>  common/env_mmc.c         |  168 ++++++++++++++++++++++++++++++++++++++++++++++
>  include/environment.h    |   18 +++++
>  6 files changed, 200 insertions(+), 12 deletions(-)
>  create mode 100644 common/env_mmc.c
> 
> diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
> index f5660a9..5e7558e 100644
> --- a/arch/arm/lib/board.c
> +++ b/arch/arm/lib/board.c
> @@ -338,6 +338,11 @@ void start_armboot (void)
>  	nand_init();		/* go init the NAND */
>  #endif
>  
> +#ifdef CONFIG_GENERIC_MMC
> +	puts ("MMC:   ");
> +	mmc_initialize (gd->bd);
> +#endif
> +

Why this has been moved up? If there is any genuine reason for this, then
you can mention it in patch description.

>  #if defined(CONFIG_CMD_ONENAND)
>  	onenand_init();
>  #endif
> @@ -419,11 +424,6 @@ extern void davinci_eth_set_mac_addr (const u_int8_t *addr);
>  	board_late_init ();
>  #endif
>  
> -#ifdef CONFIG_GENERIC_MMC
> -	puts ("MMC:   ");
> -	mmc_initialize (gd->bd);
> -#endif
> -
>  #ifdef CONFIG_BITBANGMII
>  	bb_miiphy_init();
>  #endif
> diff --git a/arch/powerpc/lib/board.c b/arch/powerpc/lib/board.c
> index 7b09fb5..1008635 100644
> --- a/arch/powerpc/lib/board.c
> +++ b/arch/powerpc/lib/board.c
> @@ -783,6 +783,12 @@ void board_init_r (gd_t *id, ulong dest_addr)
>  	nand_init();		/* go init the NAND */
>  #endif
>  
> +#ifdef CONFIG_GENERIC_MMC
> +	WATCHDOG_RESET ();
> +	puts ("MMC:  ");
> +	mmc_initialize (bd);
> +#endif
> +

The above comment applies here as well.

>  	/* relocate environment function pointers etc. */
>  	env_relocate ();
>  
> @@ -939,12 +945,6 @@ void board_init_r (gd_t *id, ulong dest_addr)
>  	scsi_init ();
>  #endif
>  
> -#ifdef CONFIG_GENERIC_MMC
> -	WATCHDOG_RESET ();
> -	puts ("MMC:  ");
> -	mmc_initialize (bd);
> -#endif
> -
>  #if defined(CONFIG_CMD_DOC)
>  	WATCHDOG_RESET ();
>  	puts ("DOC:   ");
> diff --git a/common/Makefile b/common/Makefile
> index dbf7a05..2c37073 100644
> --- a/common/Makefile
> +++ b/common/Makefile
> @@ -58,6 +58,7 @@ COBJS-$(CONFIG_ENV_IS_IN_FLASH) += env_embedded.o
>  COBJS-$(CONFIG_ENV_IS_IN_NVRAM) += env_embedded.o
>  COBJS-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o
>  COBJS-$(CONFIG_ENV_IS_IN_MG_DISK) += env_mgdisk.o
> +COBJS-$(CONFIG_ENV_IS_IN_MMC) += env_mmc.o
>  COBJS-$(CONFIG_ENV_IS_IN_NAND) += env_nand.o
>  COBJS-$(CONFIG_ENV_IS_IN_NVRAM) += env_nvram.o
>  COBJS-$(CONFIG_ENV_IS_IN_ONENAND) += env_onenand.o
> diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c
> index eb89e9e..27e46f7 100644
> --- a/common/cmd_nvedit.c
> +++ b/common/cmd_nvedit.c
> @@ -63,9 +63,10 @@ DECLARE_GLOBAL_DATA_PTR;
>      !defined(CONFIG_ENV_IS_IN_NVRAM)	&& \
>      !defined(CONFIG_ENV_IS_IN_ONENAND)	&& \
>      !defined(CONFIG_ENV_IS_IN_SPI_FLASH)	&& \
> +    !defined(CONFIG_ENV_IS_IN_MMC)	&& \
>      !defined(CONFIG_ENV_IS_NOWHERE)
>  # error Define one of CONFIG_ENV_IS_IN_{EEPROM|FLASH|DATAFLASH|ONENAND|\
> -SPI_FLASH|MG_DISK|NVRAM|NOWHERE}
> +SPI_FLASH|MG_DISK|NVRAM|MMC|NOWHERE}
>  #endif
>  
>  #define XMK_STR(x)	#x
> diff --git a/common/env_mmc.c b/common/env_mmc.c
> new file mode 100644
> index 0000000..ef7e5fb
> --- /dev/null
> +++ b/common/env_mmc.c
> @@ -0,0 +1,168 @@
> +/*
> + * (C) Copyright 2008-2009 Freescale Semiconductor, Inc.
> + * (C) Copyright 2000-2006
> + * Wolfgang Denk, DENX Software Engineering, w... at denx.de.
> + *

I do not see your copyright here.

Regards,
Sudhakar

  parent reply	other threads:[~2010-05-14  8:26 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-12  9:38 [U-Boot] [PATCH 1/4] SD1.00 wide-bus fix Alagu Sankar
2010-05-12  9:38 ` [U-Boot] [PATCH 2/4] MMC Card Capacity Bug Fix Alagu Sankar
2010-05-12  9:38   ` [U-Boot] [PATCH 3/4] MMC Multi-block Support Alagu Sankar
2010-05-12  9:38     ` [U-Boot] [PATCH 4/4] Environment in MMC Alagu Sankar
2010-05-13  7:08       ` Lv Terry-R65388
2010-05-14  8:26       ` Sudhakar Rajashekhara [this message]
2010-05-14  9:52         ` Wolfgang Denk
2010-05-14 10:02         ` Stefano Babic
2010-05-14 10:54           ` Alagu Sankar
2010-05-14 11:40             ` Stefano Babic
2010-05-14 11:54               ` Alagu Sankar
2010-05-17  7:31               ` Lv Terry-R65388
2010-05-14 17:37     ` [U-Boot] [PATCH 3/4] MMC Multi-block Support Andy Fleming
2010-09-13  7:51       ` Lei Wen
2010-10-04 20:32       ` John Rigby
2010-10-14 21:44         ` Steve Sakoman
2010-10-14 21:53           ` Paulraj, Sandeep
2010-10-23 15:14           ` Ghorai, Sukumar
2010-10-25 17:29             ` Steve Sakoman
2010-10-25 18:19               ` Ghorai, Sukumar
2010-05-14  8:16   ` [U-Boot] [PATCH 2/4] MMC Card Capacity Bug Fix Sudhakar Rajashekhara
2010-05-14 17:32   ` Andy Fleming
2010-05-13 15:13 ` [U-Boot] [PATCH 1/4] SD1.00 wide-bus fix Paulraj, Sandeep
2010-05-14 17:30 ` Andy Fleming
2010-09-09 22:21   ` John Rigby

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='014f01caf33f$17c731a0$475594e0$@raj@ti.com' \
    --to=sudhakar.raj@ti.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox