Skip to content

Commit 63fbab9

Browse files
ConchuODgregkh
authored andcommitted
dt-bindings: riscv: fix SiFive l2-cache's cache-sets
commit b60cf8e upstream. Fix device tree schema validation error messages for the SiFive Unmatched: ' cache-sets:0:0: 1024 was expected'. The existing bindings allow for just 1024 cache-sets but the fu740 on Unmatched the has 2048 cache-sets. The ISA itself permits any arbitrary power of two, however this is not supported by dt-schema. The RTL for the IP, to which the number of cache-sets is a tunable parameter, has been released publicly so speculatively adding a small number of "reasonable" values seems unwise also. Instead, as the binding only supports two distinct controllers: add 2048 and explicitly lock it to the fu740's l2 cache while limiting 1024 to the l2 cache on the fu540. Fixes: af951c3 ("dt-bindings: riscv: Update l2 cache DT documentation to add support for SiFive FU740") Reported-by: Atul Khare <[email protected]> Signed-off-by: Conor Dooley <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Palmer Dabbelt <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent c71e000 commit 63fbab9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Documentation/devicetree/bindings/riscv/sifive-l2-cache.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ properties:
4747
const: 2
4848

4949
cache-sets:
50-
const: 1024
50+
enum: [1024, 2048]
5151

5252
cache-size:
5353
const: 2097152
@@ -85,13 +85,17 @@ then:
8585
description: |
8686
Must contain entries for DirError, DataError and DataFail signals.
8787
maxItems: 3
88+
cache-sets:
89+
const: 1024
8890

8991
else:
9092
properties:
9193
interrupts:
9294
description: |
9395
Must contain entries for DirError, DataError, DataFail, DirFail signals.
9496
minItems: 4
97+
cache-sets:
98+
const: 2048
9599

96100
additionalProperties: false
97101

0 commit comments

Comments
 (0)