labels within a property value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Hi David,

The ePAPR in Appendix A (page 96) says:


  Labels may also appear before or after any component of a property value, or between cells of
  a cell array, or between bytes of a bytestring. Examples:
  reg = reglabel: <0 sizelabel: 0x1000000>;
  prop = [ab cd ef byte4: 00 ff fe];
  str = start: "string value" end: ;


The dtc compiler indeed allows placing a label inside a property value.
But when I try to use that label I get the error:

   ERROR (phandle_references): Reference to non-existent node or label "DATA_1"
or

   ERROR (path_references): Reference to non-existent node or label "DATA_1"

The three test dts files are below.
test_label_b.dts has the usage of the label commented out (compiles ok).
test_label_c.dts tries to use the data label as a phandle (gets first error).
test_label_d.dts tries to use the data label as a path (gets second error).

I am trying to figure out how a data label could be used in a
reasonable manner.  Is this maybe a construct left over from
open firmware?  Or am I trying to use it incorrectly?  If there
is a valid use, can you provide an example?


$ cat test_label_b.dts

/dts-v1/;

/ {
        #address-cells = < 0x1 >;
	#size-cells = <0x1>;
        soc {
        	#address-cells = < 0x1 >;
		#size-cells = <0x1>;

                PIC_3: pic@100 {
		        reg = < DATA_1: 0x100 DATA_2: 0x20 >;
                        interrupt-controller;
                };
        };

	uart@200 {
		reg = <0x200 0x10>;
		interrupt-parent = < &PIC_3 >;
		/* my_prop = < &DATA_1 >; */
	};

};

$ cat test_label_c.dts

/dts-v1/;

/ {
        #address-cells = < 0x1 >;
	#size-cells = <0x1>;
        soc {
        	#address-cells = < 0x1 >;
		#size-cells = <0x1>;

                PIC_3: pic@100 {
		        reg = < DATA_1: 0x100 DATA_2: 0x20 >;
                        interrupt-controller;
                };
        };

	uart@200 {
		reg = <0x200 0x10>;
		interrupt-parent = < &PIC_3 >;
		my_prop = < &DATA_1 >;
	};

};


Thanks,

Frank
--
To unsubscribe from this list: send the line "unsubscribe devicetree-compiler" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux