Commit 4fc338e3 authored by Lennert Buytenhek's avatar Lennert Buytenhek Committed by Lennert Buytenhek

[ARM] Orion: DRAM mapping granularity is 64KiB, not 16MiB

The DRAM base address and size fields in the CPU's MBUS bridge have
64KiB granularity, instead of the currently used 16MiB.  Since all
of the currently supported MBUS peripherals support 64KiB granularity
as well, this patch changes the Orion address map code to stop
rounding base addresses down and sizes up to multiples of 16MiB.

Found by Ke Wei <kewei@marvell.com>.
Signed-off-by: default avatarLennert Buytenhek <buytenh@marvell.com>
Acked-by: default avatarRussell King <linux@arm.linux.org.uk>
parent a18b6584
...@@ -155,8 +155,8 @@ void __init orion5x_setup_cpu_mbus_bridge(void) ...@@ -155,8 +155,8 @@ void __init orion5x_setup_cpu_mbus_bridge(void)
w = &orion5x_mbus_dram_info.cs[cs++]; w = &orion5x_mbus_dram_info.cs[cs++];
w->cs_index = i; w->cs_index = i;
w->mbus_attr = 0xf & ~(1 << i); w->mbus_attr = 0xf & ~(1 << i);
w->base = base & 0xff000000; w->base = base & 0xffff0000;
w->size = (size | 0x00ffffff) + 1; w->size = (size | 0x0000ffff) + 1;
} }
} }
orion5x_mbus_dram_info.num_cs = cs; orion5x_mbus_dram_info.num_cs = cs;
......
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