aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-mvebu/coherency.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/arch/arm/mach-mvebu/coherency.c b/arch/arm/mach-mvebu/coherency.c
index 75db33ef93ee..489edd157cfb 100644
--- a/arch/arm/mach-mvebu/coherency.c
+++ b/arch/arm/mach-mvebu/coherency.c
@@ -47,6 +47,7 @@ enum {
47 COHERENCY_FABRIC_TYPE_NONE, 47 COHERENCY_FABRIC_TYPE_NONE,
48 COHERENCY_FABRIC_TYPE_ARMADA_370_XP, 48 COHERENCY_FABRIC_TYPE_ARMADA_370_XP,
49 COHERENCY_FABRIC_TYPE_ARMADA_375, 49 COHERENCY_FABRIC_TYPE_ARMADA_375,
50 COHERENCY_FABRIC_TYPE_ARMADA_380,
50}; 51};
51 52
52static struct of_device_id of_coherency_table[] = { 53static struct of_device_id of_coherency_table[] = {
@@ -54,6 +55,8 @@ static struct of_device_id of_coherency_table[] = {
54 .data = (void *) COHERENCY_FABRIC_TYPE_ARMADA_370_XP }, 55 .data = (void *) COHERENCY_FABRIC_TYPE_ARMADA_370_XP },
55 {.compatible = "marvell,armada-375-coherency-fabric", 56 {.compatible = "marvell,armada-375-coherency-fabric",
56 .data = (void *) COHERENCY_FABRIC_TYPE_ARMADA_375 }, 57 .data = (void *) COHERENCY_FABRIC_TYPE_ARMADA_375 },
58 {.compatible = "marvell,armada-380-coherency-fabric",
59 .data = (void *) COHERENCY_FABRIC_TYPE_ARMADA_380 },
57 { /* end of list */ }, 60 { /* end of list */ },
58}; 61};
59 62
@@ -302,7 +305,7 @@ static void __init armada_370_coherency_init(struct device_node *np)
302 set_cpu_coherent(cpu_logical_map(smp_processor_id()), 0); 305 set_cpu_coherent(cpu_logical_map(smp_processor_id()), 0);
303} 306}
304 307
305static void __init armada_375_coherency_init(struct device_node *np) 308static void __init armada_375_380_coherency_init(struct device_node *np)
306{ 309{
307 coherency_cpu_base = of_iomap(np, 0); 310 coherency_cpu_base = of_iomap(np, 0);
308} 311}
@@ -324,6 +327,10 @@ static int coherency_type(void)
324 else if (type == COHERENCY_FABRIC_TYPE_ARMADA_375 && is_smp()) 327 else if (type == COHERENCY_FABRIC_TYPE_ARMADA_375 && is_smp())
325 return type; 328 return type;
326 329
330 /* Armada 380 coherency works only on SMP */
331 else if (type == COHERENCY_FABRIC_TYPE_ARMADA_380 && is_smp())
332 return type;
333
327 of_node_put(np); 334 of_node_put(np);
328 } 335 }
329 336
@@ -344,8 +351,9 @@ int __init coherency_init(void)
344 351
345 if (type == COHERENCY_FABRIC_TYPE_ARMADA_370_XP) 352 if (type == COHERENCY_FABRIC_TYPE_ARMADA_370_XP)
346 armada_370_coherency_init(np); 353 armada_370_coherency_init(np);
347 else if (type == COHERENCY_FABRIC_TYPE_ARMADA_375) 354 else if (type == COHERENCY_FABRIC_TYPE_ARMADA_375 ||
348 armada_375_coherency_init(np); 355 type == COHERENCY_FABRIC_TYPE_ARMADA_380)
356 armada_375_380_coherency_init(np);
349 357
350 return 0; 358 return 0;
351} 359}