]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
global_data: unify global flag defines
authorMike Frysinger <vapier@gentoo.org>
Sun, 18 Mar 2012 14:31:24 +0000 (14:31 +0000)
committerWolfgang Denk <wd@denx.de>
Thu, 9 Aug 2012 19:46:32 +0000 (21:46 +0200)
All the global flag defines are the same across all arches.  So unify them
in one place, and add a simple way for arches to extend for their needs.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 files changed:
arch/arm/include/asm/global_data.h
arch/avr32/include/asm/global_data.h
arch/blackfin/include/asm/global_data.h
arch/m68k/include/asm/global_data.h
arch/microblaze/include/asm/global_data.h
arch/mips/include/asm/global_data.h
arch/nds32/include/asm/global_data.h
arch/nios2/include/asm/global_data.h
arch/openrisc/include/asm/global_data.h
arch/powerpc/include/asm/global_data.h
arch/sandbox/include/asm/global_data.h
arch/sh/include/asm/global_data.h
arch/sparc/include/asm/global_data.h
arch/x86/include/asm/global_data.h
include/asm-generic/global_data_flags.h [new file with mode: 0644]

index c3ff789999a1b129e8ad42237e1031f052ace67d..f8088fe21a1f9c889f2518efa3f7d10873667c4d 100644 (file)
@@ -29,8 +29,6 @@
  * some locked parts of the data cache) to allow for a minimum set of
  * global variables during system initialization (until we have set
  * up the memory controller so that we can use RAM).
- *
- * Keep it *SMALL* and remember to set GENERATED_GBL_DATA_SIZE > sizeof(gd_t)
  */
 
 typedef        struct  global_data {
@@ -86,17 +84,7 @@ typedef      struct  global_data {
 #endif
 } gd_t;
 
-/*
- * Global Data Flags
- */
-#define        GD_FLG_RELOC            0x00001 /* Code was relocated to RAM            */
-#define        GD_FLG_DEVINIT          0x00002 /* Devices have been initialized        */
-#define        GD_FLG_SILENT           0x00004 /* Silent mode                          */
-#define        GD_FLG_POSTFAIL         0x00008 /* Critical POST test failed            */
-#define        GD_FLG_POSTSTOP         0x00010 /* POST seqeunce aborted                */
-#define        GD_FLG_LOGINIT          0x00020 /* Log Buffer has been initialized      */
-#define GD_FLG_DISABLE_CONSOLE 0x00040 /* Disable console (in & out)           */
-#define GD_FLG_ENV_READY       0x00080 /* Environment imported into hash table */
+#include <asm-generic/global_data_flags.h>
 
 #define DECLARE_GLOBAL_DATA_PTR     register volatile gd_t *gd asm ("r8")
 
index 5c654bd5e0325ec845cf7e882422e4dc67a8a765..7878bb185a96d5375c01d56ff6b656e56e939e88 100644 (file)
@@ -28,8 +28,6 @@
  * some locked parts of the data cache) to allow for a minimum set of
  * global variables during system initialization (until we have set
  * up the memory controller so that we can use RAM).
- *
- * Keep it *SMALL* and remember to set GENERATED_GBL_DATA_SIZE > sizeof(gd_t)
  */
 
 typedef        struct  global_data {
@@ -52,17 +50,7 @@ typedef      struct  global_data {
        char            env_buf[32];    /* buffer for getenv() before reloc. */
 } gd_t;
 
-/*
- * Global Data Flags
- */
-#define        GD_FLG_RELOC            0x00001 /* Code was relocated to RAM            */
-#define        GD_FLG_DEVINIT          0x00002 /* Devices have been initialized        */
-#define        GD_FLG_SILENT           0x00004 /* Silent mode                          */
-#define        GD_FLG_POSTFAIL         0x00008 /* Critical POST test failed            */
-#define        GD_FLG_POSTSTOP         0x00010 /* POST seqeunce aborted                */
-#define        GD_FLG_LOGINIT          0x00020 /* Log Buffer has been initialized      */
-#define GD_FLG_DISABLE_CONSOLE 0x00040 /* Disable console (in & out)           */
-#define GD_FLG_ENV_READY       0x00080 /* Environment imported into hash table */
+#include <asm-generic/global_data_flags.h>
 
 #define DECLARE_GLOBAL_DATA_PTR register gd_t *gd asm("r5")
 
index 973ea2929a8640688bb9066dbcf02bd7c4ebdb12..290a9e766294e9e91846998457c0d0b2d025241f 100644 (file)
@@ -36,8 +36,6 @@
  * some locked parts of the data cache) to allow for a minimum set of
  * global variables during system initialization (until we have set
  * up the memory controller so that we can use RAM).
- *
- * Keep it *SMALL* and remember to set GENERATED_GBL_DATA_SIZE > sizeof(gd_t)
  */
 typedef struct global_data {
        bd_t *bd;
@@ -61,17 +59,7 @@ typedef struct global_data {
        char    env_buf[32];            /* buffer for getenv() before reloc. */
 } gd_t;
 
-/*
- * Global Data Flags
- */
-#define        GD_FLG_RELOC            0x00001 /* Code was relocated to RAM            */
-#define        GD_FLG_DEVINIT          0x00002 /* Devices have been initialized        */
-#define        GD_FLG_SILENT           0x00004 /* Silent mode                          */
-#define        GD_FLG_POSTFAIL         0x00008 /* Critical POST test failed            */
-#define        GD_FLG_POSTSTOP         0x00010 /* POST seqeunce aborted                */
-#define        GD_FLG_LOGINIT          0x00020 /* Log Buffer has been initialized      */
-#define GD_FLG_DISABLE_CONSOLE 0x00040 /* Disable console (in & out)           */
-#define GD_FLG_ENV_READY       0x00080 /* Environment imported into hash table */
+#include <asm-generic/global_data_flags.h>
 
 #define DECLARE_GLOBAL_DATA_PTR     register volatile gd_t *gd asm ("P3")
 
index 0ba2b43305d0a940538387e9c8208f2b1f61ab79..cd55b83c525ba269029614638a8b77ed6224a795 100644 (file)
@@ -29,8 +29,6 @@
  * some locked parts of the data cache) to allow for a minimum set of
  * global variables during system initialization (until we have set
  * up the memory controller so that we can use RAM).
- *
- * Keep it *SMALL* and remember to set GENERATED_GBL_DATA_SIZE > sizeof(gd_t)
  */
 
 typedef        struct  global_data {
@@ -70,17 +68,7 @@ typedef      struct  global_data {
        char            env_buf[32];    /* buffer for getenv() before reloc. */
 } gd_t;
 
-/*
- * Global Data Flags
- */
-#define        GD_FLG_RELOC            0x00001 /* Code was relocated to RAM            */
-#define        GD_FLG_DEVINIT          0x00002 /* Devices have been initialized        */
-#define        GD_FLG_SILENT           0x00004 /* Silent mode                          */
-#define        GD_FLG_POSTFAIL         0x00008 /* Critical POST test failed            */
-#define        GD_FLG_POSTSTOP         0x00010 /* POST seqeunce aborted                */
-#define        GD_FLG_LOGINIT          0x00020 /* Log Buffer has been initialized      */
-#define GD_FLG_DISABLE_CONSOLE 0x00040 /* Disable console (in & out)           */
-#define GD_FLG_ENV_READY       0x00080 /* Environment imported into hash table */
+#include <asm-generic/global_data_flags.h>
 
 #if 0
 extern gd_t *global_data;
index 6e8537c8ed13b1ead5a58ba0c2dd37c9be68fb04..0dc4ce9ee52c46ed81384c951dde8a2e180b8a69 100644 (file)
@@ -30,8 +30,6 @@
  * some locked parts of the data cache) to allow for a minimum set of
  * global variables during system initialization (until we have set
  * up the memory controller so that we can use RAM).
