From: York Sun <yorksun@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [Patch v3 2/7] Adding more control to physical address mapping
Date: Tue, 28 Sep 2010 15:20:32 -0700 [thread overview]
Message-ID: <1285712437-6719-2-git-send-email-yorksun@freescale.com> (raw)
In-Reply-To: <1285712437-6719-1-git-send-email-yorksun@freescale.com>
A worker function setup_ddr_tlbs_phys() is introduced to implement more
control on physical address mapping.
Signed-off-by: York Sun <yorksun@freescale.com>
---
arch/powerpc/cpu/mpc85xx/tlb.c | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/arch/powerpc/cpu/mpc85xx/tlb.c b/arch/powerpc/cpu/mpc85xx/tlb.c
index f2833a5..e3a71ae 100644
--- a/arch/powerpc/cpu/mpc85xx/tlb.c
+++ b/arch/powerpc/cpu/mpc85xx/tlb.c
@@ -245,7 +245,8 @@ void init_addr_map(void)
}
#endif
-unsigned int setup_ddr_tlbs(unsigned int memsize_in_meg)
+unsigned int
+setup_ddr_tlbs_phys(phys_addr_t p_addr, unsigned int memsize_in_meg)
{
int i;
unsigned int tlb_size;
@@ -275,21 +276,24 @@ unsigned int setup_ddr_tlbs(unsigned int memsize_in_meg)
tlb_size = (camsize - 10) / 2;
- set_tlb(1, ram_tlb_address, ram_tlb_address,
+ set_tlb(1, ram_tlb_address, p_addr,
MAS3_SX|MAS3_SW|MAS3_SR, 0,
0, ram_tlb_index, tlb_size, 1);
size -= 1ULL << camsize;
memsize -= 1ULL << camsize;
ram_tlb_address += 1UL << camsize;
+ p_addr += 1UL << camsize;
}
if (memsize)
print_size(memsize, " left unmapped\n");
-
- /*
- * Confirm that the requested amount of memory was mapped.
- */
return memsize_in_meg;
}
+
+unsigned int setup_ddr_tlbs(unsigned int memsize_in_meg)
+{
+ return
+ setup_ddr_tlbs_phys(CONFIG_SYS_DDR_SDRAM_BASE, memsize_in_meg);
+}
#endif /* !CONFIG_NAND_SPL */
--
1.7.0.4
next prev parent reply other threads:[~2010-09-28 22:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-28 22:20 [U-Boot] [Patch v3 1/7] Expand POST memory test to support arch-depended implementation York Sun
2010-09-28 22:20 ` York Sun [this message]
2010-10-20 5:25 ` [U-Boot] [Patch v3 2/7] Adding more control to physical address mapping Kumar Gala
2010-09-28 22:20 ` [U-Boot] [Patch v3 3/7] Add memory test feature for mpc85xx POST York Sun
2010-10-20 5:32 ` Kumar Gala
2010-09-28 22:20 ` [U-Boot] [Patch v3 4/7] Fix address for POST for 85xx with CPM York Sun
2010-10-20 5:31 ` Kumar Gala
2010-09-28 22:20 ` [U-Boot] [Patch v3 5/7] Setup POST word for generic mpc85xx York Sun
2010-10-20 5:33 ` Kumar Gala
2010-09-28 22:20 ` [U-Boot] [Patch v3 6/7] Enable POST memory test for corenet_ds York Sun
2010-09-28 22:20 ` [U-Boot] [Patch v3 7/7] Enable POST memory test for P2020DS York Sun
2010-10-19 20:29 ` [U-Boot] [Patch v3 1/7] Expand POST memory test to support arch-depended implementation Wolfgang Denk
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=1285712437-6719-2-git-send-email-yorksun@freescale.com \
--to=yorksun@freescale.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.