From patchwork Fri Nov 16 21:19:55 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 199736 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 AA3112C0090 for ; Sat, 17 Nov 2012 08:29:44 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5A05D4A1A5; Fri, 16 Nov 2012 22:29:42 +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 8fHKKJg0D0JY; Fri, 16 Nov 2012 22:29:42 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C53BA4A17F; Fri, 16 Nov 2012 22:28:58 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0E27B4A1BC for ; Fri, 16 Nov 2012 22:28:53 +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 xBa5EsLK11kZ for ; Fri, 16 Nov 2012 22:28:52 +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-bk0-f74.google.com (mail-bk0-f74.google.com [209.85.214.74]) by theia.denx.de (Postfix) with ESMTPS id 7CFD04A17E for ; Fri, 16 Nov 2012 22:28:49 +0100 (CET) Received: by mail-bk0-f74.google.com with SMTP id je9so74792bkc.3 for ; Fri, 16 Nov 2012 13:28:49 -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=evhrnmzqp/o7XdU+xowfdCDNx6nZJo5KGm2VK4ktGNM=; b=m+F+kC5VZBYacDWajM5XSNEx1VA/vhH9S0/mvKcLFfFkTaaw9MlDhPYItAEvPzCGjb fdAdIFNp2r8X03ZGNvqazwztX4k7Wvfj0xLDPYQEr91WuJGUh+TKPyNClKNcaSRjcEYF y4JkCWCD516De8OfxziXtq+M66t6Cs1oWw0JxfJWLI4OjJTAlltz7rT4J3KMqL3dnsne hC9Y4mXfLGu9J2/EP+uUb+Uhcxygn1jdi/i02KOU1JZR87PIRpBqxb8g52wXrTOBvc+6 a09uGRoKacuek0alsheeo+EYXeGadmEajh8iHbgDlotKvGhcr9htFBsaOJzF6FuRieF8 Dehw== Received: by 10.14.213.135 with SMTP id a7mr469998eep.2.1353101329303; Fri, 16 Nov 2012 13:28:49 -0800 (PST) Received: from hpza10.eem.corp.google.com ([74.125.121.33]) by gmr-mx.google.com with ESMTPS id z47si633939eel.0.2012.11.16.13.28.49 (version=TLSv1/SSLv3 cipher=AES128-SHA); Fri, 16 Nov 2012 13:28:49 -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 E929F200057; Fri, 16 Nov 2012 13:28:48 -0800 (PST) Received: by kaka.mtv.corp.google.com (Postfix, from userid 121222) id 42BC0160D6A; Fri, 16 Nov 2012 13:28:48 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Date: Fri, 16 Nov 2012 13:19:55 -0800 Message-Id: <1353100842-20126-11-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: ALoCoQmacx3PI0QjJg5CXuO3eJ0QpXmRI+Ky0qFT9bwd30mbH6g4zHyf5W1Z7hMnKnf7L2lGs6Z+NHlSmApUnZzj+x/NX0DMPR4P4Oa4jDR7uUklTwctDFdAn6cGEnfaazyQZoW0I6zBJ0olBnHB6LhXbdg9DWpgrB9aP22omZkb9IWyQOKUKrvZNVY+nCD9lvI3n35ftCJI Cc: Tom Rini Subject: [U-Boot] [PATCH 10/57] arm: Move tlb_addr 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/arm/include/asm/global_data.h | 6 +++--- arch/arm/lib/board.c | 2 +- arch/arm/lib/cache-cp15.c | 4 ++-- common/cmd_bdinfo.c | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/arm/include/asm/global_data.h b/arch/arm/include/asm/global_data.h index 35d07d0..0d1ebfd 100644 --- a/arch/arm/include/asm/global_data.h +++ b/arch/arm/include/asm/global_data.h @@ -44,6 +44,9 @@ struct arch_global_data { #ifdef CONFIG_IXP425 unsigned long timestamp; #endif +#if !(defined(CONFIG_SYS_ICACHE_OFF) && defined(CONFIG_SYS_DCACHE_OFF)) + unsigned long tlb_addr; +#endif }; /* @@ -74,9 +77,6 @@ typedef struct global_data { unsigned long irq_sp; /* irq stack pointer */ unsigned long start_addr_sp; /* start_addr_stackpointer */ unsigned long reloc_off; -#if !(defined(CONFIG_SYS_ICACHE_OFF) && defined(CONFIG_SYS_DCACHE_OFF)) - unsigned long tlb_addr; -#endif const void *fdt_blob; /* Our device tree, NULL if none */ void **jt; /* jump table */ char env_buf[32]; /* buffer for getenv() before reloc. */ diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c index 92cad9a..43cd970 100644 --- a/arch/arm/lib/board.c +++ b/arch/arm/lib/board.c @@ -351,7 +351,7 @@ void board_init_f(ulong bootflag) /* round down to next 64 kB limit */ addr &= ~(0x10000 - 1); - gd->tlb_addr = addr; + gd->arch.tlb_addr = addr; debug("TLB table at: %08lx\n", addr); #endif diff --git a/arch/arm/lib/cache-cp15.c b/arch/arm/lib/cache-cp15.c index 939de10..5df6735 100644 --- a/arch/arm/lib/cache-cp15.c +++ b/arch/arm/lib/cache-cp15.c @@ -52,7 +52,7 @@ static void cp_delay (void) static inline void dram_bank_mmu_setup(int bank) { - u32 *page_table = (u32 *)gd->tlb_addr; + u32 *page_table = (u32 *)gd->arch.tlb_addr; bd_t *bd = gd->bd; int i; @@ -67,7 +67,7 @@ static inline void dram_bank_mmu_setup(int bank) /* to activate the MMU we need to set up virtual memory: use 1M areas */ static inline void mmu_setup(void) { - u32 *page_table = (u32 *)gd->tlb_addr; + u32 *page_table = (u32 *)gd->arch.tlb_addr; int i; u32 reg; diff --git a/common/cmd_bdinfo.c b/common/cmd_bdinfo.c index 48cdd16..82a3693 100644 --- a/common/cmd_bdinfo.c +++ b/common/cmd_bdinfo.c @@ -371,7 +371,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) #endif printf("baudrate = %u bps\n", bd->bi_baudrate); #if !(defined(CONFIG_SYS_ICACHE_OFF) && defined(CONFIG_SYS_DCACHE_OFF)) - print_num("TLB addr", gd->tlb_addr); + print_num("TLB addr", gd->arch.tlb_addr); #endif print_num("relocaddr", gd->relocaddr); print_num("reloc off", gd->reloc_off);