summaryrefslogtreecommitdiff
path: root/arch/x86/include
diff options
context:
space:
mode:
authorGraeme Russ <graeme.russ@gmail.com>2012-11-27 15:38:35 +0000
committerSimon Glass <sjg@chromium.org>2012-11-28 11:40:03 -0800
commite4fb6116495eafbeee5ea8ff7ea245eb5e96d012 (patch)
tree3ef9c795b051ff68d0761f3afe4be192b1ea8460 /arch/x86/include
parentd41b3cc16fd97da23900f79e8fefdeedeebde8f6 (diff)
downloadu-boot-imx-e4fb6116495eafbeee5ea8ff7ea245eb5e96d012.zip
u-boot-imx-e4fb6116495eafbeee5ea8ff7ea245eb5e96d012.tar.gz
u-boot-imx-e4fb6116495eafbeee5ea8ff7ea245eb5e96d012.tar.bz2
x86: Forward declare gd_t
So it can be used as a type in struct global_data and remove an ugly typecast Signed-off-by: Graeme Russ <graeme.russ@gmail.com> Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Marek Vasut <marex@denx.de>
Diffstat (limited to 'arch/x86/include')
-rw-r--r--arch/x86/include/asm/global_data.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/x86/include/asm/global_data.h b/arch/x86/include/asm/global_data.h
index bce999f..13a3ce8 100644
--- a/arch/x86/include/asm/global_data.h
+++ b/arch/x86/include/asm/global_data.h
@@ -33,9 +33,11 @@
#ifndef __ASSEMBLY__
-typedef struct global_data {
+typedef struct global_data gd_t;
+
+struct global_data {
/* NOTE: gd_addr MUST be first member of struct global_data! */
- unsigned long gd_addr; /* Location of Global Data */
+ gd_t *gd_addr; /* Location of Global Data */
bd_t *bd;
unsigned long flags;
unsigned int baudrate;
@@ -57,7 +59,7 @@ typedef struct global_data {
unsigned long reset_status; /* reset status register at boot */
void **jt; /* jump table */
char env_buf[32]; /* buffer for getenv() before reloc. */
-} gd_t;
+};
static inline gd_t *get_fs_gd_ptr(void)
{