Lines Matching refs:sw

505         sw = FdtSw()
506 sw.add_reservemap_entry(TEST_ADDR_1, TEST_SIZE_1)
507 sw.add_reservemap_entry(TEST_ADDR_2, TEST_SIZE_2)
508 sw.finish_reservemap()
510 sw.begin_node('')
511 sw.property_string('compatible', 'test_tree1')
512 sw.property_u32('prop-int', TEST_VALUE_1)
514 sw.property_u32('prop-int', TEST_VALUE_1)
515 sw.property_u64('prop-int64', TEST_VALUE64_1)
516 sw.property_string('prop-str', TEST_STRING_1)
517 sw.property_u32('#address-cells', 1)
518 sw.property_u32('#size-cells', 0)
520 sw.begin_node('subnode@1')
521 sw.property_string('compatible', 'subnode1')
522 sw.property_u32('reg', 1)
523 sw.property_cell('prop-int', TEST_VALUE_1)
524 sw.begin_node('subsubnode')
525 sw.property('compatible', 'subsubnode1\0subsubnode')
526 sw.property_cell('prop-int', TEST_VALUE_1)
527 sw.end_node()
528 sw.begin_node('ss1')
529 sw.end_node()
530 sw.end_node()
533 with sw.add_node('subnode@%d' % i):
534 sw.property_u32('reg', 2)
535 sw.property_cell('linux,phandle', PHANDLE_1)
536 sw.property_cell('prop-int', TEST_VALUE_2)
537 sw.property_u32('#address-cells', 1)
538 sw.property_u32('#size-cells', 0)
539 with sw.add_node('subsubnode@0'):
540 sw.property_u32('reg', 0)
541 sw.property_cell('phandle', PHANDLE_2)
542 sw.property('compatible', 'subsubnode2\0subsubnode')
543 sw.property_cell('prop-int', TEST_VALUE_2)
544 with sw.add_node('ss2'):
546 sw.end_node()
548 fdt = sw.as_fdt()
553 with sw.add_node('another'):
554 sw.property_u32('reg', 3)
557 node = sw.path_offset('/subnode@1')
558 self.assertEqual(b'subnode1\0', sw.getprop(node, 'compatible'))