From patchwork Tue Jun 28 08:48:55 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Graeme Russ X-Patchwork-Id: 102341 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 092EFB6F6B for ; Tue, 28 Jun 2011 18:49:23 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 970C4280E8; Tue, 28 Jun 2011 10:49:20 +0200 (CEST) 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 86AY3ayeZ4bX; Tue, 28 Jun 2011 10:49:20 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id DAEAB280CB; Tue, 28 Jun 2011 10:49:18 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 114D3280CB for ; Tue, 28 Jun 2011 10:49:17 +0200 (CEST) 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 UIytDRrgEa9Q for ; Tue, 28 Jun 2011 10:49:14 +0200 (CEST) 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-iy0-f172.google.com (mail-iy0-f172.google.com [209.85.210.172]) by theia.denx.de (Postfix) with ESMTPS id 5101D280B4 for ; Tue, 28 Jun 2011 10:49:12 +0200 (CEST) Received: by iye7 with SMTP id 7so5135822iye.3 for ; Tue, 28 Jun 2011 01:49:09 -0700 (PDT) Received: by 10.42.221.72 with SMTP id ib8mr8434766icb.413.1309250949118; Tue, 28 Jun 2011 01:49:09 -0700 (PDT) Received: from localhost.localdomain (d122-104-32-184.sbr6.nsw.optusnet.com.au [122.104.32.184]) by mx.google.com with ESMTPS id f19sm3511511ibl.15.2011.06.28.01.49.06 (version=SSLv3 cipher=OTHER); Tue, 28 Jun 2011 01:49:08 -0700 (PDT) From: Graeme Russ To: u-boot@lists.denx.de Date: Tue, 28 Jun 2011 18:48:55 +1000 Message-Id: <1309250935-3280-1-git-send-email-graeme.russ@gmail.com> X-Mailer: git-send-email 1.7.5.2.317.g391b14 Subject: [U-Boot] [PATCH][x86]Minor cleanups X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 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 - Make offset into Global Data for Relocation Offset a generated value for use in assembler - Delete unused Global Data offset #defines - Delete unused sc520 MMCR offset #defines Signed-off-by: Graeme Russ --- arch/x86/cpu/start.S | 3 ++- arch/x86/include/asm/global_data.h | 19 ------------------- arch/x86/include/asm/ic/sc520.h | 8 -------- lib/asm-offsets.c | 3 +++ 4 files changed, 5 insertions(+), 28 deletions(-) -- 1.7.5.2.317.g391b14 diff --git a/arch/x86/cpu/start.S b/arch/x86/cpu/start.S index 7ccc076..31de0f8 100644 --- a/arch/x86/cpu/start.S +++ b/arch/x86/cpu/start.S @@ -30,6 +30,7 @@ #include #include #include +#include .section .text .code32 @@ -114,7 +115,7 @@ relocate_code: /* Setup call address of in-RAM copy of board_init_r() */ movl $board_init_r, %ebp - addl (GD_RELOC_OFF * 4)(%edx), %ebp + addl (GENERATED_GD_RELOC_OFF)(%edx), %ebp /* Setup parameters to board_init_r() */ movl %edx, %eax diff --git a/arch/x86/include/asm/global_data.h b/arch/x86/include/asm/global_data.h index f8a16d6..f977dbe 100644 --- a/arch/x86/include/asm/global_data.h +++ b/arch/x86/include/asm/global_data.h @@ -58,25 +58,6 @@ extern gd_t *gd; #endif -/* Word Offsets into Global Data - MUST match struct gd_t */ -#define GD_BD 0 -#define GD_FLAGS 1 -#define GD_BAUDRATE 2 -#define GD_HAVE_CONSOLE 3 -#define GD_RELOC_OFF 4 -#define GD_LOAD_OFF 5 -#define GD_ENV_ADDR 6 -#define GD_ENV_VALID 7 -#define GD_CPU_CLK 8 -#define GD_BUS_CLK 9 -#define GD_RELOC_ADDR 10 -#define GD_START_ADDR_SP 11 -#define GD_RAM_SIZE 12 -#define GD_RESET_STATUS 13 -#define GD_JT 14 - -#define GD_SIZE 15 - /* * Global Data Flags */ diff --git a/arch/x86/include/asm/ic/sc520.h b/arch/x86/include/asm/ic/sc520.h index 956c1c2..8b5f47c 100644 --- a/arch/x86/include/asm/ic/sc520.h +++ b/arch/x86/include/asm/ic/sc520.h @@ -260,14 +260,6 @@ extern sc520_mmcr_t *sc520_mmcr; #define SC520_MMCR_BASE 0xfffef000 /* MMCR Addresses (required for assembler code) */ -#define SC520_DRCCTL (SC520_MMCR_BASE + 0x010) -#define SC520_DRCTMCTL (SC520_MMCR_BASE + 0x012) -#define SC520_DRCCFG (SC520_MMCR_BASE + 0x014) -#define SC520_DRCBENDADR (SC520_MMCR_BASE + 0x018) -#define SC520_ECCCTL (SC520_MMCR_BASE + 0x020) -#define SC520_DBCTL (SC520_MMCR_BASE + 0x040) -#define SC520_ECCINT (SC520_MMCR_BASE + 0xd18) - #define SC520_PAR0 (SC520_MMCR_BASE + 0x088) #define SC520_PAR1 (SC520_PAR0 + (0x04 * 1)) #define SC520_PAR2 (SC520_PAR0 + (0x04 * 2)) diff --git a/lib/asm-offsets.c b/lib/asm-offsets.c index c88f5d4..6ae32dc 100644 --- a/lib/asm-offsets.c +++ b/lib/asm-offsets.c @@ -28,5 +28,8 @@ int main(void) DEFINE(GENERATED_BD_INFO_SIZE, (sizeof(struct bd_info) + 15) & ~15); + DEFINE(GENERATED_GD_RELOC_OFF, + (offsetof(gd_t, reloc_off))); + return 0; }