From patchwork Fri Dec 14 06:48:39 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 206311 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 3A9582C009F for ; Fri, 14 Dec 2012 17:56:33 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3EC9F4A29F; Fri, 14 Dec 2012 07:56:29 +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 aMycXv-4EdKP; Fri, 14 Dec 2012 07:56:28 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5ACF94A15B; Fri, 14 Dec 2012 07:55:01 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4980C4A17A for ; Fri, 14 Dec 2012 07:51:14 +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 IrKQu4sRDsLv for ; Fri, 14 Dec 2012 07:51:10 +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-vb0-f74.google.com (mail-vb0-f74.google.com [209.85.212.74]) by theia.denx.de (Postfix) with ESMTPS id 2863A4A128 for ; Fri, 14 Dec 2012 07:50:23 +0100 (CET) Received: by mail-vb0-f74.google.com with SMTP id s24so311449vbi.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=7w3+w93IfgMTHoqhGZsLNTNLi6cnpll1Nl/SnZs+igw=; b=T5tQc8ED/GZT4PSqZEK9i0gfs6Yrn+pbzPuF1e/ELKnTToLSWr0MsFCf+QBOvuhbcZ ObkRAHF81av7YaFibdqcDCvttbeB+bTZ+1jY9xsFM3MZRInG3y5Dou/6Ubu2C8+VOqJh d8+2CZgfPbZMH2gp3Z6PsVJI2odGQqDYvGvGy7MTllBagNfrqesKU5B71U15J//qCaAW OsVgHRREe0Rb/XoZNm5+XiAE97QgQkQ7ZJRAN8aJ4TI6xGrXC83fV/wgfNX8yj6GUndq yS8F6hSDLuCK92hK0HECar0ttiJKJ0sPoy+N2L1Ww6SCvLjhU02er/mqhbvat8qnruTX PKkw== Received: by 10.236.81.107 with SMTP id l71mr2279074yhe.18.1355467820228; Thu, 13 Dec 2012 22:50:20 -0800 (PST) Received: from wpzn4.hot.corp.google.com (216-239-44-65.google.com [216.239.44.65]) by gmr-mx.google.com with ESMTPS id s78si348138yhh.3.2012.12.13.22.50.20 (version=TLSv1/SSLv3 cipher=AES128-SHA); Thu, 13 Dec 2012 22:50:20 -0800 (PST) Received: from kaka.mtv.corp.google.com (kaka.mtv.corp.google.com [172.22.73.79]) by wpzn4.hot.corp.google.com (Postfix) with ESMTP id 194B382004A; Thu, 13 Dec 2012 22:50:20 -0800 (PST) Received: by kaka.mtv.corp.google.com (Postfix, from userid 121222) id 7ED10160E37; Thu, 13 Dec 2012 22:50:19 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Date: Thu, 13 Dec 2012 22:48:39 -0800 Message-Id: <1355467767-29575-11-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: ALoCoQlapMEoInFFNhcrqn/uUWrXrRYWQ+5no3gIB/VZXPpARTpt+GYparBO2A3nQQlYd5ZeOReijH+CibJzlIenqpatNl3vea+QLIWlruz29lD9JLw8HKAw3izwT+uozUjH5hqxfDocVenbSbKrWWiOfdFIBdSsvJj1uCQrKN+93i0BLRYvXGD+tj3UU4raJQ/D7FpYSZrJ Cc: Tom Rini Subject: [U-Boot] [PATCH v2 10/58] 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 --- Changes in v2: None 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 22a4d9c..637fb01 100644 --- a/arch/arm/lib/board.c +++ b/arch/arm/lib/board.c @@ -358,7 +358,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);