diff mbox

[U-Boot,3/3] common/env_embedded.c: rename PPCENV/PPCTEXT macros

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

Commit Message

Thomas Petazzoni July 28, 2017, 9:46 p.m. UTC
The environment has pretty much nothing to do with just "PPC", so
rename the macros to just __UBOOT_ENV_SECTION__ which is more
readable.

In addition, only a single macro is needed: the environment now goes
either to the default section (USE_HOSTCC is defined) or in the .text
section.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 common/env_embedded.c | 10 ++++------
 include/env_default.h |  2 +-
 2 files changed, 5 insertions(+), 7 deletions(-)

Comments

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

> The environment has pretty much nothing to do with just "PPC", so
> rename the macros to just __UBOOT_ENV_SECTION__ which is more
> readable.
> 
> In addition, only a single macro is needed: the environment now goes
> either to the default section (USE_HOSTCC is defined) or in the .text
> section.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

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

Patch

diff --git a/common/env_embedded.c b/common/env_embedded.c
index 4532589..43694db 100644
--- a/common/env_embedded.c
+++ b/common/env_embedded.c
@@ -35,13 +35,11 @@ 
  * a seperate section.
  */
 #if defined(USE_HOSTCC) /* Native for 'tools/envcrc' */
-#  define __PPCENV__	/*XXX DO_NOT_DEL_THIS_COMMENT*/
-#  define __PPCTEXT__	/*XXX DO_NOT_DEL_THIS_COMMENT*/
+#  define __UBOOT_ENV_SECTION__	/*XXX DO_NOT_DEL_THIS_COMMENT*/
 
 #else /* Environment is embedded in U-Boot's .text section */
 /* XXX - This only works with GNU C */
-#  define __PPCENV__	__attribute__ ((section(".text")))
-#  define __PPCTEXT__	__attribute__ ((section(".text")))
+#  define __UBOOT_ENV_SECTION__	__attribute__ ((section(".text")))
 #endif
 
 /*
@@ -72,7 +70,7 @@ 
 #include <env_default.h>
 
 #ifdef CONFIG_ENV_ADDR_REDUND
-env_t redundand_environment __PPCENV__ = {
+env_t redundand_environment __UBOOT_ENV_SECTION__ = {
 	0,		/* CRC Sum: invalid */
 	0,		/* Flags:   invalid */
 	{
@@ -89,7 +87,7 @@  env_t redundand_environment __PPCENV__ = {
  * .data/.sdata section.
  *
  */
-unsigned long env_size __PPCTEXT__ = sizeof(env_t);
+unsigned long env_size __UBOOT_ENV_SECTION__ = sizeof(env_t);
 
 /*
  * Add in absolutes.
diff --git a/include/env_default.h b/include/env_default.h
index ea6704a..acd4198 100644
--- a/include/env_default.h
+++ b/include/env_default.h
@@ -11,7 +11,7 @@ 
 #include <env_callback.h>
 
 #ifdef DEFAULT_ENV_INSTANCE_EMBEDDED
-env_t environment __PPCENV__ = {
+env_t environment __UBOOT_ENV_SECTION__ = {
 	ENV_CRC,	/* CRC Sum */
 #ifdef CONFIG_SYS_REDUNDAND_ENVIRONMENT
 	1,		/* Flags: valid */