- *
- * Keep it *SMALL* and remember to set GENERATED_GBL_DATA_SIZE > sizeof(gd_t)
  */
 
 typedef        struct  global_data {
@@ -49,17 +47,7 @@ typedef      struct  global_data {
        char            env_buf[32];    /* buffer for getenv() before reloc. */
 } gd_t;
 
-/*
- * Global Data Flags
- */
-#define        GD_FLG_RELOC            0x00001 /* Code was relocated to RAM            */
-#define        GD_FLG_DEVINIT          0x00002 /* Devices have been initialized        */
-#define        GD_FLG_SILENT           0x00004 /* Silent mode                          */
-#define        GD_FLG_POSTFAIL         0x00008 /* Critical POST test failed            */
-#define        GD_FLG_POSTSTOP         0x00010 /* POST seqeunce aborted                */
-#define        GD_FLG_LOGINIT          0x00020 /* Log Buffer has been initialized      */
-#define GD_FLG_DISABLE_CONSOLE 0x00040 /* Disable console (in & out)           */
-#define GD_FLG_ENV_READY       0x00080 /* Environment imported into hash table */
+#include <asm-generic/global_data_flags.h>
 
 #define DECLARE_GLOBAL_DATA_PTR     register volatile gd_t *gd asm ("r31")
 
index f6cf9fe9fd5e08fba29d3f237a82ffca32006466..6e2cdc72cf53dd53fdbfa244ebcc1e10d60062e4 100644 (file)
@@ -32,8 +32,6 @@
  * some locked parts of the data cache) to allow for a minimum set of
  * global variables during system initialization (until we have set
  * up the memory controller so that we can use RAM).
- *
- * Keep it *SMALL* and remember to set GENERATED_GBL_DATA_SIZE > sizeof(gd_t)
  */
 
 typedef        struct  global_data {
@@ -63,17 +61,7 @@ typedef      struct  global_data {
        char            env_buf[32];    /* buffer for getenv() before reloc. */
 } gd_t;
 
-/*
- * Global Data Flags
- */
-#define        GD_FLG_RELOC            0x00001 /* Code was relocated to RAM            */
-#define        GD_FLG_DEVINIT          0x00002 /* Devices have been initialized        */
-#define        GD_FLG_SILENT           0x00004 /* Silent mode                          */
-#define        GD_FLG_POSTFAIL         0x00008 /* Critical POST test failed            */
-#define        GD_FLG_POSTSTOP         0x00010 /* POST seqeunce aborted                */
-#define        GD_FLG_LOGINIT          0x00020 /* Log Buffer has been initialized      */
-#define GD_FLG_DISABLE_CONSOLE 0x00040 /* Disable console (in & out)           */
-#define GD_FLG_ENV_READY       0x00080 /* Environment imported into hash table */
+#include <asm-generic/global_data_flags.h>
 
 #define DECLARE_GLOBAL_DATA_PTR     register volatile gd_t *gd asm ("k0")
 
index de20a0a573bdb7340da5d5c8a2159f3817698c1a..94bd4c27225d8c8888cf85086edec30c785179cf 100644 (file)
@@ -39,8 +39,6 @@
  * some locked parts of the data cache) to allow for a minimum set of
  * global variables during system initialization (until we have set
  * up the memory controller so that we can use RAM).
- *
- * Keep it *SMALL* and remember to set CONFIG_GBL_DATA_SIZE > sizeof(gd_t)
  */
 
 typedef        struct global_data {
@@ -67,17 +65,7 @@ typedef      struct global_data {
        char            env_buf[32];    /* buffer for getenv() before reloc. */
 } gd_t;
 
-/*
- * Global Data Flags
- */
-#define        GD_FLG_RELOC            0x00001 /* Code was relocated to RAM    */
-#define        GD_FLG_DEVINIT          0x00002 /* Devices have been initialized */
-#define        GD_FLG_SILENT           0x00004 /* Silent mode                  */
-#define        GD_FLG_POSTFAIL         0x00008 /* Critical POST test failed    */
-#define        GD_FLG_POSTSTOP         0x00010 /* POST seqeunce aborted        */
-#define        GD_FLG_LOGINIT          0x00020 /* Log Buffer has been initialized */
-#define GD_FLG_DISABLE_CONSOLE 0x00040 /* Disable console (in & out)   */
-#define GD_FLG_ENV_READY       0x00080 /* Envs imported into hash table */
+#include <asm-generic/global_data_flags.h>
 
 #ifdef CONFIG_GLOBAL_DATA_NOT_REG10
 extern volatile gd_t g_gd;
index 4b86fbdacfabac7aeaf6991b079fb0178dc6784a..3b0d9e629417017d7976949a7a4ee73797f9033b 100644 (file)
@@ -44,15 +44,7 @@ typedef      struct  global_data {
        char            env_buf[32];    /* buffer for getenv() before reloc. */
 } gd_t;
 
-/* flags */
-#define        GD_FLG_RELOC            0x00001 /* Code was relocated to RAM            */
-#define        GD_FLG_DEVINIT          0x00002 /* Devices have been initialized        */
-#define        GD_FLG_SILENT           0x00004 /* Silent mode                          */
-#define        GD_FLG_POSTFAIL         0x00008 /* Critical POST test failed            */
-#define        GD_FLG_POSTSTOP         0x00010 /* POST seqeunce aborted                */
-#define        GD_FLG_LOGINIT          0x00020 /* Log Buffer has been initialized      */
-#define GD_FLG_DISABLE_CONSOLE 0x00040 /* Disable console (in & out)           */
-#define GD_FLG_ENV_READY       0x00080 /* Environment imported into hash table */
+#include <asm-generic/global_data_flags.h>
 
 #define DECLARE_GLOBAL_DATA_PTR     register gd_t *gd asm ("gp")
 
index 36de9d0a4d2f2632603070027731ed93f08999d5..6a0c0cc547c1ab046fb07da0c260a7ccef9a6a6e 100644 (file)
@@ -30,8 +30,6 @@
  * some locked parts of the data cache) to allow for a minimum set of
  * global variables during system initialization (until we have set
  * up the memory controller so that we can use RAM).
- *
- * Keep it *SMALL* and remember to set GENERATED_GBL_DATA_SIZE > sizeof(gd_t)
  */
 
 typedef struct global_data {
@@ -48,25 +46,7 @@ typedef struct global_data {
        char            env_buf[32];    /* buffer for getenv() before reloc. */
 } gd_t;
 
-/*
- * Global Data Flags
- */
-/* Code was relocated to RAM */
-#define GD_FLG_RELOC           0x00001
-/* Devices have been initialized */
-#define GD_FLG_DEVINIT         0x00002
-/* Silent mode */
-#define GD_FLG_SILENT          0x00004
-/* Critical POST test failed */
-#define GD_FLG_POSTFAIL                0x00008
-/* POST seqeunce aborted */
-#define GD_FLG_POSTSTOP                0x00010
-/* Log Buffer has been initialized */
-#define GD_FLG_LOGINIT         0x00020
-/* Disable console (in & out) */
-#define GD_FLG_DISABLE_CONSOLE 0x00040
-/* Environment imported into hash table */
-#define GD_FLG_ENV_READY       0x00080
+#include <asm-generic/global_data_flags.h>
 
 /* OR32 GCC already has r10 set as fixed-use */
 #define DECLARE_GLOBAL_DATA_PTR        register volatile gd_t *gd asm ("r10")
index 01f1d4acba3f1168f191712a28ce49d4e03cc6f9..5a5877fc2c888e603819e1ebf5ccf7870161e00b 100644 (file)
@@ -33,8 +33,6 @@
  * some locked parts of the data cache) to allow for a minimum set of
  * global variables during system initialization (until we have set
  * up the memory controller so that we can use RAM).
- *
- * Keep it *SMALL* and remember to set GENERATED_GBL_DATA_SIZE > sizeof(gd_t)
  */
 
 typedef        struct  global_data {
@@ -186,17 +184,7 @@ typedef    struct  global_data {
        char            env_buf[32];    /* buffer for getenv() before reloc. */
 } gd_t;
 
-/*
- * Global Data Flags
- */
-#define        GD_FLG_RELOC            0x00001 /* Code was relocated to RAM            */
-#define        GD_FLG_DEVINIT          0x00002 /* Devices have been initialized        */
-#define        GD_FLG_SILENT           0x00004 /* Silent mode                          */
-#define        GD_FLG_POSTFAIL         0x00008 /* Critical POST test failed            */
-#define        GD_FLG_POSTSTOP         0x00010 /* POST seqeunce aborted                */
-#define        GD_FLG_LOGINIT          0x00020 /* Log Buffer has been initialized      */
-#define GD_FLG_DISABLE_CONSOLE 0x00040 /* Disable console (in & out)           */
-#define GD_FLG_ENV_READY       0x00080 /* Environment imported into hash table */
+#include <asm-generic/global_data_flags.h>
 
 #if 1
 #define DECLARE_GLOBAL_DATA_PTR     register volatile gd_t *gd asm ("r2")
index 01a706362e6a53df8d39c06d6c6b3cfae2c8eaa4..581fd2f2a04b9c3fdc4366e46c05be393012140c 100644 (file)
@@ -31,8 +31,6 @@
  * some locked parts of the data cache) to allow for a minimum set of
  * global variables during system initialization (until we have set
  * up the memory controller so that we can use RAM).
- *
- * Keep it *SMALL* and remember to set GENERATED_GBL_DATA_SIZE > sizeof(gd_t)
  */
 
 typedef        struct global_data {
@@ -50,17 +48,7 @@ typedef      struct global_data {
        char            env_buf[32];    /* buffer for getenv() before reloc. */
 } gd_t;
 
-/*
- * Global Data Flags
- */
-#define        GD_FLG_RELOC            0x00001 /* Code was relocated to RAM */
-#define        GD_FLG_DEVINIT          0x00002 /* Devices have been initialized */
-#define        GD_FLG_SILENT           0x00004 /* Silent mode */
-#define        GD_FLG_POSTFAIL         0x00008 /* Critical POST test failed */
-#define        GD_FLG_POSTSTOP         0x00010 /* POST seqeunce aborted */
-#define        GD_FLG_LOGINIT          0x00020 /* Log Buffer has been initialized */
-#define GD_FLG_DISABLE_CONSOLE 0x00040 /* Disable console (in & out) */
-#define GD_FLG_ENV_READY       0x00080 /* Env. imported into hash table */
+#include <asm-generic/global_data_flags.h>
 
 #define DECLARE_GLOBAL_DATA_PTR     extern gd_t *gd
 
index 1b782fc77181cd3780f41955440b1ff39a7745a7..6e534ad6146213a6e7ef1df148e17a0365ec6fee 100644 (file)
@@ -44,14 +44,7 @@ typedef      struct global_data
        char            env_buf[32];    /* buffer for getenv() before reloc. */
 } gd_t;
 
-#define        GD_FLG_RELOC            0x00001 /* Code was relocated to RAM            */
-#define        GD_FLG_DEVINIT          0x00002 /* Devices have been initialized        */
-#define        GD_FLG_SILENT           0x00004 /* Silent mode                          */
-#define        GD_FLG_POSTFAIL         0x00008 /* Critical POST test failed            */
-#define        GD_FLG_POSTSTOP         0x00010 /* POST seqeunce aborted                */
-#define        GD_FLG_LOGINIT          0x00020 /* Log Buffer has been initialized      */
-#define GD_FLG_DISABLE_CONSOLE 0x00040 /* Disable console (in & out)           */
-#define GD_FLG_ENV_READY       0x00080 /* Environment imported into hash table */
+#include <asm-generic/global_data_flags.h>
 
 #define DECLARE_GLOBAL_DATA_PTR        register gd_t *gd asm ("r13")
 
index 613e2d8e0cb68423d04fd9fcf6f972c36c5945af..93d3cc02ebae0064fedf9991e556660d7e16e578 100644 (file)
@@ -35,8 +35,6 @@
  * some locked parts of the data cache) to allow for a minimum set of
  * global variables during system initialization (until we have set
  * up the memory controller so that we can use RAM).
- *
- * Keep it *SMALL* and remember to set GENERATED_GBL_DATA_SIZE > sizeof(gd_t)
  */
 
 typedef struct global_data {
@@ -78,17 +76,7 @@ typedef struct global_data {
        char    env_buf[32];            /* buffer for getenv() before reloc. */
 } gd_t;
 
-/*
- * Global Data Flags
- */
-#define        GD_FLG_RELOC            0x00001 /* Code was relocated to RAM            */
-#define        GD_FLG_DEVINIT          0x00002 /* Devices have been initialized        */
-#define        GD_FLG_SILENT           0x00004 /* Silent mode                          */
-#define        GD_FLG_POSTFAIL         0x00008 /* Critical POST test failed            */
-#define        GD_FLG_POSTSTOP         0x00010 /* POST seqeunce aborted                */
-#define        GD_FLG_LOGINIT          0x00020 /* Log Buffer has been initialized      */
-#define GD_FLG_DISABLE_CONSOLE 0x00040 /* Disable console (in & out)           */
-#define GD_FLG_ENV_READY       0x00080 /* Environment imported into hash table */
+#include <asm-generic/global_data_flags.h>
 
 #define DECLARE_GLOBAL_DATA_PTR     register volatile gd_t *gd asm ("%g7")
 
index 908a02c900c9a6084cde56c60c787897dd7c5192..6d29c0b9a31376cf5d5195f4fe5bfdb0f6673f19 100644 (file)
@@ -29,8 +29,6 @@
  * some locked parts of the data cache) to allow for a minimum set of
  * global variables during system initialization (until we have set
  * up the memory controller so that we can use RAM).
- *
- * Keep it *SMALL* and remember to set GENERATED_GBL_DATA_SIZE > sizeof(gd_t)
  */
 
 #ifndef __ASSEMBLY__
@@ -74,17 +72,7 @@ static inline gd_t *get_fs_gd_ptr(void)
 
 #endif
 
-/*
- * Global Data Flags
- */
-#define        GD_FLG_RELOC            0x00001 /* Code was relocated to RAM            */
-#define        GD_FLG_DEVINIT          0x00002 /* Devices have been initialized        */
-#define        GD_FLG_SILENT           0x00004 /* Silent mode                          */
-#define        GD_FLG_POSTFAIL         0x00008 /* Critical POST test failed            */
-#define        GD_FLG_POSTSTOP         0x00010 /* POST seqeunce aborted                */
-#define        GD_FLG_LOGINIT          0x00020 /* Log Buffer has been initialized      */
-#define GD_FLG_DISABLE_CONSOLE 0x00040 /* Disable console (in & out)           */
-#define GD_FLG_ENV_READY       0x00080 /* Environment imported into hash table */
+#include <asm-generic/global_data_flags.h>
 
 #define DECLARE_GLOBAL_DATA_PTR
 
diff --git a/include/asm-generic/global_data_flags.h b/include/asm-generic/global_data_flags.h
new file mode 100644 (file)
index 0000000..bb57fb6
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * transitional header until we merge global_data.h
+ *
+ * (C) Copyright 2000-2010
+ * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
+ *
+ * Licensed under the GPL-2 or later.
+ */
+
+#ifndef __ASM_GENERIC_GLOBAL_DATA_FLAGS_H
+#define __ASM_GENERIC_GLOBAL_DATA_FLAGS_H
+
+/*
+ * Global Data Flags
+ *
+ * Note: The low 16 bits are expected for common code.  If your arch
+ *       really needs to add your own, use the high 16bits.
+ */
+#define GD_FLG_RELOC           0x0001  /* Code was relocated to RAM */
+#define GD_FLG_DEVINIT         0x0002  /* Devices have been initialized */
+#define GD_FLG_SILENT          0x0004  /* Silent mode */
+#define GD_FLG_POSTFAIL                0x0008  /* Critical POST test failed */
+#define GD_FLG_POSTSTOP                0x0010  /* POST seqeunce aborted */
+#define GD_FLG_LOGINIT         0x0020  /* Log Buffer has been initialized */
+#define GD_FLG_DISABLE_CONSOLE 0x0040  /* Disable console (in & out) */
+#define GD_FLG_ENV_READY       0x0080  /* Environment imported into hash table */
+
+#endif