Commit ef269b32 authored by Matt Fleming's avatar Matt Fleming Committed by Paul Mundt

sh: Fix the offset from P1SEG/P2SEG where we map RAM

We need to map the gap between 0x00000000 and __MEMORY_START in the PMB,
as well as RAM.

With this change my 7785LCR board can switch to 32bit MMU mode at
runtime.
Signed-off-by: default avatarMatt Fleming <matt@console-pimps.org>
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent 31051219
...@@ -275,7 +275,7 @@ static void __pmb_unmap(struct pmb_entry *pmbe) ...@@ -275,7 +275,7 @@ static void __pmb_unmap(struct pmb_entry *pmbe)
int __uses_jump_to_uncached pmb_init(void) int __uses_jump_to_uncached pmb_init(void)
{ {
unsigned int i; unsigned int i;
long size; long size, ret;
jump_to_uncached(); jump_to_uncached();
...@@ -287,12 +287,13 @@ int __uses_jump_to_uncached pmb_init(void) ...@@ -287,12 +287,13 @@ int __uses_jump_to_uncached pmb_init(void)
* P1 - provides a cached window onto physical memory * P1 - provides a cached window onto physical memory
* P2 - provides an uncached window onto physical memory * P2 - provides an uncached window onto physical memory
*/ */
size = pmb_remap(P2SEG, __MEMORY_START, __MEMORY_SIZE, size = __MEMORY_START + __MEMORY_SIZE;
PMB_WT | PMB_UB);
BUG_ON(size != __MEMORY_SIZE);
size = pmb_remap(P1SEG, __MEMORY_START, __MEMORY_SIZE, PMB_C); ret = pmb_remap(P1SEG, 0x00000000, size, PMB_C);
BUG_ON(size != __MEMORY_SIZE); BUG_ON(ret != size);
ret = pmb_remap(P2SEG, 0x00000000, size, PMB_WT | PMB_UB);
BUG_ON(ret != size);
ctrl_outl(0, PMB_IRMCR); ctrl_outl(0, PMB_IRMCR);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment