Ensure all tests have matching reg and unit address
ePAPR 1.1 section 2.2.1.1 "Node Name Requirements" specifies that any node that has a reg property must include a unit address in its name with value matching the first entry in its reg property. Conversely, if a node does not have a reg property, the node name must not include a unit address. Adjust all the dtc test-cases to conform to this rule. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
committed by
David Gibson
parent
9476db68b6
commit
b290428d71
@@ -57,9 +57,12 @@ int main(int argc, char *argv[])
|
||||
CHECK(fdt_property_u32(fdt, "prop-int", TEST_VALUE_1));
|
||||
CHECK(fdt_property_u64(fdt, "prop-int64", TEST_VALUE64_1));
|
||||
CHECK(fdt_property_string(fdt, "prop-str", TEST_STRING_1));
|
||||
CHECK(fdt_property_u32(fdt, "#address-cells", 1));
|
||||
CHECK(fdt_property_u32(fdt, "#size-cells", 0));
|
||||
|
||||
CHECK(fdt_begin_node(fdt, "subnode@1"));
|
||||
CHECK(fdt_property_string(fdt, "compatible", "subnode1"));
|
||||
CHECK(fdt_property_u32(fdt, "reg", 1));
|
||||
CHECK(fdt_property_cell(fdt, "prop-int", TEST_VALUE_1));
|
||||
CHECK(fdt_begin_node(fdt, "subsubnode"));
|
||||
CHECK(fdt_property(fdt, "compatible", "subsubnode1\0subsubnode",
|
||||
@@ -71,9 +74,13 @@ int main(int argc, char *argv[])
|
||||
CHECK(fdt_end_node(fdt));
|
||||
|
||||
CHECK(fdt_begin_node(fdt, "subnode@2"));
|
||||
CHECK(fdt_property_u32(fdt, "reg", 2));
|
||||
CHECK(fdt_property_cell(fdt, "linux,phandle", PHANDLE_1));
|
||||
CHECK(fdt_property_cell(fdt, "prop-int", TEST_VALUE_2));
|
||||
CHECK(fdt_property_u32(fdt, "#address-cells", 1));
|
||||
CHECK(fdt_property_u32(fdt, "#size-cells", 0));
|
||||
CHECK(fdt_begin_node(fdt, "subsubnode@0"));
|
||||
CHECK(fdt_property_u32(fdt, "reg", 0));
|
||||
CHECK(fdt_property_cell(fdt, "phandle", PHANDLE_2));
|
||||
CHECK(fdt_property(fdt, "compatible", "subsubnode2\0subsubnode",
|
||||
23));
|
||||
|
||||
Reference in New Issue
Block a user