From patchwork Fri Dec 14 06:48:30 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 206369 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 2883C2C0082 for ; Fri, 14 Dec 2012 19:47:14 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3EDD24A22B; Fri, 14 Dec 2012 09:47:12 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IPvgwVHQ+Sd9; Fri, 14 Dec 2012 09:47:12 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AA5674A224; Fri, 14 Dec 2012 09:47:08 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2F2194A11E for ; Fri, 14 Dec 2012 07:50:38 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jh0jzqmb60FG for ; Fri, 14 Dec 2012 07:50:34 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-wg0-f74.google.com (mail-wg0-f74.google.com [74.125.82.74]) by theia.denx.de (Postfix) with ESMTPS id 0A8ED4A120 for ; Fri, 14 Dec 2012 07:50:21 +0100 (CET) Received: by mail-wg0-f74.google.com with SMTP id dt14so155706wgb.3 for ; Thu, 13 Dec 2012 22:50:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=uH+WFUKNSyU9hw/lX9qi+vG5DUevpvRpl24gVYeDX4c=; b=hV9BQ2JIQildVGeeu5/8shG8mwZ7ctiO6NAS42mke7892mA8RKrj1+woSAl9SVE7Z0 qypSUEEEP4SWiTSN3VbH4Fx+0MLF44Q24zQ6ZAjblMxW0ctOJhPFXu44pohJSuclXuH7 F2VsOT7YreIbXYAh8zJryXE/o4kEPDp0m5FbA+h42aV6dt8oYFDyDxzWjEY+PTJk/fu3 mLAjKz6GUlH6tz19Uy5pWFIt2jSLH1hmWQuLnwmCRBvF2GFwOWNMjXRKuuADb6p/tRDO OWwNatLoFlgQgZ39Su8xAGBwTX4+IKpIQ7APhWzSjpytqWSmniOD42JUf18OvpF2Kbyn 1tuw== Received: by 10.14.214.197 with SMTP id c45mr4605917eep.7.1355467819993; Thu, 13 Dec 2012 22:50:19 -0800 (PST) Received: from hpza10.eem.corp.google.com ([74.125.121.33]) by gmr-mx.google.com with ESMTPS id g9si962687eeo.1.2012.12.13.22.50.19 (version=TLSv1/SSLv3 cipher=AES128-SHA); Thu, 13 Dec 2012 22:50:19 -0800 (PST) Received: from kaka.mtv.corp.google.com (kaka.mtv.corp.google.com [172.22.73.79]) by hpza10.eem.corp.google.com (Postfix) with ESMTP id 436BB200057; Thu, 13 Dec 2012 22:50:19 -0800 (PST) Received: by kaka.mtv.corp.google.com (Postfix, from userid 121222) id A1C2B16079A; Thu, 13 Dec 2012 22:50:18 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Date: Thu, 13 Dec 2012 22:48:30 -0800 Message-Id: <1355467767-29575-2-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 1.7.7.3 In-Reply-To: <1355467767-29575-1-git-send-email-sjg@chromium.org> References: <1355467767-29575-1-git-send-email-sjg@chromium.org> X-Gm-Message-State: ALoCoQkulW4iDzLRRjEhJ9kD4BsnpBNq0paD40GJg0WfHkiDeDb/Qfm4PFSrJkt7RTuRyg1HSiPjw4PPK74wwOuk/Ug59aqOLs8DWGAKca5mH3NDerBScOV2Ppma7lkyqVNkmQloRBNDe135lHDil2IEOxBEdivog/mxin3SPLmKhNEgJF+JldNafJq7Cy3B/a05pofP2+lV X-Mailman-Approved-At: Fri, 14 Dec 2012 09:47:06 +0100 Cc: Scott McNutt , Kim Phillips , Kumar Gala , Macpaul Lin , Tom Rini , Andy Fleming , Stefan Roese , Shinya Kuribayashi Subject: [U-Boot] [PATCH v2 01/58] Add architecture-specific global data X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de 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 --- Changes in v2: - Rebase to master arch/arm/include/asm/global_data.h | 6 ++++++ arch/avr32/include/asm/global_data.h | 5 +++++ arch/blackfin/include/asm/global_data.h | 5 +++++ arch/m68k/include/asm/global_data.h | 6 ++++++ arch/microblaze/include/asm/global_data.h | 6 ++++++ arch/mips/include/asm/global_data.h | 5 +++++ arch/nds32/include/asm/global_data.h | 6 ++++++ arch/nios2/include/asm/global_data.h | 5 +++++ arch/openrisc/include/asm/global_data.h | 6 ++++++ arch/powerpc/include/asm/global_data.h | 5 +++++ arch/sandbox/include/asm/global_data.h | 6 ++++++ arch/sh/include/asm/global_data.h | 5 +++++ arch/sparc/include/asm/global_data.h | 5 +++++ arch/x86/include/asm/global_data.h | 10 ++++++++-- 14 files changed, 79 insertions(+), 2 deletions(-) diff --git a/arch/arm/include/asm/global_data.h b/arch/arm/include/asm/global_data.h index 2b9af93..8ca45ca 100644 --- a/arch/arm/include/asm/global_data.h +++ b/arch/arm/include/asm/global_data.h @@ -23,6 +23,11 @@ #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 @@ -82,6 +87,7 @@ typedef struct global_data { 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 diff --git a/arch/avr32/include/asm/global_data.h b/arch/avr32/include/asm/global_data.h index bf661e2..236a9da 100644 --- a/arch/avr32/include/asm/global_data.h +++ b/arch/avr32/include/asm/global_data.h @@ -22,6 +22,10 @@ #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 @@ -48,6 +52,7 @@ typedef struct global_data { #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 diff --git a/arch/blackfin/include/asm/global_data.h b/arch/blackfin/include/asm/global_data.h index d91e5a4..109069f 100644 --- a/arch/blackfin/include/asm/global_data.h +++ b/arch/blackfin/include/asm/global_data.h @@ -30,6 +30,10 @@ #include +/* 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 @@ -57,6 +61,7 @@ typedef struct global_data { void **jt; /* jump table */ char env_buf[32]; /* buffer for getenv() before reloc. */ + struct arch_global_data arch; /* architecture-specific data */ } gd_t; #include diff --git a/arch/m68k/include/asm/global_data.h b/arch/m68k/include/asm/global_data.h index 0cdb11c..fd8aacb 100644 --- a/arch/m68k/include/asm/global_data.h +++ b/arch/m68k/include/asm/global_data.h @@ -23,6 +23,11 @@ #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 @@ -66,6 +71,7 @@ typedef struct global_data { #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 diff --git a/arch/microblaze/include/asm/global_data.h b/arch/microblaze/include/asm/global_data.h index 2111c7c..025131c 100644 --- a/arch/microblaze/include/asm/global_data.h +++ b/arch/microblaze/include/asm/global_data.h @@ -24,6 +24,11 @@ #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 @@ -46,6 +51,7 @@ typedef struct global_data { 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 diff --git a/arch/mips/include/asm/global_data.h b/arch/mips/include/asm/global_data.h index a735a8a..99949e1 100644 --- a/arch/mips/include/asm/global_data.h +++ b/arch/mips/include/asm/global_data.h @@ -26,6 +26,10 @@ #include +/* 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 @@ -59,6 +63,7 @@ typedef struct global_data { 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 diff --git a/arch/nds32/include/asm/global_data.h b/arch/nds32/include/asm/global_data.h index b1feb2c..475bb44 100644 --- a/arch/nds32/include/asm/global_data.h +++ b/arch/nds32/include/asm/global_data.h @@ -33,6 +33,11 @@ #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 @@ -63,6 +68,7 @@ typedef struct global_data { void **jt; /* jump table */ char env_buf[32]; /* buffer for getenv() before reloc. */ + struct arch_global_data arch; /* architecture-specific data */ } gd_t; #include diff --git a/arch/nios2/include/asm/global_data.h b/arch/nios2/include/asm/global_data.h index 413b485..cf8597b 100644 --- a/arch/nios2/include/asm/global_data.h +++ b/arch/nios2/include/asm/global_data.h @@ -23,6 +23,10 @@ #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; @@ -42,6 +46,7 @@ typedef struct global_data { #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 diff --git a/arch/openrisc/include/asm/global_data.h b/arch/openrisc/include/asm/global_data.h index 96f3f1c..b478afa 100644 --- a/arch/openrisc/include/asm/global_data.h +++ b/arch/openrisc/include/asm/global_data.h @@ -24,6 +24,11 @@ #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 @@ -44,6 +49,7 @@ typedef struct global_data { 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 diff --git a/arch/powerpc/include/asm/global_data.h b/arch/powerpc/include/asm/global_data.h index cb3a80b..df621da 100644 --- a/arch/powerpc/include/asm/global_data.h +++ b/arch/powerpc/include/asm/global_data.h @@ -27,6 +27,10 @@ #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 @@ -184,6 +188,7 @@ typedef struct global_data { #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 diff --git a/arch/sandbox/include/asm/global_data.h b/arch/sandbox/include/asm/global_data.h index 78a751d..f33f465 100644 --- a/arch/sandbox/include/asm/global_data.h +++ b/arch/sandbox/include/asm/global_data.h @@ -25,6 +25,11 @@ #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 @@ -46,6 +51,7 @@ typedef struct global_data { 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 diff --git a/arch/sh/include/asm/global_data.h b/arch/sh/include/asm/global_data.h index 9a2c193..db85d4d 100644 --- a/arch/sh/include/asm/global_data.h +++ b/arch/sh/include/asm/global_data.h @@ -27,6 +27,10 @@ #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; @@ -42,6 +46,7 @@ typedef struct global_data 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 diff --git a/arch/sparc/include/asm/global_data.h b/arch/sparc/include/asm/global_data.h index aa63b35..a51c40b 100644 --- a/arch/sparc/include/asm/global_data.h +++ b/arch/sparc/include/asm/global_data.h @@ -29,6 +29,10 @@ #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 @@ -74,6 +78,7 @@ typedef struct global_data { #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 diff --git a/arch/x86/include/asm/global_data.h b/arch/x86/include/asm/global_data.h index dc6402b..39c1acf 100644 --- a/arch/x86/include/asm/global_data.h +++ b/arch/x86/include/asm/global_data.h @@ -23,6 +23,13 @@ #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 @@ -31,13 +38,12 @@ * up the memory controller so that we can use RAM). */ -#ifndef __ASSEMBLY__ - #include 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;