Commit 42d21af4 authored by Ye Li's avatar Ye Li

MLK-19159 imx8mm_evk: Fix build break for flexspi defconfig

The flexspi defconfig uses CONFIG_ENV_IS_IN_SPI_FLASH not CONFIG_ENV_IS_IN_MMC.
So when fastboot is enabled for flexspi, the build break happens.

drivers/usb/gadget/built-in.o: In function `board_fastboot_setup':
/home/leyoen/Workspace/uboot-imx/drivers/usb/gadget/f_fastboot.c:1539: undefined reference to `mmc_get_env_dev'
drivers/usb/gadget/built-in.o: In function `_fastboot_setup_dev':
/home/leyoen/Workspace/uboot-imx/drivers/usb/gadget/f_fastboot.c:1260: undefined reference to `mmc_get_env_dev'
drivers/usb/gadget/built-in.o: In function `get_single_var':
/home/leyoen/Workspace/uboot-imx/drivers/usb/gadget/f_fastboot.c:2935: undefined reference to `mmc_get_env_dev'
drivers/usb/gadget/built-in.o: In function `bcb_rw_block':
/home/leyoen/Workspace/uboot-imx/drivers/usb/gadget/bcb.c:120: undefined reference to `mmc_get_env_dev'

Fix the issue by decoupling mmc_get_env_dev function with CONFIG_ENV_IS_IN_MMC
Signed-off-by: 's avatarYe Li <ye.li@nxp.com>
(cherry picked from commit 2716f9a325681737593b3a6e79f94576a35067c2)
parent 7212602a
......@@ -373,7 +373,6 @@ bool is_usb_boot(void)
return get_boot_device() == USB_BOOT;
}
#ifdef CONFIG_ENV_IS_IN_MMC
__weak int board_mmc_get_env_dev(int devno)
{
return CONFIG_SYS_MMC_ENV_DEV;
......@@ -393,7 +392,6 @@ int mmc_get_env_dev(void)
return board_mmc_get_env_dev(devno);
}
#endif
#ifdef CONFIG_SERIAL_TAG
void get_board_serial(struct tag_serialnr *serialnr)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment