diff options
author | Fabio Estevam <festevam@denx.de> | 2022-04-21 15:05:23 -0300 |
---|---|---|
committer | Joao Paulo Goncalves <joao.goncalves@toradex.com> | 2023-09-12 15:36:16 -0300 |
commit | 62c1c11d51483c12a4869d7dbdf47c8b0fa733c3 (patch) | |
tree | f30ab8faa9138acb56fb8c6fabb7227d65d4ea6a | |
parent | 812e7c7fc743afb08cbbf1be1709795c21909efa (diff) |
imx8mn/8mp: Allow booting via USB
When trying to boot via USB on i.MX8MN it is necessary to specify
the U-Boot environment location, otherwise the boot process simply
hangs.
Specify the environment location when booting from USB.
Tested on a imx8mn-evk.
Upstream-Status: Backport [d175982c207bb2ace592d7985cd3f05ab99759d9]
Suggested-by: Michael Nazzareno Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Fabio Estevam <festevam@denx.de>
Tested-by: Tim Harvey <tharvey@gateworks.com>
-rw-r--r-- | arch/arm/mach-imx/imx8m/soc.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach-imx/imx8m/soc.c index abda062776..c2f6acdde7 100644 --- a/arch/arm/mach-imx/imx8m/soc.c +++ b/arch/arm/mach-imx/imx8m/soc.c @@ -1761,6 +1761,16 @@ enum env_location env_get_location(enum env_operation op, int prio) return ENVL_UNKNOWN; switch (dev) { + case USB_BOOT: + if (IS_ENABLED(CONFIG_ENV_IS_IN_SPI_FLASH)) + return ENVL_SPI_FLASH; + if (IS_ENABLED(CONFIG_ENV_IS_IN_NAND)) + return ENVL_NAND; + if (IS_ENABLED(CONFIG_ENV_IS_IN_MMC)) + return ENVL_MMC; + if (IS_ENABLED(CONFIG_ENV_IS_NOWHERE)) + return ENVL_NOWHERE; + return ENVL_UNKNOWN; case QSPI_BOOT: if (IS_ENABLED(CONFIG_ENV_IS_IN_SPI_FLASH)) return ENVL_SPI_FLASH; |