u-boot/board/xilinx/versal
Michal Simek 097ccdf962 xilinx: Do not call private env_get_location() when !ENV_IS_NOWHERE
Private function for finding out location of environment is not working
when ENV_IS_NOWHERE is disabled.
The reason is that current fallback is ENVL_UNKNOWN when
CONFIG_ENV_IS_NOWHERE is not enabled. The code could be updated like this

-               return ENVL_NOWHERE;
+               if (IS_ENABLED(CONFIG_ENV_IS_NOWHERE))
+                       return ENVL_NOWHERE;
+               return ENVL_UNKNOWN;

But then boot is still not working because ENVL_UNKNOWN has no driver and
env_init() returns -ENODEV. That's why it is better not to define board
specific env_get_location() because then weak env_get_location() is used
which is going over env_locations[] and returning locations which are
actually enabled in u-boot instance.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/830b9c93d30688cfa8a5cbb0388e79deb7731f29.1711107795.git.michal.simek@amd.com
2024-04-02 15:07:22 +02:00
..
board.c xilinx: Do not call private env_get_location() when !ENV_IS_NOWHERE 2024-04-02 15:07:22 +02:00
cmds.c treewide: Tidy up semicolon after command macros 2023-12-13 11:51:24 -05:00
Kconfig xilinx: versal: Add new versal loadpdi command 2020-08-20 09:49:20 +02:00
MAINTAINERS .mailmap: Start to use new amd.com email address 2022-04-19 14:51:11 -04:00
Makefile arm64: zynqmp: Switch to amd.com emails 2023-07-21 09:00:38 +02:00