From patchwork Thu Dec 2 23:45:29 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Becky Bruce X-Patchwork-Id: 74050 X-Patchwork-Delegate: galak@kernel.crashing.org 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 37565B70D5 for ; Fri, 3 Dec 2010 10:46:40 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 737AC28117; Fri, 3 Dec 2010 00:46: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 p3th91ZhGoQ8; Fri, 3 Dec 2010 00:46:23 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6795A28129; Fri, 3 Dec 2010 00:46:10 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 92714280EE for ; Fri, 3 Dec 2010 00:46:04 +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 9Veq0SHaRU+V for ; Fri, 3 Dec 2010 00:46:01 +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 gate.crashing.org (gate.crashing.org [63.228.1.57]) by theia.denx.de (Postfix) with ESMTPS id 07A28280ED for ; Fri, 3 Dec 2010 00:45:58 +0100 (CET) Received: from localhost (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.13.8) with ESMTP id oB2NjjED007565; Thu, 2 Dec 2010 17:45:46 -0600 From: Becky Bruce To: u-boot@lists.denx.de, robertlazarski@gmail.com, galak@kernel.crashing.org, sr@denx.de, dan@embeddedalley.com, ptyser@xes-inc.com, wd@denx.de Date: Thu, 2 Dec 2010 17:45:29 -0600 Message-Id: <1291333539-11884-4-git-send-email-beckyb@kernel.crashing.org> X-Mailer: git-send-email 1.6.0.6 In-Reply-To: <1291333539-11884-3-git-send-email-beckyb@kernel.crashing.org> References: <1291333539-11884-1-git-send-email-beckyb@kernel.crashing.org> <1291333539-11884-2-git-send-email-beckyb@kernel.crashing.org> <1291333539-11884-3-git-send-email-beckyb@kernel.crashing.org> Subject: [U-Boot] [PATCH 03/13] mpc85xx/tlb.c: Allow platforms to specify wimge bits 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 Some platforms might want to override the default wimge=0 for DDR. Add CONFIG_DDR_TLB_WIMGE for those platforms to use. This will initially only be used by TQM85xx, but could be useful for other boards or testing going forward. Signed-off-by: Becky Bruce --- arch/powerpc/cpu/mpc85xx/tlb.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/cpu/mpc85xx/tlb.c b/arch/powerpc/cpu/mpc85xx/tlb.c index e3a71ae..513aaaa 100644 --- a/arch/powerpc/cpu/mpc85xx/tlb.c +++ b/arch/powerpc/cpu/mpc85xx/tlb.c @@ -250,10 +250,14 @@ setup_ddr_tlbs_phys(phys_addr_t p_addr, unsigned int memsize_in_meg) { int i; unsigned int tlb_size; + unsigned int wimge = 0; unsigned int ram_tlb_address = (unsigned int)CONFIG_SYS_DDR_SDRAM_BASE; unsigned int max_cam = (mfspr(SPRN_TLB1CFG) >> 16) & 0xf; u64 size, memsize = (u64)memsize_in_meg << 20; +#ifdef CONFIG_DDR_TLB_WIMGE + wimge = CONFIG_DDR_TLB_WIMGE; +#endif size = min(memsize, CONFIG_MAX_MEM_MAPPED); /* Convert (4^max) kB to (2^max) bytes */ @@ -277,7 +281,7 @@ setup_ddr_tlbs_phys(phys_addr_t p_addr, unsigned int memsize_in_meg) tlb_size = (camsize - 10) / 2; set_tlb(1, ram_tlb_address, p_addr, - MAS3_SX|MAS3_SW|MAS3_SR, 0, + MAS3_SX|MAS3_SW|MAS3_SR, wimge, 0, ram_tlb_index, tlb_size, 1); size -= 1ULL << camsize;