[U-Boot] [PATCH 1/5] board/BuR/brxre1: fix MMC boot

Jean-Jacques Hiblot jjhiblot at ti.com
Tue Jun 13 13:46:53 UTC 2017



On 13/06/2017 14:11, Hannes Schmelzer wrote:
> since commit
>
> 'd5abcf94c7123167725fc22ace342f0d455093c1' -
> ti: boot: Register the MMC controllers in SPL in the same way as in u-boot
>
> MMC boot on brxre1 board is broken, with this commit we make our board
> working again.
>
> Signed-off-by: Hannes Schmelzer <hannes.schmelzer at br-automation.com>

Reviewed-by: Jean-Jacques Hiblot <jjhiblot at ti.com>
>
> ---
>
>   board/BuR/common/common.c |  7 ++++++-
>   include/configs/brxre1.h  | 12 ++++++------
>   2 files changed, 12 insertions(+), 7 deletions(-)
>
> diff --git a/board/BuR/common/common.c b/board/BuR/common/common.c
> index b1ae079..e8c6401 100644
> --- a/board/BuR/common/common.c
> +++ b/board/BuR/common/common.c
> @@ -687,7 +687,12 @@ int board_eth_init(bd_t *bis)
>   #if defined(CONFIG_MMC)
>   int board_mmc_init(bd_t *bis)
>   {
> -	return omap_mmc_init(1, 0, 0, -1, -1);
> +	int rc = 0;
> +
> +	rc |= omap_mmc_init(0, 0, 0, -1, -1);
> +	rc |= omap_mmc_init(1, 0, 0, -1, -1);
> +
> +	return rc;
>   }
>   #endif
>   int overwrite_console(void)
> diff --git a/include/configs/brxre1.h b/include/configs/brxre1.h
> index 5814d74..a96232d 100644
> --- a/include/configs/brxre1.h
> +++ b/include/configs/brxre1.h
> @@ -53,21 +53,21 @@ BUR_COMMON_ENV \
>   "vx_romfsbase=0x800E0000\0" \
>   "vx_romfssize=0x20000\0" \
>   "vx_memtop=0x8FBEF000\0" \
> -"loadromfs=mmc read ${vx_romfsbase} 700 100\0" \
> +"loadromfs=mmc dev 1; mmc read ${vx_romfsbase} 700 100\0" \
>   "autoload=0\0" \
>   "loadaddr=0x80100000\0" \
>   "logoaddr=0x82000000\0" \
>   "defaultARlen=0x8000\0" \
> -"loaddefaultAR=mmc read ${loadaddr} 800 ${defaultARlen}\0" \
> +"loaddefaultAR=mmc dev 1; mmc read ${loadaddr} 800 ${defaultARlen}\0" \
>   "defaultAR=run loadromfs; run loaddefaultAR; bootvx ${loadaddr}\0" \
> -"logo0=fatload mmc 0:1 ${logoaddr} SYSTEM/ADDON/Bootlogo/Bootlogo.bmp.gz && " \
> +"logo0=fatload mmc 1:1 ${logoaddr} SYSTEM/ADDON/Bootlogo/Bootlogo.bmp.gz && " \
>   	"bmp display ${logoaddr} 0 0\0" \
> -"logo1=fatload mmc 0:1 ${logoaddr} SYSTEM/BASE/Bootlogo/Bootlogo.bmp.gz && " \
> +"logo1=fatload mmc 1:1 ${logoaddr} SYSTEM/BASE/Bootlogo/Bootlogo.bmp.gz && " \
>   	"bmp display ${logoaddr} 0 0\0" \
>   "mmcboot=echo booting AR from eMMC-flash ...; "\
>   	"run logo0 || run logo1; " \
>   	"run loadromfs; " \
> -	"fatload mmc 0:1 ${loadaddr} arimg && bootvx ${loadaddr}; " \
> +	"fatload mmc 1:1 ${loadaddr} arimg && bootvx ${loadaddr}; " \
>   	"run defaultAR;\0" \
>   "netboot=echo booting AR from network ...; " \
>   	"run loadromfs; " \
> @@ -113,7 +113,7 @@ BUR_COMMON_ENV \
>   
>   #undef CONFIG_ENV_IS_NOWHERE
>   #define CONFIG_ENV_IS_IN_MMC
> -#define CONFIG_SYS_MMC_ENV_DEV		0
> +#define CONFIG_SYS_MMC_ENV_DEV		1
>   #define CONFIG_SYS_MMC_ENV_PART		2
>   #define CONFIG_ENV_OFFSET		0x40000	/* TODO: Adresse definieren */
>   #define CONFIG_ENV_OFFSET_REDUND	(CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)



More information about the U-Boot mailing list