diff options
| author | Marek Vasut <[email protected]> | 2025-03-19 04:28:27 +0100 |
|---|---|---|
| committer | Fabio Estevam <[email protected]> | 2025-03-24 08:55:48 -0300 |
| commit | 31896508d8df4a87ecc09af6c6c61d8b1b5046af (patch) | |
| tree | bedccf05ef4b562cb1fb7c723e7241290cf17bb1 /board/dhelectronics | |
| parent | 2a7ab5f6c644e28387ac6d0111bc66d7fb49679a (diff) | |
arm64: imx8mp: Gracefully handle disabled ENV_IS_IN_SPI_FLASH
In case ENV_IS_IN_SPI_FLASH is disabled, returning ENVL_SPI_FLASH
leads to failure to find environment driver on start up. Fix this
by testing whether ENV_IS_IN_SPI_FLASH is enabled and if not, then
return ENVL_NOWHERE instead.
Signed-off-by: Marek Vasut <[email protected]>
Diffstat (limited to 'board/dhelectronics')
| -rw-r--r-- | board/dhelectronics/dh_imx8mp/imx8mp_dhcom_pdk2.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/board/dhelectronics/dh_imx8mp/imx8mp_dhcom_pdk2.c b/board/dhelectronics/dh_imx8mp/imx8mp_dhcom_pdk2.c index 4af3cbe9fe2..4275436b128 100644 --- a/board/dhelectronics/dh_imx8mp/imx8mp_dhcom_pdk2.c +++ b/board/dhelectronics/dh_imx8mp/imx8mp_dhcom_pdk2.c @@ -186,5 +186,7 @@ int board_late_init(void) enum env_location env_get_location(enum env_operation op, int prio) { - return prio ? ENVL_UNKNOWN : ENVL_SPI_FLASH; + return prio ? ENVL_UNKNOWN : CONFIG_IS_ENABLED(ENV_IS_IN_SPI_FLASH, + (ENVL_SPI_FLASH), + (ENVL_NOWHERE)); } |
