aboutsummaryrefslogtreecommitdiff
path: root/board/tqc
diff options
context:
space:
mode:
authorBecky Bruce <beckyb@kernel.crashing.org>2011-07-18 18:49:16 -0500
committerKumar Gala <galak@kernel.crashing.org>2011-07-22 03:07:47 -0500
commit51f924e5ce4f69659ef385739f4604054d9b5bb7 (patch)
treefeb642da76d6cb6726eede03341ab51e9ff69f3a /board/tqc
parent9cdfe2810693135773602e7c98b78a4af2873a61 (diff)
board/tqm85xx: Create and tear down TLB for get_ram_size()
We need a TLB entry to call get_ram_size(); the common code doesn't create one until *after* fixed_sdram() has determined the size. So we set up tlbs for the max possible size and tear them down once we're done with get_ram_size(); the common 85xx code will then set up a final set of tlb entries for the *actual* detected size of ddr. This prevents us from having TLB entries that are larger than DDR sitting around for very long, which is not a recommended scenario. Signed-off-by: Becky Bruce <beckyb@kernel.crashing.org> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'board/tqc')
-rw-r--r--board/tqc/tqm85xx/sdram.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/board/tqc/tqm85xx/sdram.c b/board/tqc/tqm85xx/sdram.c
index 39a9e2131..baf073e54 100644
--- a/board/tqc/tqm85xx/sdram.c
+++ b/board/tqc/tqm85xx/sdram.c
@@ -363,6 +363,12 @@ static phys_size_t sdram_setup(int casl)
udelay (1000);
#endif /* CONFIG_TQM8548 */
+ /*
+ * get_ram_size() depends on having tlbs for the DDR, but they are
+ * not yet setup because we don't know the size. Set up a temp
+ * mapping and delete it when done.
+ */
+ setup_ddr_tlbs(CONFIG_SYS_DDR_EARLY_SIZE_MB);
for (i = 0; i < N_DDR_CS_CONF; i++) {
ddr->cs0_config = ddr_cs_conf[i].reg;
@@ -376,6 +382,7 @@ static phys_size_t sdram_setup(int casl)
break;
}
}
+ clear_ddr_tlbs(CONFIG_SYS_DDR_EARLY_SIZE_MB);
#ifdef CONFIG_TQM8548
if (i < N_DDR_CS_CONF) {