parent
7cd4968d0e
commit
c9139c150c
@ -0,0 +1,76 @@ |
||||
--- a/arch/arm/mach-cns3xxx/cns3420vb.c
|
||||
+++ b/arch/arm/mach-cns3xxx/cns3420vb.c
|
||||
@@ -32,6 +32,7 @@
|
||||
#include <asm/mach/time.h>
|
||||
#include <mach/cns3xxx.h>
|
||||
#include <mach/irqs.h>
|
||||
+#include <mach/platform.h>
|
||||
#include "core.h"
|
||||
#include "devices.h"
|
||||
|
||||
@@ -199,6 +200,8 @@ static void __init cns3420_init(void)
|
||||
cns3xxx_ahci_init();
|
||||
cns3xxx_sdhci_init();
|
||||
|
||||
+ cns3xxx_pcie_init(0x3);
|
||||
+
|
||||
pm_power_off = cns3xxx_power_off;
|
||||
}
|
||||
|
||||
--- a/arch/arm/mach-cns3xxx/core.h
|
||||
+++ b/arch/arm/mach-cns3xxx/core.h
|
||||
@@ -12,6 +12,8 @@
|
||||
#define __CNS3XXX_CORE_H
|
||||
|
||||
extern struct sys_timer cns3xxx_timer;
|
||||
+extern int cns3xxx_pcie_init(u8 bitmap);
|
||||
+extern void cns3xxx_pcie_iotable_init(u8 bitmap);
|
||||
|
||||
#ifdef CONFIG_CACHE_L2X0
|
||||
void __init cns3xxx_l2x0_init(void);
|
||||
--- a/arch/arm/mach-cns3xxx/pcie.c
|
||||
+++ b/arch/arm/mach-cns3xxx/pcie.c
|
||||
@@ -365,7 +365,23 @@ static int cns3xxx_pcie_abort_handler(un
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static int __init cns3xxx_pcie_init(void)
|
||||
+void __init cns3xxx_pcie_iotable_init(u8 bitmap)
|
||||
+{
|
||||
+ static int _iotable_init = 0;
|
||||
+ int i;
|
||||
+
|
||||
+ bitmap &= ~_iotable_init;
|
||||
+ for (i = 0; i < ARRAY_SIZE(cns3xxx_pcie); i++) {
|
||||
+ if (!(bitmap & (1 << i)))
|
||||
+ continue;
|
||||
+
|
||||
+ iotable_init(cns3xxx_pcie[i].cfg_bases,
|
||||
+ ARRAY_SIZE(cns3xxx_pcie[i].cfg_bases));
|
||||
+ }
|
||||
+ _iotable_init |= bitmap;
|
||||
+}
|
||||
+
|
||||
+int __init cns3xxx_pcie_init(u8 bitmap)
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -375,9 +391,11 @@ static int __init cns3xxx_pcie_init(void
|
||||
hook_fault_code(16 + 6, cns3xxx_pcie_abort_handler, SIGBUS, 0,
|
||||
"imprecise external abort");
|
||||
|
||||
+ cns3xxx_pcie_iotable_init(bitmap);
|
||||
for (i = 0; i < ARRAY_SIZE(cns3xxx_pcie); i++) {
|
||||
- iotable_init(cns3xxx_pcie[i].cfg_bases,
|
||||
- ARRAY_SIZE(cns3xxx_pcie[i].cfg_bases));
|
||||
+ if (!(bitmap & (1 << i)))
|
||||
+ continue;
|
||||
+
|
||||
cns3xxx_pcie_check_link(&cns3xxx_pcie[i]);
|
||||
cns3xxx_pcie_hw_init(&cns3xxx_pcie[i]);
|
||||
pci_common_init(&cns3xxx_pcie[i].hw_pci);
|
||||
@@ -387,4 +405,3 @@ static int __init cns3xxx_pcie_init(void
|
||||
|
||||
return 0;
|
||||
}
|
||||
-device_initcall(cns3xxx_pcie_init);
|
@ -0,0 +1,20 @@ |
||||
--- a/arch/arm/mach-cns3xxx/core.c
|
||||
+++ b/arch/arm/mach-cns3xxx/core.c
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <asm/mach/time.h>
|
||||
#include <asm/mach/irq.h>
|
||||
#include <asm/hardware/gic.h>
|
||||
+#include <asm/smp_twd.h>
|
||||
#include <asm/hardware/cache-l2x0.h>
|
||||
#include <mach/cns3xxx.h>
|
||||
#include "core.h"
|
||||
@@ -63,6 +64,9 @@ static struct map_desc cns3xxx_io_desc[]
|
||||
|
||||
void __init cns3xxx_map_io(void)
|
||||
{
|
||||
+#ifdef CONFIG_LOCAL_TIMERS
|
||||
+ twd_base = (void __iomem *) CNS3XXX_TC11MP_TWD_BASE_VIRT;
|
||||
+#endif
|
||||
iotable_init(cns3xxx_io_desc, ARRAY_SIZE(cns3xxx_io_desc));
|
||||
}
|
||||
|
@ -0,0 +1,19 @@ |
||||
--- a/arch/arm/mach-cns3xxx/core.c
|
||||
+++ b/arch/arm/mach-cns3xxx/core.c
|
||||
@@ -59,6 +59,16 @@ static struct map_desc cns3xxx_io_desc[]
|
||||
.pfn = __phys_to_pfn(CNS3XXX_PM_BASE),
|
||||
.length = SZ_4K,
|
||||
.type = MT_DEVICE,
|
||||
+ }, {
|
||||
+ .virtual = CNS3XXX_SWITCH_BASE_VIRT,
|
||||
+ .pfn = __phys_to_pfn(CNS3XXX_SWITCH_BASE),
|
||||
+ .length = SZ_4K,
|
||||
+ .type = MT_DEVICE,
|
||||
+ }, {
|
||||
+ .virtual = CNS3XXX_SSP_BASE_VIRT,
|
||||
+ .pfn = __phys_to_pfn(CNS3XXX_SSP_BASE),
|
||||
+ .length = SZ_4K,
|
||||
+ .type = MT_DEVICE,
|
||||
},
|
||||
};
|
||||
|
Loading…
Reference in new issue