Skip to content

Conversation

@Moneysac90
Copy link

I encountered multiple parsing errors because the unit_address is considered being a hex value. This will fail on e.g. the following type of nodes.

node with a hex value but 0x prefixed

uart@0x8000000 {
	compatible = "xlnx";
	reg = <0x1000>;
	interrupts = <0x3b 0x00>;
	clock = <0x2faf080>;
};

node using a variable name some_var instead of an address

uart@some_var {
	compatible = "xlnx";
	reg = <0x1000>;
	interrupts = <0x3b 0x00>;
	clock = <0x2faf080>;
};

node using invalid hex values (in the practice we saw multiple files using float values)

uart@0,0 {
	compatible = "xlnx";
	reg = <0x1000>;
	interrupts = <0x3b 0x00>;
	clock = <0x2faf080>;
};

I encountered multiple parsing errors because the `unit_address` is considered being a hex value. This will fail on e.g. the following type of nodes.

node with a hex value but `0x` prefixed
```
uart@0x8000000 {
	compatible = "xlnx";
	reg = <0x1000>;
	interrupts = <0x3b 0x00>;
	clock = <0x2faf080>;
};
```

node using a variable name `some_var` instead of an address
```
uart@some_var {
	compatible = "xlnx";
	reg = <0x1000>;
	interrupts = <0x3b 0x00>;
	clock = <0x2faf080>;
};
```

node using invalid hex values (in the practice we saw multiple files using float values)
```
uart@0,0 {
	compatible = "xlnx";
	reg = <0x1000>;
	interrupts = <0x3b 0x00>;
	clock = <0x2faf080>;
};
```
@Moneysac90 Moneysac90 mentioned this pull request Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant