public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tommaso Merciai <tomm.merciai@gmail.com>
Cc: michael@amarulasolutions.com,
	andrey.zhizhikin@leica-geosystems.com,
	Tommaso Merciai <tomm.merciai@gmail.com>,
	Stefano Babic <sbabic@denx.de>,
	Fabio Estevam <festevam@gmail.com>,
	"NXP i.MX U-Boot Team" <uboot-imx@nxp.com>,
	Peng Fan <peng.fan@nxp.com>, Ye Li <ye.li@nxp.com>,
	Simon Glass <sjg@chromium.org>, Marek Vasut <marex@denx.de>,
	Frieder Schrempf <frieder.schrempf@kontron.de>,
	Harald Seiler <hws@denx.de>, Tim Harvey <tharvey@gateworks.com>,
	"Ying-Chun Liu (PaulLiu)" <paulliu@debian.org>,
	u-boot@lists.denx.de
Subject: [RFC PATCH 1/3] imx8m: drop env_get_location for imx8mn and imx8mp
Date: Fri, 26 Nov 2021 18:43:29 +0100	[thread overview]
Message-ID: <20211126174331.5928-2-tomm.merciai@gmail.com> (raw)
In-Reply-To: <20211126174331.5928-1-tomm.merciai@gmail.com>

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

Signed-off-by: Tommaso Merciai <tomm.merciai@gmail.com>
---
Changes since v1:
 - Fix commit: drop down only env_get_location

 arch/arm/mach-imx/imx8m/soc.c | 39 -----------------------------------
 1 file changed, 39 deletions(-)

diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach-imx/imx8m/soc.c
index 863508776d..f0030a557a 100644
--- a/arch/arm/mach-imx/imx8m/soc.c
+++ b/arch/arm/mach-imx/imx8m/soc.c
@@ -1313,45 +1313,6 @@ void do_error(struct pt_regs *pt_regs, unsigned int esr)
 #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;
-}
-
 #ifndef ENV_IS_EMBEDDED
 long long env_get_offset(long long defautl_offset)
 {
-- 
2.25.1


  reply	other threads:[~2021-11-26 17:51 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-26 17:43 [RFC PATCH 0/3] imx8m: move env_get_location for imx8mn and imx8mp at board level Tommaso Merciai
2021-11-26 17:43 ` Tommaso Merciai [this message]
2021-11-26 17:43 ` [RFC PATCH 2/3] imx: imx8mn_evk: override env_get_location Tommaso Merciai
2021-11-26 17:43 ` [RFC PATCH 3/3] imx: imx8mp_evk: " Tommaso Merciai
2021-11-26 18:00   ` Marek Behún
2021-11-28 17:47     ` Tommaso Merciai
2021-11-29 12:17       ` Marek Behún
2021-11-30 20:23         ` Tommaso Merciai
2021-12-07 18:13           ` Tommaso Merciai
2021-11-29  8:38 ` [RFC PATCH 0/3] imx8m: move env_get_location for imx8mn and imx8mp at board level ZHIZHIKIN Andrey
2021-11-29  8:40   ` Michael Nazzareno Trimarchi
2021-11-29  8:46     ` ZHIZHIKIN Andrey
2021-11-29  8:48       ` Michael Nazzareno Trimarchi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211126174331.5928-2-tomm.merciai@gmail.com \
    --to=tomm.merciai@gmail.com \
    --cc=andrey.zhizhikin@leica-geosystems.com \
    --cc=festevam@gmail.com \
    --cc=frieder.schrempf@kontron.de \
    --cc=hws@denx.de \
    --cc=marex@denx.de \
    --cc=michael@amarulasolutions.com \
    --cc=paulliu@debian.org \
    --cc=peng.fan@nxp.com \
    --cc=sbabic@denx.de \
    --cc=sjg@chromium.org \
    --cc=tharvey@gateworks.com \
    --cc=u-boot@lists.denx.de \
    --cc=uboot-imx@nxp.com \
    --cc=ye.li@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox