Thread (1 message) 1 message, 1 author, 2012-08-20

Re: [PATCH v2 dtc-1.3.0] dtc: Add --strip-disabled option to dtc(v2).

From: Srinivas KANDAGATLA <hidden>
Date: 2012-08-20 15:19:24

On 20/08/12 14:25, Jon Loeliger wrote:
quoted
From: Srinivas Kandagatla <redacted>

This patch allows dtc to strip out nodes in its output based on status
property. Now the dtc has additional long option --strip-disabled to
strip all the nodes which do not have status property set to "okay" or
"ok". Nodes which do not have status property are not stripped.

SOCs have lot of device tree infrastructure files which mark the
device nodes as disabled and the board level device tree enables them if
required. However while creating device tree blob, the compiler can
exclude nodes marked as disabled, doing this way will reduce the size
of device tree blob. The size change will be significant once the SOC
adds all the possible devices in to the device trees. As there could be
100s of Ips on SOCs but the board actually uses may be 20-25 IP's.

However care has to be taken if your boardloader is is updating status
property.

In our case this has reduced the blob size from 29K to 15K.

Also nodes with status="disabled" is are never probed by dt platform bus
code.

Again, this is an optional parameter to dtc, Can be used by people who
want to strip all the device nodes which do not have status property set
to "okay" or "ok".
I don't know.  This all strikes me as a means to hack around
our total lack of a properly constructed tree based on real
data and valid node presence.  That is, if we had a better
means of constructing your tree in the first place, it would
not habve 50% overhead of dead nodes.
I agree with you to some extent,
But, Lets say a given SOC can support 5 UARTs But the board actually has
only one wired up.
Device tree for SOC has 5 entries for UART with disabled and only one
UART is enabled by board level device tree.
This is just once instance, think about SPI's, I2C, PWM's, Ethernets,
memory devices... and other IP's which might wired up for particular boards.
It should be built in a positive sense, perhaps with includes, or a
better system, and not edited out based on questionable negative data.

This just seems like a fundamentally wrong approach to me.

jdl
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help