Skip to content

Commit 038cda3

Browse files
author
Ye Li
committed
MLK-19250 imx: uuu: Decouple mmc_get_env_dev with CONFIG_ENV_IS_IN_MMC
For flash devices, like spi nor, weim nor and qspi/flexspi, we don't define the ENV in MMC, but UUU fastboot always use the mmc_get_env_dev. So we have to decouple the function with CONFIG_ENV_IS_IN_MMC Signed-off-by: Ye Li <[email protected]> (cherry picked from commit ef48064) (cherry picked from commit 368e256) (cherry picked from commit 34ddce8) (cherry picked from commit 80913e7f20b4761875c3108609d510879bc710ef)
1 parent bb4a728 commit 038cda3

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

arch/arm/mach-imx/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ifeq ($(SOC),$(filter $(SOC),imx8m))
1313
ifneq ($(CONFIG_SPL_BUILD),y)
1414
obj-$(CONFIG_IMX_BOOTAUX) += imx_bootaux.o
1515
endif
16-
obj-$(CONFIG_ENV_IS_IN_MMC) += mmc_env.o
16+
obj-y += mmc_env.o
1717
obj-$(CONFIG_FEC_MXC) += mac.o
1818
obj-$(CONFIG_DWC_ETH_QOS) += mac.o
1919
obj-$(CONFIG_SYS_I2C_MXC) += i2c-mxv7.o
@@ -37,7 +37,7 @@ endif
3737
ifeq ($(SOC),$(filter $(SOC),mx7))
3838
obj-y += cpu.o
3939
obj-$(CONFIG_SYS_I2C_MXC) += i2c-mxv7.o
40-
obj-$(CONFIG_ENV_IS_IN_MMC) += mmc_env.o
40+
obj-y += mmc_env.o
4141
endif
4242
ifeq ($(SOC),$(filter $(SOC),mx7 imx8m))
4343
ifneq ($(CONFIG_SPL_BUILD),y)

arch/arm/mach-imx/imx8/cpu.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,6 @@ void get_board_serial(struct tag_serialnr *serialnr)
437437
}
438438
#endif /*CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG*/
439439

440-
#ifdef CONFIG_ENV_IS_IN_MMC
441440
__weak int board_mmc_get_env_dev(int devno)
442441
{
443442
return devno;
@@ -467,7 +466,6 @@ int mmc_get_env_dev(void)
467466

468467
return board_mmc_get_env_dev(devno);
469468
}
470-
#endif
471469

472470
#define MEMSTART_ALIGNMENT SZ_2M /* Align the memory start with 2MB */
473471

arch/arm/mach-imx/mx6/soc.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,10 @@ int arch_cpu_init(void)
632632
return 0;
633633
}
634634

635-
#ifdef CONFIG_ENV_IS_IN_MMC
635+
#ifndef CONFIG_SYS_MMC_ENV_DEV
636+
#define CONFIG_SYS_MMC_ENV_DEV -1
637+
#endif
638+
636639
__weak int board_mmc_get_env_dev(int devno)
637640
{
638641
return devno;
@@ -690,7 +693,6 @@ uint mmc_get_env_part(struct mmc *mmc)
690693
return board_mmc_get_env_part(devno);
691694
}
692695
#endif
693-
#endif
694696

695697
int board_postclk_init(void)
696698
{

env/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,7 @@ config SYS_RELOC_GD_ENV_ADDR
656656
config SYS_MMC_ENV_DEV
657657
int "mmc device number"
658658
depends on ENV_IS_IN_MMC || ENV_IS_IN_FAT || \
659-
CMD_MVEBU_BUBT || FMAN_ENET || QE || PHY_CORTINA
659+
CMD_MVEBU_BUBT || FMAN_ENET || QE || PHY_CORTINA || FSL_FASTBOOT
660660
default 0
661661
help
662662
MMC device number on the platform where the environment is stored.

0 commit comments

Comments
 (0)