From patchwork Fri Dec 14 06:49:11 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 206331 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 8BC862C0097 for ; Fri, 14 Dec 2012 18:00:09 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B79774A187; Fri, 14 Dec 2012 07:59: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 85Ddnv2mnubQ; Fri, 14 Dec 2012 07:59:38 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D7F7A4A1FA; Fri, 14 Dec 2012 07:55:27 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id ECE9C4A13B for ; Fri, 14 Dec 2012 07:53:23 +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 93P6vgZfbHUc for ; Fri, 14 Dec 2012 07:53:19 +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 9B7FF4A142 for ; Fri, 14 Dec 2012 07:50:25 +0100 (CET) Received: by mail-qa0-f74.google.com with SMTP id r4so48759qaq.3 for ; Thu, 13 Dec 2012 22:50:23 -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=AjH4a1jgB7X0OOubtM8vw+wkZ6TCKuPAr15dR9keLf8=; b=bnhiE8gHvkhaO2odLoOb2LcG0y70dsjwon2fHd4i6qTOXs5f/8ULPtDFp+GWfqzk3H vJe6m2q0uJacONB9PmsRXMDbFsiOpovTPrFDKEj2xFoUPt1sd01C7YuPBuismyXg5Txp UB29W+7vpb7yGd4o9PnvLve3WdZ1DT1pxsCWjvfOWc5FcVHcqnTBq2STE++LObb141cp DNJmTE1vw6kpnv5c51J3aTl1YRSKUZ1b7fOWgd3Vyucr0iwYYujLzJDY0VB4Ezt/YQA2 O8CnczSkP2DeqQxkMDYvzJEHHXpKiUcCz0aOle4N/ep/iQR7O/oU4akIKB/SXtpwbe47 wJbg== Received: by 10.236.165.5 with SMTP id d5mr1281929yhl.22.1355467822911; Thu, 13 Dec 2012 22:50:22 -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 j36si184325anp.0.2012.12.13.22.50.22 (version=TLSv1/SSLv3 cipher=AES128-SHA); Thu, 13 Dec 2012 22:50:22 -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 B97FA100048; Thu, 13 Dec 2012 22:50:22 -0800 (PST) Received: by kaka.mtv.corp.google.com (Postfix, from userid 121222) id 9B1BC160878; Thu, 13 Dec 2012 22:50:22 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Date: Thu, 13 Dec 2012 22:49:11 -0800 Message-Id: <1355467767-29575-43-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: ALoCoQnX87exfyo7UK3ymezmqmnustltIlHcbAUVUbwRb/Or0uCUf5zmfCVB2UcwTlXvXZDEaRir9vbKx1oxWVzNZD6DykPOgFSU4gHNl7CtL5PeC+8zaZVbOpowQis2Z3eQtotV3QqCo9OSeQBVwy7Gs45ZKex1mPAwmiGo2tLHTLLQaotVuGOxqxJWAvWnQXqysZ6bY4Yj Cc: Tom Rini Subject: [U-Boot] [PATCH v2 42/58] 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 --- Changes in v2: None 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();