diff options
Diffstat (limited to 'arch/arm/mach-vexpress')
-rw-r--r-- | arch/arm/mach-vexpress/ct-ca9x4.c | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/arch/arm/mach-vexpress/ct-ca9x4.c b/arch/arm/mach-vexpress/ct-ca9x4.c index 6c4ffb6c5ad8..204038ef3795 100644 --- a/arch/arm/mach-vexpress/ct-ca9x4.c +++ b/arch/arm/mach-vexpress/ct-ca9x4.c | |||
@@ -45,6 +45,23 @@ static void __init ct_ca9x4_map_io(void) | |||
45 | iotable_init(ct_ca9x4_io_desc, ARRAY_SIZE(ct_ca9x4_io_desc)); | 45 | iotable_init(ct_ca9x4_io_desc, ARRAY_SIZE(ct_ca9x4_io_desc)); |
46 | } | 46 | } |
47 | 47 | ||
48 | static void __init ca9x4_l2_init(void) | ||
49 | { | ||
50 | #ifdef CONFIG_CACHE_L2X0 | ||
51 | void __iomem *l2x0_base = ioremap(CT_CA9X4_L2CC, SZ_4K); | ||
52 | |||
53 | if (l2x0_base) { | ||
54 | /* set RAM latencies to 1 cycle for this core tile. */ | ||
55 | writel(0, l2x0_base + L310_TAG_LATENCY_CTRL); | ||
56 | writel(0, l2x0_base + L310_DATA_LATENCY_CTRL); | ||
57 | |||
58 | l2x0_init(l2x0_base, 0x00400000, 0xfe0fffff); | ||
59 | } else { | ||
60 | pr_err("L2C: unable to map L2 cache controller\n"); | ||
61 | } | ||
62 | #endif | ||
63 | } | ||
64 | |||
48 | #ifdef CONFIG_HAVE_ARM_TWD | 65 | #ifdef CONFIG_HAVE_ARM_TWD |
49 | static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, A9_MPCORE_TWD, IRQ_LOCALTIMER); | 66 | static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, A9_MPCORE_TWD, IRQ_LOCALTIMER); |
50 | 67 | ||
@@ -63,6 +80,7 @@ static void __init ct_ca9x4_init_irq(void) | |||
63 | gic_init(0, 29, ioremap(A9_MPCORE_GIC_DIST, SZ_4K), | 80 | gic_init(0, 29, ioremap(A9_MPCORE_GIC_DIST, SZ_4K), |
64 | ioremap(A9_MPCORE_GIC_CPU, SZ_256)); | 81 | ioremap(A9_MPCORE_GIC_CPU, SZ_256)); |
65 | ca9x4_twd_init(); | 82 | ca9x4_twd_init(); |
83 | ca9x4_l2_init(); | ||
66 | } | 84 | } |
67 | 85 | ||
68 | static int ct_ca9x4_clcd_setup(struct clcd_fb *fb) | 86 | static int ct_ca9x4_clcd_setup(struct clcd_fb *fb) |
@@ -141,16 +159,6 @@ static void __init ct_ca9x4_init(void) | |||
141 | { | 159 | { |
142 | int i; | 160 | int i; |
143 | 161 | ||
144 | #ifdef CONFIG_CACHE_L2X0 | ||
145 | void __iomem *l2x0_base = ioremap(CT_CA9X4_L2CC, SZ_4K); | ||
146 | |||
147 | /* set RAM latencies to 1 cycle for this core tile. */ | ||
148 | writel(0, l2x0_base + L310_TAG_LATENCY_CTRL); | ||
149 | writel(0, l2x0_base + L310_DATA_LATENCY_CTRL); | ||
150 | |||
151 | l2x0_init(l2x0_base, 0x00400000, 0xfe0fffff); | ||
152 | #endif | ||
153 | |||
154 | for (i = 0; i < ARRAY_SIZE(ct_ca9x4_amba_devs); i++) | 162 | for (i = 0; i < ARRAY_SIZE(ct_ca9x4_amba_devs); i++) |
155 | amba_device_register(ct_ca9x4_amba_devs[i], &iomem_resource); | 163 | amba_device_register(ct_ca9x4_amba_devs[i], &iomem_resource); |
156 | 164 | ||