kernel-ark/arch/arm/mach-mvebu
Thomas Petazzoni 9f3410ff21 arm: mvebu: fix address decoding armada_cfg_base() function
The armada_cfg_base() function returns the base address of the
registers that allow to configure the decoding for a particular
address window. On Armada 370/XP, the lower windows have more
configuration registers (4 registers) than the higher windows (2
registers). This armada_cfg_base() takes this into account by doing a
different offset calculation depending on the window number, but this
offset calculation was wrong for the higher windows.

Even though we were not using high window numbers until now (only
window 0 is used to map the BootROM, needed for SMP), we use this
function at boot time to disable all windows to ensure that nothing
remains intialized from what the bootloader has done.

Unfortunately, the U-Boot on the OpenBlocks AX3-4 uses a window with a
high number (above 8) to remap the BootROM. And then when the kernel
boots, it remaps the BootROM in window 0. Normally, this is not a
problem, because all windows have previously been disabled. Except
that due to our wrong offset calculation, the windows with high
numbers were not properly disabled, leading to the BootROM being
mapped twice. The visible result of this bug was that the kernel was
unable to get the second CPU started on the OpenBlocks AX3-4
platform. With this fix, all windows are properly cleared at boot
time, the BootROM is remapped only once in window 0, and the second
CPU boots fine.

Thanks a lot to Lior Amsamlen <alior@marvell.com> for his help in
debugging this problem.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
Strictly speaking, this bug was introduced in 3.7, but since the only
platforms supported in 3.7 were Armada 370 and Armada XP, and there
was anyway no SMP support at this time, it isn't really worth the
effort to push this patch in 3.7.
2012-11-22 18:15:20 +01:00
..
include/mach Merge branch 'kirkwood/drivers' of git://git.infradead.org/users/jcooper/linux into late/kirkwood 2012-09-22 14:23:11 -07:00
addr-map.c arm: mvebu: fix address decoding armada_cfg_base() function 2012-11-22 18:15:20 +01:00
armada-370-xp.c SMP support for Armada XP 2012-11-22 10:55:09 +01:00
armada-370-xp.h arm: mvebu: Add IPI support via doorbells 2012-11-21 16:49:37 +01:00
coherency_ll.S arm: mvebu: Add support for coherency fabric in mach-mvebu 2012-11-21 16:49:06 +01:00
coherency.c arm: mvebu: Add support for coherency fabric in mach-mvebu 2012-11-21 16:49:06 +01:00
coherency.h arm: mvebu: Add support for coherency fabric in mach-mvebu 2012-11-21 16:49:06 +01:00
common.h arm: mvebu: Add SMP support for Armada XP 2012-11-21 16:49:38 +01:00
headsmp.S arm: mvebu: Add SMP support for Armada XP 2012-11-21 16:49:38 +01:00
hotplug.c arm: mvebu: Add SMP support for Armada XP 2012-11-21 16:49:38 +01:00
irq-armada-370-xp.c arm: mvebu: Add IPI support via doorbells 2012-11-21 16:49:37 +01:00
Kconfig arm: mvebu: Add SMP support for Armada XP 2012-11-21 16:49:38 +01:00
Makefile arm: mvebu: Add SMP support for Armada XP 2012-11-21 16:49:38 +01:00
platsmp.c arm: mvebu: Add SMP support for Armada XP 2012-11-21 16:49:38 +01:00
pmsu.c arm: mvebu: Add initial support for power managmement service unit 2012-11-21 16:49:36 +01:00
pmsu.h arm: mvebu: Add initial support for power managmement service unit 2012-11-21 16:49:36 +01:00
system-controller.c