diff options
author | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2013-03-06 11:23:34 +0100 |
---|---|---|
committer | Jason Cooper <jason@lakedaemon.net> | 2013-03-08 23:07:19 +0100 |
commit | 217bef3d37a9180bebd1953dffb6f9a3c77c557f (patch) | |
tree | 680ff4b77821d07b5a96a7c28662b75bd9c7f06b /Documentation/vme_api.txt | |
parent | arm: mvebu: Reduce reg-io-width with UARTs (diff) | |
download | linux-217bef3d37a9180bebd1953dffb6f9a3c77c557f.tar.xz linux-217bef3d37a9180bebd1953dffb6f9a3c77c557f.zip |
arm: plat-orion: fix address decoding when > 4GB is used
During the system initialization, the orion_setup_cpu_mbus_target()
function reads the SDRAM address decoding registers to find out how
many chip-selects of SDRAM have been enabled, and builds a small array
with one entry per chip-select. This array is then used by device
drivers (XOR, Ethernet, etc.) to configure their own address decoding
windows to the SDRAM.
However, devices can only access the first 32 bits of the physical
memory. Even though LPAE is not supported for now, some Marvell boards
are now showing up with 8 GB of RAM, configured using two SDRAM
address decoding windows: the first covering the first 4 GB, the
second covering the last 4 GB. The array built by
orion_setup_cpu_mbus_target() has therefore two entries, and device
drivers try to set up two address decoding windows to the
SDRAM. However, in the device registers for the address decoding, the
base address is only 32 bits, so those two windows overlap each other,
and the devices do not work at all.
This patch makes sure that the array built by
orion_setup_cpu_mbus_target() only contains the SDRAM decoding windows
that correspond to the first 4 GB of the memory. To do that, it
ignores the SDRAM decoding windows for which the 4 low-order bits are
not zero (the 4 low-order bits of the base register are used to store
bits 32:35 of the base address, so they actually indicate whether the
base address is above 4 GB).
This patch allows the newly introduced armada-xp-gp board to properly
operate when it is mounted with more than 4 GB of RAM. Without that,
all devices doing DMA (for example XOR and Ethernet) do not work at
all.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Diffstat (limited to 'Documentation/vme_api.txt')
0 files changed, 0 insertions, 0 deletions