Skip to content

Commit b60cf8e

Browse files
ConchuODpalmer-dabbelt
authored andcommitted
dt-bindings: riscv: fix SiFive l2-cache's cache-sets
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]>
1 parent 87df2b5 commit b60cf8e

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
@@ -46,7 +46,7 @@ properties:
4646
const: 2
4747

4848
cache-sets:
49-
const: 1024
49+
enum: [1024, 2048]
5050

5151
cache-size:
5252
const: 2097152
@@ -84,13 +84,17 @@ then:
8484
description: |
8585
Must contain entries for DirError, DataError and DataFail signals.
8686
maxItems: 3
87+
cache-sets:
88+
const: 1024
8789

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

9599
additionalProperties: false
96100

0 commit comments

Comments
 (0)