summaryrefslogtreecommitdiff
path: root/drivers/of/unittest-data
diff options
context:
space:
mode:
authorNicolas Saenz Julienne <nsaenzjulienne@suse.de>2020-08-03 16:25:47 +0200
committerRob Herring <robh@kernel.org>2020-08-03 16:24:49 -0600
commitbda2127827e9dd2781ae095cda0b8e5bf685c458 (patch)
tree409996641797fe64e8d9097ecf1c80fccf234456 /drivers/of/unittest-data
parent7cc3d5020bdaaa9ca216081be93c51db3546e199 (diff)
of: unittest: Use bigger address cells to catch parser regressions
Getting address and size cells for dma-ranges/ranges parsing is tricky and shouldn't rely on the node's count_cells() method. The function starts looking for cells on the parent node, as its supposed to work with device nodes, which doesn't work when input with bus nodes, as generally done when parsing ranges. Add test to catch regressions on that specific quirk as developers will be tempted to edit it out in favor of the default method. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Link: https://lore.kernel.org/r/9200970a917a9cabdc5b17483b5a8725111eb9d0.camel@suse.de Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'drivers/of/unittest-data')
-rw-r--r--drivers/of/unittest-data/tests-address.dtsi10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/of/unittest-data/tests-address.dtsi b/drivers/of/unittest-data/tests-address.dtsi
index 3fe5d3987beb..6604a52bf6cb 100644
--- a/drivers/of/unittest-data/tests-address.dtsi
+++ b/drivers/of/unittest-data/tests-address.dtsi
@@ -23,13 +23,13 @@
};
bus@80000000 {
- #address-cells = <1>;
- #size-cells = <1>;
- ranges = <0x0 0x80000000 0x100000>;
- dma-ranges = <0x10000000 0x0 0x40000000>;
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges = <0x0 0x0 0x80000000 0x0 0x100000>;
+ dma-ranges = <0x1 0x0 0x0 0x20 0x0>;
device@1000 {
- reg = <0x1000 0x1000>;
+ reg = <0x0 0x1000 0x0 0x1000>;
};
};