From patchwork Fri Nov 16 21:20:26 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 199756 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 F35FC2C0090 for ; Sat, 17 Nov 2012 08:32:51 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0329E4A2DF; Fri, 16 Nov 2012 22:32:32 +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 jB56uMK4grPC; Fri, 16 Nov 2012 22:32:31 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 08C7A4A1F3; Fri, 16 Nov 2012 22:30:23 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 524CC4A18C for ; Fri, 16 Nov 2012 22:29:16 +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 r5GOP0oFRzgv for ; Fri, 16 Nov 2012 22:29:15 +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-qa0-f74.google.com (mail-qa0-f74.google.com [209.85.216.74]) by theia.denx.de (Postfix) with ESMTPS id 91F314A17C for ; Fri, 16 Nov 2012 22:28:52 +0100 (CET) Received: by mail-qa0-f74.google.com with SMTP id g40so358196qab.3 for ; Fri, 16 Nov 2012 13:28:51 -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=w7PjqOtx5287HenSkUsSuQYKpMR4r/q3NRetsRk06Co=; b=Yur7fgIdRihLkUyfBO/D1NMzWyXSeNlpFH+YlOqY4MBF44PSJQmL0UR01XyeuNNmvx XTf+AYZwC60ZiYuY8rjA/RN64lCI1nufc/HIWBeTIymMx3GXzin5jAHV5HtHgI1uToTf FvsYbuqsUeL5N5v/quiE3CaX0lssrJC5HGoGkcEWkVs7MIKZer9V+ipgkdco6tBQWXoJ BWXObPzspXsOxI/EVN2ca3iy5rikEx87be4LO6Et4/nAmPvnHmHLR6KvNDEawTeq8snT HTpf/azV/70oXEDgGI+5Jsm4sAGcGbSf48Gr8utHXllB9vs8fyGBUaGsvZmoE2nS9gXK P9Kg== Received: by 10.236.151.13 with SMTP id a13mr4075139yhk.2.1353101331556; Fri, 16 Nov 2012 13:28:51 -0800 (PST) Received: from wpzn3.hot.corp.google.com (216-239-44-65.google.com [216.239.44.65]) by gmr-mx.google.com with ESMTPS id j11si113115ank.2.2012.11.16.13.28.51 (version=TLSv1/SSLv3 cipher=AES128-SHA); Fri, 16 Nov 2012 13:28:51 -0800 (PST) Received: from kaka.mtv.corp.google.com (kaka.mtv.corp.google.com [172.22.73.79]) by wpzn3.hot.corp.google.com (Postfix) with ESMTP id 61F18100049; Fri, 16 Nov 2012 13:28:51 -0800 (PST) Received: by kaka.mtv.corp.google.com (Postfix, from userid 121222) id 391A516086A; Fri, 16 Nov 2012 13:28:51 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Date: Fri, 16 Nov 2012 13:20:26 -0800 Message-Id: <1353100842-20126-42-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 1.7.7.3 In-Reply-To: <1353100842-20126-1-git-send-email-sjg@chromium.org> References: <1353100842-20126-1-git-send-email-sjg@chromium.org> X-Gm-Message-State: ALoCoQl6Ws7Cc1ixDKwdWKFnatQZ/LGin2bIMvDXQ7zc8x+czHc4IEUdRgBUmjdd71AYNYJHNxUiTZwQzn0OB9iYTJXN5xewPFoQA+ctHvKBeeS/zY5ApEYkJc89WlRYCYMW7MH6sNCN490nzV5GNeY2o6GHovmTJNoXTUVNgVhYY6dzf4+K0yA5OgXM7r1L/YKwHFL4UtND Cc: Tom Rini Subject: [U-Boot] [PATCH 41/57] sandbox: Move ram_buf to arch_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 Move this field into arch_global_data and tidy up. Signed-off-by: Simon Glass --- arch/sandbox/cpu/cpu.c | 2 +- arch/sandbox/include/asm/global_data.h | 2 +- arch/sandbox/lib/board.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/sandbox/cpu/cpu.c b/arch/sandbox/cpu/cpu.c index d7684d3..b2788d5 100644 --- a/arch/sandbox/cpu/cpu.c +++ b/arch/sandbox/cpu/cpu.c @@ -54,7 +54,7 @@ int cleanup_before_linux(void) void *map_physmem(phys_addr_t paddr, unsigned long len, unsigned long flags) { - return (void *)(gd->ram_buf + paddr); + return (void *)(gd->arch.ram_buf + paddr); } void flush_dcache_range(unsigned long start, unsigned long stop) diff --git a/arch/sandbox/include/asm/global_data.h b/arch/sandbox/include/asm/global_data.h index f33f465..3ba7ed5 100644 --- a/arch/sandbox/include/asm/global_data.h +++ b/arch/sandbox/include/asm/global_data.h @@ -28,6 +28,7 @@ /* Architecture-specific global data */ struct arch_global_data { + u8 *ram_buf; /* emulated RAM buffer */ }; /* @@ -46,7 +47,6 @@ typedef struct global_data { unsigned long env_addr; /* Address of Environment struct */ unsigned long env_valid; /* Checksum of Environment valid? */ unsigned long fb_base; /* base address of frame buffer */ - u8 *ram_buf; /* emulated RAM buffer */ phys_size_t ram_size; /* RAM size */ const void *fdt_blob; /* Our device tree, NULL if none */ void **jt; /* jump table */ diff --git a/arch/sandbox/lib/board.c b/arch/sandbox/lib/board.c index 83858c1..3752fab 100644 --- a/arch/sandbox/lib/board.c +++ b/arch/sandbox/lib/board.c @@ -174,7 +174,7 @@ void board_init_f(ulong bootflag) mem = os_malloc(CONFIG_SYS_SDRAM_SIZE); assert(mem); - gd->ram_buf = mem; + gd->arch.ram_buf = mem; addr = (ulong)(mem + size); /* @@ -227,8 +227,8 @@ void board_init_r(gd_t *id, ulong dest_addr) #endif /* The Malloc area is at the top of simulated DRAM */ - mem_malloc_init((ulong)gd->ram_buf + gd->ram_size - TOTAL_MALLOC_LEN, - TOTAL_MALLOC_LEN); + mem_malloc_init((ulong)gd->arch.ram_buf + gd->ram_size - + TOTAL_MALLOC_LEN, TOTAL_MALLOC_LEN); /* initialize environment */ env_relocate();