public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Becky Bruce <beckyb@kernel.crashing.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V3 2/6] mpc85xx/tlb.c: Allow platforms to specify wimge bits
Date: Fri, 17 Dec 2010 17:17:55 -0600	[thread overview]
Message-ID: <1292627879-9027-3-git-send-email-beckyb@kernel.crashing.org> (raw)
In-Reply-To: <1292627879-9027-2-git-send-email-beckyb@kernel.crashing.org>

Some platforms might want to override the default wimge=0 for
DDR.  Add CONFIG_SYS_PPC_DDR_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.  Note that
the name of this define is not 85xx-specific.  WIMGE is a
fairly universal concept, so any ppc platforms that require
different WIMGE settings for DDR can use the same #define.

Signed-off-by: Becky Bruce <beckyb@kernel.crashing.org>
---
 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..31143ba 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_SYS_PPC_DDR_WIMGE
+	wimge = CONFIG_SYS_PPC_DDR_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;
-- 
1.5.6.5

  reply	other threads:[~2010-12-17 23:17 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-17 23:17 [U-Boot] [PATCH V3 00/06] Go to common initdram() on 85xx-based boards Becky Bruce
2010-12-17 23:17 ` [U-Boot] [PATCH V3 1/6] tqm85xx: create fixed_sdram() to do sdram setup Becky Bruce
2010-12-17 23:17   ` Becky Bruce [this message]
2010-12-17 23:17     ` [U-Boot] [PATCH V3 3/6] mpc85xx boards: initdram() cleanup/bugfix Becky Bruce
2010-12-17 23:17       ` [U-Boot] [PATCH V3 4/6] mpc85xx: rename sdram_init() lbc_sdram_init() Becky Bruce
2010-12-17 23:17         ` [U-Boot] [PATCH V3 5/6] 85xx boards: Rename CONFIG_DDR_DLL to CONFIG_SYS_FSL_ERRATUM_DDR_MSYNC_IN Becky Bruce
2010-12-17 23:17           ` [U-Boot] [PATCH V3 6/6] MPC8xxx DDR: align informational prints Becky Bruce
2011-01-05  0:25             ` Kumar Gala
2011-01-05  0:25           ` [U-Boot] [PATCH V3 5/6] 85xx boards: Rename CONFIG_DDR_DLL to CONFIG_SYS_FSL_ERRATUM_DDR_MSYNC_IN Kumar Gala
2011-01-05  0:25         ` [U-Boot] [PATCH V3 4/6] mpc85xx: rename sdram_init() lbc_sdram_init() Kumar Gala
2011-01-05  0:25       ` [U-Boot] [PATCH V3 3/6] mpc85xx boards: initdram() cleanup/bugfix Kumar Gala
2011-05-04 21:53       ` Wolfgang Denk
2011-06-01 20:31         ` Wolfgang Denk
2011-01-05  0:24     ` [U-Boot] [PATCH V3 2/6] mpc85xx/tlb.c: Allow platforms to specify wimge bits Kumar Gala
2010-12-21 17:52   ` [U-Boot] [PATCH V3 1/6] tqm85xx: create fixed_sdram() to do sdram setup Kumar Gala
2010-12-22  8:44     ` Stefan Roese
2011-01-05  0:24   ` Kumar Gala

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1292627879-9027-3-git-send-email-beckyb@kernel.crashing.org \
    --to=beckyb@kernel.crashing.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox