All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rajesh Bhagat <rajesh.bhagat@nxp.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RESEND PATCH v3 03/26] env: sf: define API to override sf environment address
Date: Tue,  9 Oct 2018 18:48:23 +0530	[thread overview]
Message-ID: <20181009131846.6108-4-rajesh.bhagat@nxp.com> (raw)
In-Reply-To: <20181009131846.6108-1-rajesh.bhagat@nxp.com>

Defines env_sf_get_env_addr API to override sf environment address,
required to support multiple environment.

Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
---
Change in v3: None
Change in v2: None

 env/sf.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/env/sf.c b/env/sf.c
index 494510533a..df22fd520b 100644
--- a/env/sf.c
+++ b/env/sf.c
@@ -297,10 +297,17 @@ out:
 }
 #endif
 
+#ifdef CONFIG_ENV_ADDR
+__weak void *env_sf_get_env_addr(void)
+{
+	return (void *)CONFIG_ENV_ADDR;
+}
+#endif
+
 #if defined(INITENV) && defined(CONFIG_ENV_ADDR)
 static int env_sf_init(void)
 {
-	env_t *env_ptr = (env_t *)(CONFIG_ENV_ADDR);
+	env_t *env_ptr = (env_t *)env_sf_get_env_addr();
 
 	if (crc32(0, env_ptr->data, ENV_SIZE) == env_ptr->crc) {
 		gd->env_addr	= (ulong)&(env_ptr->data);
-- 
2.17.1

  parent reply	other threads:[~2018-10-09 13:18 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-09 13:18 [U-Boot] [RESEND PATCH v3 00/26] TF-A Boot support for NXP Chassis 2 platforms Rajesh Bhagat
2018-10-09 13:18 ` [U-Boot] [RESEND PATCH v3 01/26] move data structure out of cpu.h Rajesh Bhagat
2018-10-09 13:18 ` [U-Boot] [RESEND PATCH v3 02/26] env: allow flash and nand env driver to compile together Rajesh Bhagat
2018-10-09 13:18 ` Rajesh Bhagat [this message]
2018-10-09 13:18 ` [U-Boot] [RESEND PATCH v3 04/26] driver/ifc: replace __ilog2 with LOG2 macro Rajesh Bhagat
2018-10-09 13:18 ` [U-Boot] [RESEND PATCH v3 05/26] armv8: layerscape: Enable routing SError exception Rajesh Bhagat
2018-10-09 13:18 ` [U-Boot] [RESEND PATCH v3 06/26] armv8: fsl-layerscape: change tlb base from OCRAM to DDR in EL < 3 Rajesh Bhagat
2018-10-09 13:18 ` [U-Boot] [RESEND PATCH v3 07/26] drivers: ifc: dynamic chipselect mapping support Rajesh Bhagat
2018-10-09 13:18 ` [U-Boot] [RESEND PATCH v3 08/26] armv8: layerscape: Add TFABOOT support Rajesh Bhagat
2018-10-09 13:18 ` [U-Boot] [RESEND PATCH v3 09/26] armv8: fsl-layerscape: identify boot source from PORSR register Rajesh Bhagat
2018-10-09 13:18 ` [U-Boot] [RESEND PATCH v3 10/26] armv8: layerscape: remove EL3 specific erratas for TFABOOT Rajesh Bhagat
2018-10-09 13:18 ` [U-Boot] [RESEND PATCH v3 11/26] armv8: fsl-layerscape: bootcmd identification " Rajesh Bhagat
2018-10-09 13:18 ` [U-Boot] [RESEND PATCH v3 12/26] armv8: layerscape: add SMC calls for DDR size and bank info Rajesh Bhagat
2018-10-09 13:18 ` [U-Boot] [RESEND PATCH v3 13/26] armv8: layerscape: skip OCRAM init for TFABOOT Rajesh Bhagat
2018-10-09 13:18 ` [U-Boot] [RESEND PATCH v3 14/26] armv8: fsl-layerscape: Update parsing boot source Rajesh Bhagat
2018-10-09 13:18 ` [U-Boot] [RESEND PATCH v3 15/26] armv8: sec_firmware: change el2_to_aarch32 SMC ID Rajesh Bhagat
2018-10-09 13:18 ` [U-Boot] [RESEND PATCH v3 16/26] armv8: sec_firmware: return job ring status as true in TFABOOT Rajesh Bhagat
2018-10-09 13:18 ` [U-Boot] [RESEND PATCH v3 17/26] net: fm: add TFABOOT support Rajesh Bhagat
2018-10-09 13:18 ` [U-Boot] [RESEND PATCH v3 18/26] drivers: qe: " Rajesh Bhagat
2018-10-09 13:18 ` [U-Boot] [RESEND PATCH v3 19/26] armv8: fsl-layerscape: add support of MC framework for TFA Rajesh Bhagat
2018-10-09 13:18 ` [U-Boot] [RESEND PATCH v3 20/26] armv8: ls1046ardb: Add TFABOOT support Rajesh Bhagat
2018-10-09 13:18 ` [U-Boot] [RESEND PATCH v3 21/26] armv8: ls1046aqds: " Rajesh Bhagat
2018-10-09 13:18 ` [U-Boot] [RESEND PATCH v3 22/26] armv8: ls1043ardb: " Rajesh Bhagat
2018-10-09 13:18 ` [U-Boot] [RESEND PATCH v3 23/26] armv8: ls1043aqds: " Rajesh Bhagat
2018-10-09 13:18 ` [U-Boot] [RESEND PATCH v3 24/26] armv8: ls1012ardb: " Rajesh Bhagat
2018-10-09 19:49   ` York Sun
2018-10-12 13:47     ` Rajesh Bhagat
2018-10-09 13:18 ` [U-Boot] [RESEND PATCH v3 25/26] armv8: ls1012aqds: " Rajesh Bhagat
2018-10-09 19:49   ` York Sun
2018-10-12 13:48     ` Rajesh Bhagat
2018-10-09 13:18 ` [U-Boot] [RESEND PATCH v3 26/26] armv8: ls1012a: fix secure boot compilation Rajesh Bhagat

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=20181009131846.6108-4-rajesh.bhagat@nxp.com \
    --to=rajesh.bhagat@nxp.com \
    --cc=u-boot@lists.denx.de \
    /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 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.