All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xilinx: zynq, zynqmp: Return ENVL_NOWHERE instead of ENVL_UNKNOWN
@ 2021-07-02  8:28 Mike Looijmans
  2021-07-09  6:33 ` Michal Simek
  0 siblings, 1 reply; 2+ messages in thread
From: Mike Looijmans @ 2021-07-02  8:28 UTC (permalink / raw)
  To: u-boot; +Cc: monstr, Mike Looijmans

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>
---
 board/xilinx/zynq/board.c    | 6 +++---
 board/xilinx/zynqmp/zynqmp.c | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/board/xilinx/zynq/board.c b/board/xilinx/zynq/board.c
index e2e9b3f0f7..61e0a90c11 100644
--- a/board/xilinx/zynq/board.c
+++ b/board/xilinx/zynq/board.c
@@ -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;
diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
index ee4d0c85e6..a5210035a2 100644
--- a/board/xilinx/zynqmp/zynqmp.c
+++ b/board/xilinx/zynqmp/zynqmp.c
@@ -710,18 +710,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;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] xilinx: zynq, zynqmp: Return ENVL_NOWHERE instead of ENVL_UNKNOWN
  2021-07-02  8:28 [PATCH] xilinx: zynq, zynqmp: Return ENVL_NOWHERE instead of ENVL_UNKNOWN Mike Looijmans
@ 2021-07-09  6:33 ` Michal Simek
  0 siblings, 0 replies; 2+ messages in thread
From: Michal Simek @ 2021-07-09  6:33 UTC (permalink / raw)
  To: Mike Looijmans; +Cc: U-Boot

pá 2. 7. 2021 v 10:28 odesílatel Mike Looijmans
<mike.looijmans@topic.nl> napsal:
>
> 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>
> ---
>  board/xilinx/zynq/board.c    | 6 +++---
>  board/xilinx/zynqmp/zynqmp.c | 6 +++---
>  2 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/board/xilinx/zynq/board.c b/board/xilinx/zynq/board.c
> index e2e9b3f0f7..61e0a90c11 100644
> --- a/board/xilinx/zynq/board.c
> +++ b/board/xilinx/zynq/board.c
> @@ -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;
> diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
> index ee4d0c85e6..a5210035a2 100644
> --- a/board/xilinx/zynqmp/zynqmp.c
> +++ b/board/xilinx/zynqmp/zynqmp.c
> @@ -710,18 +710,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;
> --
> 2.17.1
>

Applied with subject "xilinx: Return ENVL_NOWHERE instead of ENVL_UNKNOWN"

Thanks,
Michal

-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-07-09  6:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-02  8:28 [PATCH] xilinx: zynq, zynqmp: Return ENVL_NOWHERE instead of ENVL_UNKNOWN Mike Looijmans
2021-07-09  6:33 ` Michal Simek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.