We plan to move architecture-specific data into a separate structure so
that we can make the rest of it common.
As a first step, create struct arch_global_data to hold these fields.
Initially it is empty.
This patch applies to all archs at once. I can split it if this is really
a pain.
Signed-off-by: Simon Glass <sjg@chromium.org>
14 files changed:
#ifndef __ASM_GBL_DATA_H
#define __ASM_GBL_DATA_H
#ifndef __ASM_GBL_DATA_H
#define __ASM_GBL_DATA_H
+
+/* Architecture-specific global data */
+struct arch_global_data {
+};
+
/*
* The following data structure is placed in some memory which is
* available very early after boot (like DPRAM on MPC8xx/MPC82xx, or
/*
* The following data structure is placed in some memory which is
* available very early after boot (like DPRAM on MPC8xx/MPC82xx, or
unsigned long post_log_res; /* success of POST test */
unsigned long post_init_f_time; /* When post_init_f started */
#endif
unsigned long post_log_res; /* success of POST test */
unsigned long post_init_f_time; /* When post_init_f started */
#endif
+ struct arch_global_data arch; /* architecture-specific data */
} gd_t;
#include <asm-generic/global_data_flags.h>
} gd_t;
#include <asm-generic/global_data_flags.h>
#ifndef __ASM_GLOBAL_DATA_H__
#define __ASM_GLOBAL_DATA_H__
#ifndef __ASM_GLOBAL_DATA_H__
#define __ASM_GLOBAL_DATA_H__
+/* Architecture-specific global data */
+struct arch_global_data {
+};
+
/*
* The following data structure is placed in some memory wich is
* available very early after boot (like DPRAM on MPC8xx/MPC82xx, or
/*
* The following data structure is placed in some memory wich is
* available very early after boot (like DPRAM on MPC8xx/MPC82xx, or
#endif
void **jt; /* jump table */
char env_buf[32]; /* buffer for getenv() before reloc. */
#endif
void **jt; /* jump table */
char env_buf[32]; /* buffer for getenv() before reloc. */
+ struct arch_global_data arch; /* architecture-specific data */
} gd_t;
#include <asm-generic/global_data_flags.h>
} gd_t;
#include <asm-generic/global_data_flags.h>
+/* Architecture-specific global data */
+struct arch_global_data {
+};
+
/*
* The following data structure is placed in some memory wich is
* available very early after boot (like DPRAM on MPC8xx/MPC82xx, or
/*
* The following data structure is placed in some memory wich is
* available very early after boot (like DPRAM on MPC8xx/MPC82xx, or
void **jt; /* jump table */
char env_buf[32]; /* buffer for getenv() before reloc. */
void **jt; /* jump table */
char env_buf[32]; /* buffer for getenv() before reloc. */
+ struct arch_global_data arch; /* architecture-specific data */
} gd_t;
#include <asm-generic/global_data_flags.h>
} gd_t;
#include <asm-generic/global_data_flags.h>
#ifndef __ASM_GBL_DATA_H
#define __ASM_GBL_DATA_H
#ifndef __ASM_GBL_DATA_H
#define __ASM_GBL_DATA_H
+
+/* Architecture-specific global data */
+struct arch_global_data {
+};
+
/*
* The following data structure is placed in some memory wich is
* available very early after boot (like DPRAM on MPC8xx/MPC82xx, or
/*
* The following data structure is placed in some memory wich is
* available very early after boot (like DPRAM on MPC8xx/MPC82xx, or
#endif
void **jt; /* Standalone app jump table */
char env_buf[32]; /* buffer for getenv() before reloc. */
#endif
void **jt; /* Standalone app jump table */
char env_buf[32]; /* buffer for getenv() before reloc. */
+ struct arch_global_data arch; /* architecture-specific data */
} gd_t;
#include <asm-generic/global_data_flags.h>
} gd_t;
#include <asm-generic/global_data_flags.h>
#ifndef __ASM_GBL_DATA_H
#define __ASM_GBL_DATA_H
#ifndef __ASM_GBL_DATA_H
#define __ASM_GBL_DATA_H
+
+/* Architecture-specific global data */
+struct arch_global_data {
+};
+
/*
* The following data structure is placed in some memory wich is
* available very early after boot (like DPRAM on MPC8xx/MPC82xx, or
/*
* The following data structure is placed in some memory wich is
* available very early after boot (like DPRAM on MPC8xx/MPC82xx, or
unsigned long fb_base; /* base address of frame buffer */
void **jt; /* jump table */
char env_buf[32]; /* buffer for getenv() before reloc. */
unsigned long fb_base; /* base address of frame buffer */
void **jt; /* jump table */
char env_buf[32]; /* buffer for getenv() before reloc. */
+ struct arch_global_data arch; /* architecture-specific data */
} gd_t;
#include <asm-generic/global_data_flags.h>
} gd_t;
#include <asm-generic/global_data_flags.h>
+/* Architecture-specific global data */
+struct arch_global_data {
+};
+
/*
* The following data structure is placed in some memory wich is
* available very early after boot (like DPRAM on MPC8xx/MPC82xx, or
/*
* The following data structure is placed in some memory wich is
* available very early after boot (like DPRAM on MPC8xx/MPC82xx, or
unsigned long env_valid; /* Checksum of Environment valid? */
void **jt; /* jump table */
char env_buf[32]; /* buffer for getenv() before reloc. */
unsigned long env_valid; /* Checksum of Environment valid? */
void **jt; /* jump table */
char env_buf[32]; /* buffer for getenv() before reloc. */
+ struct arch_global_data arch; /* architecture-specific data */
} gd_t;
#include <asm-generic/global_data_flags.h>
} gd_t;
#include <asm-generic/global_data_flags.h>
#ifndef __ASM_GBL_DATA_H
#define __ASM_GBL_DATA_H
#ifndef __ASM_GBL_DATA_H
#define __ASM_GBL_DATA_H
+
+/* Architecture-specific global data */
+struct arch_global_data {
+};
+
/*
* The following data structure is placed in some memory wich is
* available very early after boot (like DPRAM on MPC8xx/MPC82xx, or
/*
* The following data structure is placed in some memory wich is
* available very early after boot (like DPRAM on MPC8xx/MPC82xx, or
void **jt; /* jump table */
char env_buf[32]; /* buffer for getenv() before reloc. */
void **jt; /* jump table */
char env_buf[32]; /* buffer for getenv() before reloc. */
+ struct arch_global_data arch; /* architecture-specific data */
} gd_t;
#include <asm-generic/global_data_flags.h>
} gd_t;
#include <asm-generic/global_data_flags.h>
#ifndef __ASM_NIOS2_GLOBALDATA_H_
#define __ASM_NIOS2_GLOBALDATA_H_
#ifndef __ASM_NIOS2_GLOBALDATA_H_
#define __ASM_NIOS2_GLOBALDATA_H_
+/* Architecture-specific global data */
+struct arch_global_data {
+};
+
typedef struct global_data {
bd_t *bd;
unsigned long flags;
typedef struct global_data {
bd_t *bd;
unsigned long flags;
#endif
void **jt; /* Standalone app jump table */
char env_buf[32]; /* buffer for getenv() before reloc. */
#endif
void **jt; /* Standalone app jump table */
char env_buf[32]; /* buffer for getenv() before reloc. */
+ struct arch_global_data arch; /* architecture-specific data */
} gd_t;
#include <asm-generic/global_data_flags.h>
} gd_t;
#include <asm-generic/global_data_flags.h>
#ifndef __ASM_GBL_DATA_H
#define __ASM_GBL_DATA_H
#ifndef __ASM_GBL_DATA_H
#define __ASM_GBL_DATA_H
+
+/* Architecture-specific global data */
+struct arch_global_data {
+};
+
/*
* The following data structure is placed in some memory wich is
* available very early after boot (like DPRAM on MPC8xx/MPC82xx, or
/*
* The following data structure is placed in some memory wich is
* available very early after boot (like DPRAM on MPC8xx/MPC82xx, or
unsigned long fb_base; /* base address of frame buffer */
void **jt; /* jump table */
char env_buf[32]; /* buffer for getenv() before reloc. */
unsigned long fb_base; /* base address of frame buffer */
void **jt; /* jump table */
char env_buf[32]; /* buffer for getenv() before reloc. */
+ struct arch_global_data arch; /* architecture-specific data */
} gd_t;
#include <asm-generic/global_data_flags.h>
} gd_t;
#include <asm-generic/global_data_flags.h>
#include "config.h"
#include "asm/types.h"
#include "config.h"
#include "asm/types.h"
+/* Architecture-specific global data */
+struct arch_global_data {
+};
+
/*
* The following data structure is placed in some memory wich is
* available very early after boot (like DPRAM on MPC8xx/MPC82xx, or
/*
* The following data structure is placed in some memory wich is
* available very early after boot (like DPRAM on MPC8xx/MPC82xx, or
#endif
void **jt; /* jump table */
char env_buf[32]; /* buffer for getenv() before reloc. */
#endif
void **jt; /* jump table */
char env_buf[32]; /* buffer for getenv() before reloc. */
+ struct arch_global_data arch; /* architecture-specific data */
} gd_t;
#include <asm-generic/global_data_flags.h>
} gd_t;
#include <asm-generic/global_data_flags.h>
#ifndef __ASM_GBL_DATA_H
#define __ASM_GBL_DATA_H
#ifndef __ASM_GBL_DATA_H
#define __ASM_GBL_DATA_H
+
+/* Architecture-specific global data */
+struct arch_global_data {
+};
+
/*
* The following data structure is placed in some memory wich is
* available very early after boot (like DPRAM on MPC8xx/MPC82xx, or
/*
* The following data structure is placed in some memory wich is
* available very early after boot (like DPRAM on MPC8xx/MPC82xx, or
const void *fdt_blob; /* Our device tree, NULL if none */
void **jt; /* jump table */
char env_buf[32]; /* buffer for getenv() before reloc. */
const void *fdt_blob; /* Our device tree, NULL if none */
void **jt; /* jump table */
char env_buf[32]; /* buffer for getenv() before reloc. */
+ struct arch_global_data arch; /* architecture-specific data */
} gd_t;
#include <asm-generic/global_data_flags.h>
} gd_t;
#include <asm-generic/global_data_flags.h>
#ifndef __ASM_SH_GLOBALDATA_H_
#define __ASM_SH_GLOBALDATA_H_
#ifndef __ASM_SH_GLOBALDATA_H_
#define __ASM_SH_GLOBALDATA_H_
+/* Architecture-specific global data */
+struct arch_global_data {
+};
+
typedef struct global_data
{
bd_t *bd;
typedef struct global_data
{
bd_t *bd;
unsigned long env_valid; /* Checksum of Environment valid */
void **jt; /* Standalone app jump table */
char env_buf[32]; /* buffer for getenv() before reloc. */
unsigned long env_valid; /* Checksum of Environment valid */
void **jt; /* Standalone app jump table */
char env_buf[32]; /* buffer for getenv() before reloc. */
+ struct arch_global_data arch; /* architecture-specific data */
} gd_t;
#include <asm-generic/global_data_flags.h>
} gd_t;
#include <asm-generic/global_data_flags.h>
+/* Architecture-specific global data */
+struct arch_global_data {
+};
+
/*
* The following data structure is placed in some memory wich is
* available very early after boot (like DPRAM on MPC8xx/MPC82xx, or
/*
* The following data structure is placed in some memory wich is
* available very early after boot (like DPRAM on MPC8xx/MPC82xx, or
#endif
void **jt; /* jump table */
char env_buf[32]; /* buffer for getenv() before reloc. */
#endif
void **jt; /* jump table */
char env_buf[32]; /* buffer for getenv() before reloc. */
+ struct arch_global_data arch; /* architecture-specific data */
} gd_t;
#include <asm-generic/global_data_flags.h>
} gd_t;
#include <asm-generic/global_data_flags.h>
#ifndef __ASM_GBL_DATA_H
#define __ASM_GBL_DATA_H
#ifndef __ASM_GBL_DATA_H
#define __ASM_GBL_DATA_H
+
+#ifndef __ASSEMBLY__
+
+/* Architecture-specific global data */
+struct arch_global_data {
+};
+
/*
* The following data structure is placed in some memory wich is
* available very early after boot (like DPRAM on MPC8xx/MPC82xx, or
/*
* The following data structure is placed in some memory wich is
* available very early after boot (like DPRAM on MPC8xx/MPC82xx, or
* up the memory controller so that we can use RAM).
*/
* up the memory controller so that we can use RAM).
*/
#include <asm/u-boot.h>
typedef struct global_data gd_t;
struct global_data {
#include <asm/u-boot.h>
typedef struct global_data gd_t;
struct global_data {
+ struct arch_global_data arch; /* architecture-specific data */
/* NOTE: gd_addr MUST be first member of struct global_data! */
gd_t *gd_addr; /* Location of Global Data */
bd_t *bd;
/* NOTE: gd_addr MUST be first member of struct global_data! */
gd_t *gd_addr; /* Location of Global Data */
bd_t *bd;