aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/devicetree/bindings/arm/coherency-fabric.txt22
-rw-r--r--arch/arm/mach-mvebu/coherency.c14
2 files changed, 32 insertions, 4 deletions
diff --git a/Documentation/devicetree/bindings/arm/coherency-fabric.txt b/Documentation/devicetree/bindings/arm/coherency-fabric.txt
index f0bfa37edfc6..dcd80d6e0471 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 and Armada XP 3Available on Marvell SOCs: Armada 370, Armada 375 and Armada XP
4 4
5Required properties: 5Required properties:
6 6
@@ -9,11 +9,20 @@ Required properties:
9 * "marvell,coherency-fabric", to be used for the coherency fabric of 9 * "marvell,coherency-fabric", to be used for the coherency fabric of
10 the Armada 370 and Armada XP. 10 the Armada 370 and Armada XP.
11 11
12 * "marvell,armada-375-coherency-fabric", for the Armada 375 coherency
13 fabric.
14
12- reg: Should contain coherency fabric registers location and 15- reg: Should contain coherency fabric registers location and
13 length. First pair for the coherency fabric registers, second pair 16 length.
14 for the per-CPU fabric registers registers. 17
18 * For "marvell,coherency-fabric", the first pair for the coherency
19 fabric registers, second pair for the per-CPU fabric registers.
20
21 * For "marvell,armada-375-coherency-fabric", only one pair is needed
22 for the per-CPU fabric registers.
15 23
16Example: 24
25Examples:
17 26
18coherency-fabric@d0020200 { 27coherency-fabric@d0020200 {
19 compatible = "marvell,coherency-fabric"; 28 compatible = "marvell,coherency-fabric";
@@ -22,3 +31,8 @@ coherency-fabric@d0020200 {
22 31
23}; 32};
24 33
34coherency-fabric@21810 {
35 compatible = "marvell,armada-375-coherency-fabric";
36 reg = <0x21810 0x1c>;
37};
38
diff --git a/arch/arm/mach-mvebu/coherency.c b/arch/arm/mach-mvebu/coherency.c
index 862100f7c836..7ccaf87fd772 100644
--- a/arch/arm/mach-mvebu/coherency.c
+++ b/arch/arm/mach-mvebu/coherency.c
@@ -41,11 +41,14 @@ static void __iomem *coherency_cpu_base;
41enum { 41enum {
42 COHERENCY_FABRIC_TYPE_NONE, 42 COHERENCY_FABRIC_TYPE_NONE,
43 COHERENCY_FABRIC_TYPE_ARMADA_370_XP, 43 COHERENCY_FABRIC_TYPE_ARMADA_370_XP,
44 COHERENCY_FABRIC_TYPE_ARMADA_375,
44}; 45};
45 46
46static struct of_device_id of_coherency_table[] = { 47static struct of_device_id of_coherency_table[] = {
47 {.compatible = "marvell,coherency-fabric", 48 {.compatible = "marvell,coherency-fabric",
48 .data = (void *) COHERENCY_FABRIC_TYPE_ARMADA_370_XP }, 49 .data = (void *) COHERENCY_FABRIC_TYPE_ARMADA_370_XP },
50 {.compatible = "marvell,armada-375-coherency-fabric",
51 .data = (void *) COHERENCY_FABRIC_TYPE_ARMADA_375 },
49 { /* end of list */ }, 52 { /* end of list */ },
50}; 53};
51 54
@@ -145,6 +148,11 @@ static void __init armada_370_coherency_init(struct device_node *np)
145 set_cpu_coherent(cpu_logical_map(smp_processor_id()), 0); 148 set_cpu_coherent(cpu_logical_map(smp_processor_id()), 0);
146} 149}
147 150
151static void __init armada_375_coherency_init(struct device_node *np)
152{
153 coherency_cpu_base = of_iomap(np, 0);
154}
155
148static int coherency_type(void) 156static int coherency_type(void)
149{ 157{
150 struct device_node *np; 158 struct device_node *np;
@@ -158,6 +166,10 @@ static int coherency_type(void)
158 if (type == COHERENCY_FABRIC_TYPE_ARMADA_370_XP) 166 if (type == COHERENCY_FABRIC_TYPE_ARMADA_370_XP)
159 return type; 167 return type;
160 168
169 /* Armada 375 coherency works only on SMP */
170 else if (type == COHERENCY_FABRIC_TYPE_ARMADA_375 && is_smp())
171 return type;
172
161 of_node_put(np); 173 of_node_put(np);
162 } 174 }
163 175
@@ -178,6 +190,8 @@ int __init coherency_init(void)
178 190
179 if (type == COHERENCY_FABRIC_TYPE_ARMADA_370_XP) 191 if (type == COHERENCY_FABRIC_TYPE_ARMADA_370_XP)
180 armada_370_coherency_init(np); 192 armada_370_coherency_init(np);
193 else if (type == COHERENCY_FABRIC_TYPE_ARMADA_375)
194 armada_375_coherency_init(np);
181 195
182 return 0; 196 return 0;
183} 197}