From 54ea563dbe1804e426afbbf0710ffa815551d92b Mon Sep 17 00:00:00 2001 From: Peng Fan Date: Tue, 23 Feb 2016 12:45:20 +0800 Subject: MLK-12434-2: mx6qarm2: dynamic setting mmcdev and mmcroot Dynamic setting mmcdev and mmcroot for mx6qarm2. Signed-off-by: Peng Fan --- board/freescale/mx6qarm2/mx6qarm2.c | 17 ++++++++++++++++- include/configs/mx6qarm2.h | 3 ++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/board/freescale/mx6qarm2/mx6qarm2.c b/board/freescale/mx6qarm2/mx6qarm2.c index 5aae721..8563836 100644 --- a/board/freescale/mx6qarm2/mx6qarm2.c +++ b/board/freescale/mx6qarm2/mx6qarm2.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2011 Freescale Semiconductor, Inc. + * Copyright (C) 2010-2016 Freescale Semiconductor, Inc. * * SPDX-License-Identifier: GPL-2.0+ */ @@ -17,6 +17,7 @@ #include #include #include +#include DECLARE_GLOBAL_DATA_PTR; @@ -115,6 +116,11 @@ int board_mmc_get_env_dev(int devno) return devno - 2; } +int mmc_map_to_kernel_blk(int devno) +{ + return devno + 2; +} + int board_mmc_getcd(struct mmc *mmc) { struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv; @@ -276,6 +282,15 @@ int board_init(void) return 0; } +int board_late_init(void) +{ +#ifdef CONFIG_ENV_IS_IN_MMC + board_late_mmc_env_init(); +#endif + + return 0; +} + int checkboard(void) { #ifdef CONFIG_MX6DL diff --git a/include/configs/mx6qarm2.h b/include/configs/mx6qarm2.h index 86a0316..a88587b 100644 --- a/include/configs/mx6qarm2.h +++ b/include/configs/mx6qarm2.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2011 Freescale Semiconductor, Inc. + * Copyright (C) 2010-2016 Freescale Semiconductor, Inc. * * Configuration settings for the Freescale i.MX6Q Armadillo2 board. * @@ -45,6 +45,7 @@ "mmcdev=1\0" \ "mmcpart=1\0" \ "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \ + "mmcautodetect=yes\0" \ "mmcargs=setenv bootargs console=${console},${baudrate} " \ "root=${mmcroot}\0" \ "loadbootscript=" \ -- cgit v1.1