1 --- a/arch/arm/mach-cns3xxx/cns3420vb.c
2 +++ b/arch/arm/mach-cns3xxx/cns3420vb.c
4 #include <asm/mach/time.h>
5 #include <mach/cns3xxx.h>
7 +#include <mach/platform.h>
11 @@ -199,6 +200,8 @@ static void __init cns3420_init(void)
15 + cns3xxx_pcie_init(0x3);
17 pm_power_off = cns3xxx_power_off;
20 --- a/arch/arm/mach-cns3xxx/core.h
21 +++ b/arch/arm/mach-cns3xxx/core.h
23 #define __CNS3XXX_CORE_H
25 extern struct sys_timer cns3xxx_timer;
26 +extern int cns3xxx_pcie_init(u8 bitmap);
27 +extern void cns3xxx_pcie_iotable_init(u8 bitmap);
29 #ifdef CONFIG_CACHE_L2X0
30 void __init cns3xxx_l2x0_init(void);
31 --- a/arch/arm/mach-cns3xxx/pcie.c
32 +++ b/arch/arm/mach-cns3xxx/pcie.c
33 @@ -365,7 +365,23 @@ static int cns3xxx_pcie_abort_handler(un
37 -static int __init cns3xxx_pcie_init(void)
38 +void __init cns3xxx_pcie_iotable_init(u8 bitmap)
40 + static int _iotable_init = 0;
43 + bitmap &= ~_iotable_init;
44 + for (i = 0; i < ARRAY_SIZE(cns3xxx_pcie); i++) {
45 + if (!(bitmap & (1 << i)))
48 + iotable_init(cns3xxx_pcie[i].cfg_bases,
49 + ARRAY_SIZE(cns3xxx_pcie[i].cfg_bases));
51 + _iotable_init |= bitmap;
54 +int __init cns3xxx_pcie_init(u8 bitmap)
58 @@ -375,9 +391,11 @@ static int __init cns3xxx_pcie_init(void
59 hook_fault_code(16 + 6, cns3xxx_pcie_abort_handler, SIGBUS, 0,
60 "imprecise external abort");
62 + cns3xxx_pcie_iotable_init(bitmap);
63 for (i = 0; i < ARRAY_SIZE(cns3xxx_pcie); i++) {
64 - iotable_init(cns3xxx_pcie[i].cfg_bases,
65 - ARRAY_SIZE(cns3xxx_pcie[i].cfg_bases));
66 + if (!(bitmap & (1 << i)))
69 cns3xxx_pcie_check_link(&cns3xxx_pcie[i]);
70 cns3xxx_pcie_hw_init(&cns3xxx_pcie[i]);
71 pci_common_init(&cns3xxx_pcie[i].hw_pci);
72 @@ -387,4 +405,3 @@ static int __init cns3xxx_pcie_init(void
76 -device_initcall(cns3xxx_pcie_init);