fdtdump outputs wrong values
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
device-tree-compiler (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
In an attempt to debug a (unrelated!) FDT/kernel issue, I was fdtdump-ing my device tree. The values in dumped phandle's seemed wrong, and upon closer inspection, it turned out a bug in util.c, which was fixed in commit 883238dc508e721
To reproduce / see for yourself:
1) download (for instance) my DTB (attached)
2) fdtdump it, search for "serial@01c28400" (node /soc/serial@
3) watch the line saying "clocks = <0x00000002 0x000001a2>;" (or something similar)
4) fdtget /tmp/test.dtb /soc/serial@
5) see it say "2 63"
To test if 3 or 5 outputs the actual values in the FDT, I verified the value on my SoC having booted this exact DTB:
jorik@oxygen:~$ hexdump /sys/firmware/
0000000 0000 0200 0000 3f00
0000008
Which translates to "2 63".
I've backported 883238dc508e721
I would suggest to adopt 883238dc508e721