public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [RFC PATCH] imx8m: Drop env_get_location for imx8mn and imx8mp
@ 2021-11-18 13:58 Michael Trimarchi
  2021-11-18 18:53 ` ZHIZHIKIN Andrey
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Trimarchi @ 2021-11-18 13:58 UTC (permalink / raw)
  To: Ye Li, Stefano Babic, Fabio Estevam
  Cc: u-boot, Ariel D'Alessandro, linux-amarula, Anthony Brandon

This function defined for two architecture is not really clean
and can be generate problem when people add a new board

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
---
 arch/arm/mach-imx/imx8m/soc.c | 42 -----------------------------------
 1 file changed, 42 deletions(-)

diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach-imx/imx8m/soc.c
index e75d2fa255..83a515c973 100644
--- a/arch/arm/mach-imx/imx8m/soc.c
+++ b/arch/arm/mach-imx/imx8m/soc.c
@@ -1311,45 +1311,3 @@ void do_error(struct pt_regs *pt_regs, unsigned int esr)
 }
 #endif
 #endif
-
-#if defined(CONFIG_IMX8MN) || defined(CONFIG_IMX8MP)
-enum env_location env_get_location(enum env_operation op, int prio)
-{
-	enum boot_device dev = get_boot_device();
-	enum env_location env_loc = ENVL_UNKNOWN;
-
-	if (prio)
-		return env_loc;
-
-	switch (dev) {
-#ifdef CONFIG_ENV_IS_IN_SPI_FLASH
-	case QSPI_BOOT:
-		env_loc = ENVL_SPI_FLASH;
-		break;
-#endif
-#ifdef CONFIG_ENV_IS_IN_NAND
-	case NAND_BOOT:
-		env_loc = ENVL_NAND;
-		break;
-#endif
-#ifdef CONFIG_ENV_IS_IN_MMC
-	case SD1_BOOT:
-	case SD2_BOOT:
-	case SD3_BOOT:
-	case MMC1_BOOT:
-	case MMC2_BOOT:
-	case MMC3_BOOT:
-		env_loc =  ENVL_MMC;
-		break;
-#endif
-	default:
-#if defined(CONFIG_ENV_IS_NOWHERE)
-		env_loc = ENVL_NOWHERE;
-#endif
-		break;
-	}
-
-	return env_loc;
-}
-
-#endif
-- 
2.25.1


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

end of thread, other threads:[~2021-11-19 13:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-18 13:58 [RFC PATCH] imx8m: Drop env_get_location for imx8mn and imx8mp Michael Trimarchi
2021-11-18 18:53 ` ZHIZHIKIN Andrey
2021-11-18 21:48   ` Michael Nazzareno Trimarchi
2021-11-19 12:57     ` ZHIZHIKIN Andrey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox