From e4fb6116495eafbeee5ea8ff7ea245eb5e96d012 Mon Sep 17 00:00:00 2001 From: Graeme Russ Date: Tue, 27 Nov 2012 15:38:35 +0000 Subject: 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 Signed-off-by: Simon Glass Acked-by: Marek Vasut --- arch/x86/include/asm/global_data.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'arch/x86/include/asm/global_data.h') diff --git a/arch/x86/include/asm/global_data.h b/arch/x86/include/asm/global_data.h index bce999f41ce..13a3ce8fbf5 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) { -- cgit v1.2.3 From 8d61625d6a73307857f80002949583105545dbbc Mon Sep 17 00:00:00 2001 From: Graeme Russ Date: Tue, 27 Nov 2012 15:38:36 +0000 Subject: x86: Put global data on the stack Putting global data on the stack simplifies the init process (and makes it slightly quicker). During the 'flash' stage of the init sequence, global data is in the CAR stack. After SDRAM is initialised, global data is copied from CAR to the SDRAM stack Signed-off-by: Graeme Russ Signed-off-by: Simon Glass --- arch/x86/include/asm/global_data.h | 1 - 1 file changed, 1 deletion(-) (limited to 'arch/x86/include/asm/global_data.h') diff --git a/arch/x86/include/asm/global_data.h b/arch/x86/include/asm/global_data.h index 13a3ce8fbf5..59c2a9095bd 100644 --- a/arch/x86/include/asm/global_data.h +++ b/arch/x86/include/asm/global_data.h @@ -54,7 +54,6 @@ struct global_data { unsigned long relocaddr; /* Start address of U-Boot in RAM */ unsigned long start_addr_sp; /* start_addr_stackpointer */ unsigned long gdt_addr; /* Location of GDT */ - unsigned long new_gd_addr; /* New location of Global Data */ phys_size_t ram_size; /* RAM size */ unsigned long reset_status; /* reset status register at boot */ void **jt; /* jump table */ -- cgit v1.2.3 From c953fbee540c4c5a13f747a92daa59c24a9aaacf Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Wed, 10 Oct 2012 13:12:55 +0000 Subject: x86: Add some missing includes I suspect these includes were usually available because something else included them earlier or because they were brought in transitively. Change-Id: I6aae2ac94dc792eac6febb4345e8125f69f70988 Signed-off-by: Gabe Black Signed-off-by: Simon Glass --- arch/x86/include/asm/global_data.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch/x86/include/asm/global_data.h') diff --git a/arch/x86/include/asm/global_data.h b/arch/x86/include/asm/global_data.h index 59c2a9095bd..b8961baaebb 100644 --- a/arch/x86/include/asm/global_data.h +++ b/arch/x86/include/asm/global_data.h @@ -33,6 +33,8 @@ #ifndef __ASSEMBLY__ +#include + typedef struct global_data gd_t; struct global_data { -- cgit v1.2.3 From 028a56289a443dd6209a7b8d9f480367f528da51 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Sat, 20 Oct 2012 12:33:08 +0000 Subject: x86: Add an fdt pointer to the global data structure This change adds a pointer to the global data structure in x86 to point to the device tree. This mirrors an identical pointer in ARM. Signed-off-by: Gabe Black Signed-off-by: Simon Glass --- arch/x86/include/asm/global_data.h | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/x86/include/asm/global_data.h') diff --git a/arch/x86/include/asm/global_data.h b/arch/x86/include/asm/global_data.h index b8961baaebb..35110a33322 100644 --- a/arch/x86/include/asm/global_data.h +++ b/arch/x86/include/asm/global_data.h @@ -58,6 +58,7 @@ struct global_data { unsigned long gdt_addr; /* Location of GDT */ phys_size_t ram_size; /* RAM size */ unsigned long reset_status; /* reset status register at boot */ + const void *fdt_blob; /* Our device tree, NULL if none */ void **jt; /* jump table */ char env_buf[32]; /* buffer for getenv() before reloc. */ }; -- cgit v1.2.3 From 91d82a29e7aec12c97dcd4a4be1962f6d794b35c Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Sat, 3 Nov 2012 11:41:28 +0000 Subject: x86: Add back cold- and warm-boot flags These were removed, but actually are useful. Cold means that we started from a reset/power on. Warm means that we started from another U-Boot. We determine whether u-boot on x86 was warm or cold booted (really if it started at the beginning of the text segment or at the ELF entry point). We plumb the result through to the global data structure. Signed-off-by: Simon Glass --- arch/x86/include/asm/global_data.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'arch/x86/include/asm/global_data.h') diff --git a/arch/x86/include/asm/global_data.h b/arch/x86/include/asm/global_data.h index 35110a33322..dc6402b67db 100644 --- a/arch/x86/include/asm/global_data.h +++ b/arch/x86/include/asm/global_data.h @@ -78,6 +78,12 @@ static inline gd_t *get_fs_gd_ptr(void) #include +/* + * Our private Global Data Flags + */ +#define GD_FLG_COLD_BOOT 0x00100 /* Cold Boot */ +#define GD_FLG_WARM_BOOT 0x00200 /* Warm Boot */ + #define DECLARE_GLOBAL_DATA_PTR #endif /* __ASM_GBL_DATA_H */ -- cgit v1.2.3