]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
xilinx: Return ENVL_NOWHERE instead of ENVL_UNKNOWN
authorMike Looijmans <mike.looijmans@topic.nl>
Fri, 2 Jul 2021 08:28:36 +0000 (10:28 +0200)
committerMichal Simek <michal.simek@xilinx.com>
Mon, 26 Jul 2021 07:18:45 +0000 (09:18 +0200)
The system refuses to boot without any environment, so return ENVL_NOWHERE when
there's nowhere to store the environment instead of ENVL_UNKNOWN.

This fixes that the board won't boot from eMMC when CONFIG_ENV_IS_IN_FAT is not
defined, for example. Similar for other combinations.

Fixes: 1025bd098aa8 "xilinx: zynqmp: Add support for saving variables"
Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
board/xilinx/zynq/board.c
board/xilinx/zynqmp/zynqmp.c

index e2e9b3f0f78c3d4d5139a639e7ed1048da8c2059..61e0a90c119b65b33e417fc70ee9dc793bbfb099 100644 (file)
@@ -134,18 +134,18 @@ enum env_location env_get_location(enum env_operation op, int prio)
                        return ENVL_FAT;
                if (IS_ENABLED(CONFIG_ENV_IS_IN_EXT4))
                        return ENVL_EXT4;
-               return ENVL_UNKNOWN;
+               return ENVL_NOWHERE;
        case ZYNQ_BM_NAND:
                if (IS_ENABLED(CONFIG_ENV_IS_IN_NAND))
                        return ENVL_NAND;
                if (IS_ENABLED(CONFIG_ENV_IS_IN_UBI))
                        return ENVL_UBI;
-               return ENVL_UNKNOWN;
+               return ENVL_NOWHERE;
        case ZYNQ_BM_NOR:
        case ZYNQ_BM_QSPI:
                if (IS_ENABLED(CONFIG_ENV_IS_IN_SPI_FLASH))
                        return ENVL_SPI_FLASH;
-               return ENVL_UNKNOWN;
+               return ENVL_NOWHERE;
        case ZYNQ_BM_JTAG:
        default:
                return ENVL_NOWHERE;
index 1748fec2e4d9b2c8d6941415b64a8e63fe0437a6..18d5c515def12199c560ab1056c3744562d41447 100644 (file)
@@ -797,18 +797,18 @@ enum env_location env_get_location(enum env_operation op, int prio)
                        return ENVL_FAT;
                if (IS_ENABLED(CONFIG_ENV_IS_IN_EXT4))
                        return ENVL_EXT4;
-               return ENVL_UNKNOWN;
+               return ENVL_NOWHERE;
        case NAND_MODE:
                if (IS_ENABLED(CONFIG_ENV_IS_IN_NAND))
                        return ENVL_NAND;
                if (IS_ENABLED(CONFIG_ENV_IS_IN_UBI))
                        return ENVL_UBI;
-               return ENVL_UNKNOWN;
+               return ENVL_NOWHERE;
        case QSPI_MODE_24BIT:
        case QSPI_MODE_32BIT:
                if (IS_ENABLED(CONFIG_ENV_IS_IN_SPI_FLASH))
                        return ENVL_SPI_FLASH;
-               return ENVL_UNKNOWN;
+               return ENVL_NOWHERE;
        case JTAG_MODE:
        default:
                return ENVL_NOWHERE;