diff mbox

[U-Boot,2/3] common/env_embedded.c: drop support for CONFIG_SYS_USE_PPCENV

Message ID 20170728214638.23931-3-thomas.petazzoni@free-electrons.com
State Accepted
Commit 7653942b10e9eac61532bf635a422e3424cbcdb9
Delegated to: Tom Rini
Headers show

Commit Message

Thomas Petazzoni July 28, 2017, 9:46 p.m. UTC
CONFIG_SYS_USE_PPCENV is no longer used anywhere. It was used to put
the environment in the special .ppcenv section, but the last
architecture using this section (SuperH) has been changed to not use
it.

Therefore, this commit drops support for CONFIG_SYS_USE_PPCENV
entirely. We only handle two cases:

 - We're building the host tool tools/envcrc, in which case the
   environment is place with no special section attribute (so it
   depends up in .data)

 - We're building U-Boot itself, in which case the environnement is
   placed in the .text section.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 common/env_embedded.c | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

Comments

Tom Rini Aug. 7, 2017, 1:57 p.m. UTC | #1
On Fri, Jul 28, 2017 at 11:46:37PM +0200, Thomas Petazzoni wrote:

> CONFIG_SYS_USE_PPCENV is no longer used anywhere. It was used to put
> the environment in the special .ppcenv section, but the last
> architecture using this section (SuperH) has been changed to not use
> it.
> 
> Therefore, this commit drops support for CONFIG_SYS_USE_PPCENV
> entirely. We only handle two cases:
> 

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/common/env_embedded.c b/common/env_embedded.c
index b368fda..4532589 100644
--- a/common/env_embedded.c
+++ b/common/env_embedded.c
@@ -30,18 +30,11 @@ 
  */
 #if defined(ENV_IS_EMBEDDED) || defined(CONFIG_BUILD_ENVCRC)
 /*
- * Only put the environment in it's own section when we are building
+ * Put the environment in the .text section when we are building
  * U-Boot proper.  The host based program "tools/envcrc" does not need
- * a seperate section.  Note that ENV_CRC is only defined when building
- * U-Boot itself.
+ * a seperate section.
  */
-#if defined(CONFIG_SYS_USE_PPCENV) && \
-	defined(ENV_CRC) /* Environment embedded in U-Boot .ppcenv section */
-/* XXX - This only works with GNU C */
-#  define __PPCENV__	__attribute__ ((section(".ppcenv")))
-#  define __PPCTEXT__	__attribute__ ((section(".text")))
-
-#elif defined(USE_HOSTCC) /* Native for 'tools/envcrc' */
+#if defined(USE_HOSTCC) /* Native for 'tools/envcrc' */
 #  define __PPCENV__	/*XXX DO_NOT_DEL_THIS_COMMENT*/
 #  define __PPCTEXT__	/*XXX DO_NOT_DEL_THIS_COMMENT*/