aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/devicetree/bindings/arm/coherency-fabric.txt7
-rw-r--r--arch/arm/mach-mvebu/coherency.c14
2 files changed, 17 insertions, 4 deletions
diff --git a/Documentation/devicetree/bindings/arm/coherency-fabric.txt b/Documentation/devicetree/bindings/arm/coherency-fabric.txt
index dcd80d6e0471..8dd46617c889 100644
--- a/Documentation/devicetree/bindings/arm/coherency-fabric.txt
+++ b/Documentation/devicetree/bindings/arm/coherency-fabric.txt
@@ -1,6 +1,6 @@
1Coherency fabric 1Coherency fabric
2---------------- 2----------------
3Available on Marvell SOCs: Armada 370, Armada 375 and Armada XP 3Available on Marvell SOCs: Armada 370, Armada 375, Armada 38x and Armada XP
4 4
5Required properties: 5Required properties:
6 6
@@ -12,6 +12,9 @@ Required properties:
12 * "marvell,armada-375-coherency-fabric", for the Armada 375 coherency 12 * "marvell,armada-375-coherency-fabric", for the Armada 375 coherency
13 fabric. 13 fabric.
14 14
15 * "marvell,armada-380-coherency-fabric", for the Armada 38x coherency
16 fabric.
17
15- reg: Should contain coherency fabric registers location and 18- reg: Should contain coherency fabric registers location and
16 length. 19 length.
17 20
@@ -21,6 +24,8 @@ Required properties:
21 * For "marvell,armada-375-coherency-fabric", only one pair is needed 24 * For "marvell,armada-375-coherency-fabric", only one pair is needed
22 for the per-CPU fabric registers. 25 for the per-CPU fabric registers.
23 26
27 * For "marvell,armada-380-coherency-fabric", only one pair is needed
28 for the per-CPU fabric registers.
24 29
25Examples: 30Examples:
26 31
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}