ARM: integrator: move syscon remap for AP PCIv3
The Integrator/AP syscon remapping was done in the .setup() function rather than .preinit() which is wrong - .preinit() is called before .setup() and the former also use the syscon base and cause a crash since it was not yet remapped. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Olof Johansson <olof@lixom.net>
This commit is contained in:
Родитель
65aabd61a4
Коммит
67c6b2ef26
|
@ -475,13 +475,12 @@ int __init pci_v3_setup(int nr, struct pci_sys_data *sys)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
|
if (!ap_syscon_base)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
if (nr == 0) {
|
if (nr == 0) {
|
||||||
sys->mem_offset = PHYS_PCI_MEM_BASE;
|
sys->mem_offset = PHYS_PCI_MEM_BASE;
|
||||||
ret = pci_v3_setup_resources(sys);
|
ret = pci_v3_setup_resources(sys);
|
||||||
/* Remap the Integrator system controller */
|
|
||||||
ap_syscon_base = ioremap(INTEGRATOR_SC_BASE, 0x100);
|
|
||||||
if (!ap_syscon_base)
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -497,6 +496,13 @@ void __init pci_v3_preinit(void)
|
||||||
unsigned int temp;
|
unsigned int temp;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
/* Remap the Integrator system controller */
|
||||||
|
ap_syscon_base = ioremap(INTEGRATOR_SC_BASE, 0x100);
|
||||||
|
if (!ap_syscon_base) {
|
||||||
|
pr_err("unable to remap the AP syscon for PCIv3\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
pcibios_min_mem = 0x00100000;
|
pcibios_min_mem = 0x00100000;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Загрузка…
Ссылка в новой задаче