public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Josh Wu <josh.wu@atmel.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/3] ARM: at91: sama5: move the sd/mmc env config to at91-sama5_common.h
Date: Wed, 19 Aug 2015 10:21:34 +0800	[thread overview]
Message-ID: <55D3E82E.2060702@atmel.com> (raw)
In-Reply-To: <1436267300-2293-1-git-send-email-josh.wu@atmel.com>

Hi, Andreas

Any feedback for this patch serials.

Best Regards,
Josh Wu

On 7/7/2015 7:08 PM, Josh Wu wrote:
> As almost all sama5 sd/mmc env configurations are same, so move them to
> at91-sama5_common.h.
>
> Also we define a KERNEL_DTB_FILE_NAME as dtb file name for different
> board.
>
> Signed-off-by: Josh Wu <josh.wu@atmel.com>
> ---
> Hi,
>
> Those patches depends on the patch: http://patchwork.ozlabs.org/patch/485339/
>
> Best Regards,
> Josh Wu
>
>   include/configs/at91-sama5_common.h | 17 +++++++++++++++++
>   include/configs/sama5d3_xplained.h  | 12 +++---------
>   include/configs/sama5d3xek.h        | 10 +---------
>   include/configs/sama5d4_xplained.h  | 20 +++-----------------
>   include/configs/sama5d4ek.h         | 18 +++---------------
>   5 files changed, 27 insertions(+), 50 deletions(-)
>
> diff --git a/include/configs/at91-sama5_common.h b/include/configs/at91-sama5_common.h
> index 9289964..99fa0b1 100644
> --- a/include/configs/at91-sama5_common.h
> +++ b/include/configs/at91-sama5_common.h
> @@ -56,6 +56,23 @@
>   #define CONFIG_CMD_DHCP
>   
>   #ifdef CONFIG_SYS_USE_MMC
> +/* u-boot env in sd/mmc card */
> +#define CONFIG_ENV_IS_IN_FAT
> +#define CONFIG_FAT_WRITE
> +#define FAT_ENV_INTERFACE	"mmc"
> +#define FAT_ENV_DEVICE_AND_PART	"0"
> +#define FAT_ENV_FILE		"uboot.env"
> +#define CONFIG_ENV_SIZE		0x4000
> +
> +#ifdef KERNEL_DTB_FILE_NAME
> +#define CONFIG_BOOT_DTB_COMMAND	"fatload mmc 0:1 0x21000000 " KERNEL_DTB_FILE_NAME  "; "
> +#else
> +#define CONFIG_BOOT_DTB_COMMAND	"fatload mmc 0:1 0x21000000 ${ek_name}.dtb; "
> +#endif
> +
> +#define CONFIG_BOOTCOMMAND	CONFIG_BOOT_DTB_COMMAND			\
> +				"fatload mmc 0:1 0x22000000 zImage; "	\
> +				"bootz 0x22000000 - 0x21000000"
>   #define CONFIG_BOOTARGS							\
>   	"console=ttyS0,115200 earlyprintk "				\
>   	"root=/dev/mmcblk0p2 rw rootwait"
> diff --git a/include/configs/sama5d3_xplained.h b/include/configs/sama5d3_xplained.h
> index c4141a0..e5de24b 100644
> --- a/include/configs/sama5d3_xplained.h
> +++ b/include/configs/sama5d3_xplained.h
> @@ -13,6 +13,8 @@
>   /* No NOR flash, this definition should put before common header */
>   #define CONFIG_SYS_NO_FLASH
>   
> +#define KERNEL_DTB_FILE_NAME	"at91-sama5d3_xplained.dtb"
> +
>   #include "at91-sama5_common.h"
>   
>   /* serial console */
> @@ -124,15 +126,7 @@
>   				"nand read 0x22000000 0x200000 0x600000;" \
>   				"bootz 0x22000000 - 0x21000000"
>   #elif CONFIG_SYS_USE_MMC
> -/* bootstrap + u-boot + env in sd card */
> -#define CONFIG_ENV_IS_IN_FAT
> -#define FAT_ENV_INTERFACE	"mmc"
> -#define FAT_ENV_FILE		"uboot.env"
> -#define FAT_ENV_DEVICE_AND_PART	"0"
> -#define CONFIG_ENV_SIZE		0x4000
> -#define CONFIG_BOOTCOMMAND	"fatload mmc 0:1 0x21000000 at91-sama5d3_xplained.dtb; " \
> -				"fatload mmc 0:1 0x22000000 zImage; " \
> -				"bootz 0x22000000 - 0x21000000"
> +/* override the bootcmd, bootargs and other configuration for sd/mmc env */
>   #else
>   #define CONFIG_ENV_IS_NOWHERE
>   #endif
> diff --git a/include/configs/sama5d3xek.h b/include/configs/sama5d3xek.h
> index 344ae9c..71441a4 100644
> --- a/include/configs/sama5d3xek.h
> +++ b/include/configs/sama5d3xek.h
> @@ -176,15 +176,7 @@
>   				"nand read 0x22000000 0x200000 0x600000;" \
>   				"bootm 0x22000000 - 0x21000000"
>   #elif CONFIG_SYS_USE_MMC
> -/* bootstrap + u-boot + env in sd card */
> -#define CONFIG_ENV_IS_IN_FAT
> -#define FAT_ENV_INTERFACE	"mmc"
> -#define FAT_ENV_FILE		"uboot.env"
> -#define FAT_ENV_DEVICE_AND_PART	"0"
> -#define CONFIG_ENV_SIZE		0x4000
> -#define CONFIG_BOOTCOMMAND	"fatload mmc 0:1 0x21000000 ${ek_name}.dtb; " \
> -				"fatload mmc 0:1 0x22000000 zImage; " \
> -				"bootm 0x22000000 - 0x21000000"
> +/* override the bootcmd, bootargs and other configuration for sd/mmc env */
>   #else
>   #define CONFIG_ENV_IS_NOWHERE
>   #endif
> diff --git a/include/configs/sama5d4_xplained.h b/include/configs/sama5d4_xplained.h
> index 5fb621e..a7d9e78 100644
> --- a/include/configs/sama5d4_xplained.h
> +++ b/include/configs/sama5d4_xplained.h
> @@ -13,6 +13,8 @@
>   /* No NOR flash, this definition should put before common header */
>   #define CONFIG_SYS_NO_FLASH
>   
> +#define KERNEL_DTB_FILE_NAME		"at91-sama5d4_xplained.dtb"
> +
>   #include "at91-sama5_common.h"
>   
>   /* serial console */
> @@ -139,25 +141,9 @@
>   				"nand read 0x22000000 0x200000 0x600000;" \
>   				"bootz 0x22000000 - 0x21000000"
>   #elif CONFIG_SYS_USE_MMC
> -/* bootstrap + u-boot + env in sd card */
> -#define CONFIG_ENV_IS_IN_FAT
> -#define CONFIG_FAT_WRITE
> -#define FAT_ENV_INTERFACE	"mmc"
> -/*
> - * We don't specify the part number, if device 0 has partition table, it means
> - * the first partition; it no partition table, then take whole device as a
> - * FAT file system.
> - */
> -#define FAT_ENV_DEVICE_AND_PART	"0"
> -#define FAT_ENV_FILE		"uboot.env"
> -#define CONFIG_ENV_SIZE		0x4000
> -#define CONFIG_BOOTCOMMAND	"fatload mmc 0:1 0x21000000 at91-sama5d4_xplained.dtb; " \
> -				"fatload mmc 0:1 0x22000000 zImage; " \
> -				"bootz 0x22000000 - 0x21000000"
> +/* override the bootcmd, bootargs and other configuration for sd/mmc env */
>   #endif
>   
> -
> -
>   /* SPL */
>   #define CONFIG_SPL_FRAMEWORK
>   #define CONFIG_SPL_TEXT_BASE		0x200000
> diff --git a/include/configs/sama5d4ek.h b/include/configs/sama5d4ek.h
> index 546d7a3..8ecb6d3 100644
> --- a/include/configs/sama5d4ek.h
> +++ b/include/configs/sama5d4ek.h
> @@ -13,6 +13,8 @@
>   /* No NOR flash, this definition should put before common header */
>   #define CONFIG_SYS_NO_FLASH
>   
> +#define KERNEL_DTB_FILE_NAME	"sama5d4ek.dtb"
> +
>   #include "at91-sama5_common.h"
>   
>   /* serial console */
> @@ -137,21 +139,7 @@
>   				"nand read 0x22000000 0x200000 0x600000;" \
>   				"bootz 0x22000000 - 0x21000000"
>   #elif CONFIG_SYS_USE_MMC
> -/* bootstrap + u-boot + env in sd card */
> -#define CONFIG_ENV_IS_IN_FAT
> -#define CONFIG_FAT_WRITE
> -#define FAT_ENV_INTERFACE	"mmc"
> -/*
> - * We don't specify the part number, if device 0 has partition table, it means
> - * the first partition; it no partition table, then take whole device as a
> - * FAT file system.
> - */
> -#define FAT_ENV_DEVICE_AND_PART	"0"
> -#define FAT_ENV_FILE		"uboot.env"
> -#define CONFIG_ENV_SIZE		0x4000
> -#define CONFIG_BOOTCOMMAND	"fatload mmc 0:1 0x21000000 sama5d4ek.dtb; " \
> -				"fatload mmc 0:1 0x22000000 zImage; " \
> -				"bootz 0x22000000 - 0x21000000"
> +/* override the bootcmd, bootargs and other configuration for sd/mmc env */
>   #endif
>   
>   /* SPL */

  parent reply	other threads:[~2015-08-19  2:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-07 11:08 [U-Boot] [PATCH 1/3] ARM: at91: sama5: move the sd/mmc env config to at91-sama5_common.h Josh Wu
2015-07-07 11:08 ` [U-Boot] [PATCH 2/3] ARM: at91: sama5: move the nandflash " Josh Wu
2015-07-07 11:08 ` [U-Boot] [PATCH 3/3] ARM: at91: sama5: update the spi flash mapping Josh Wu
2015-08-13 19:04   ` Jagan Teki
2015-08-19  2:21 ` Josh Wu [this message]
2015-08-19  7:40 ` [U-Boot] [PATCH 1/3] ARM: at91: sama5: move the sd/mmc env config to at91-sama5_common.h Andreas Bießmann
2015-08-19  8:10   ` Josh Wu

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=55D3E82E.2060702@atmel.com \
    --to=josh.wu@atmel.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