From 0ed99bbf019f84eafee611e31a867dde9b9b4fd1 Mon Sep 17 00:00:00 2001 From: Linus Walleij Date: Thu, 10 Jan 2013 10:18:49 +0100 Subject: [PATCH] --- yaml --- r: 349091 b: refs/heads/master c: 67c6b2ef2662b17cc2174f2bdc22a7cb818a8376 h: refs/heads/master i: 349089: 10cad7bc8dff0c5e6eef478872a6dc54fda3bd11 349087: a37fda8630033765fd2ca77bb264e1d10fa60b3d v: v3 --- [refs] | 2 +- trunk/arch/arm/mach-integrator/pci_v3.c | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index b2109903459d..5511510c5bbc 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 65aabd61a4c5fa4033d2af7692ae7994845ab0ca +refs/heads/master: 67c6b2ef2662b17cc2174f2bdc22a7cb818a8376 diff --git a/trunk/arch/arm/mach-integrator/pci_v3.c b/trunk/arch/arm/mach-integrator/pci_v3.c index be50e795536d..e7fcea7f3300 100644 --- a/trunk/arch/arm/mach-integrator/pci_v3.c +++ b/trunk/arch/arm/mach-integrator/pci_v3.c @@ -475,13 +475,12 @@ int __init pci_v3_setup(int nr, struct pci_sys_data *sys) { int ret = 0; + if (!ap_syscon_base) + return -EINVAL; + if (nr == 0) { sys->mem_offset = PHYS_PCI_MEM_BASE; 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; @@ -497,6 +496,13 @@ void __init pci_v3_preinit(void) unsigned int temp; 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; /*